Updates an existing report.

@see addReport()
327421
public function updateReport($idReport, $idSite, $description, $period, $hour, $reportType, $reportFormat, $reports, $parameters, $idSegment = false, $evolutionPeriodFor = 'prev',
                                 $evolutionPeriodN = null)
    {
        Piwik::checkUserIsNotAnonymous();
        Piwik::checkUserHasViewAccess($idSite);

        $scheduledReports = $this->getReports($idSite, $periodSearch = false, $idReport);
        $report   = reset($scheduledReports);
        $idReport = $report['idreport'];

        $currentUser = Piwik::getCurrentUserLogin();
        self::ensureLanguageSetForUser($currentUser);

        self::validateCommonReportAttributes($period, $hour, $description, $idSegment, $reportType, $reportFormat, $evolutionPeriodFor, $evolutionPeriodN);

        // report parameters validations
        $parameters = self::validateReportParameters($reportType, $parameters);

        // validation of requested reports
        $reports = self::validateRequestedReports($idSite, $reportType, $reports);

        $this->getModel()->updateReport($idReport, array(
            'description' => $description,
            'idsegment'   => $idSegment,
            'period'      => $period,
            'hour'        => $hour,
            'type'        => $reportType,
            'format'      => $reportFormat,
            'parameters'  => $parameters,
            'reports'     => $reports,
            'evolution_graph_within_period' => $evolutionPeriodFor == 'each',
            'evolution_graph_period_n' => $evolutionPeriodN ?: ImageGraph::getDefaultGraphEvolutionLastPeriods(),
        ));

        self::$cache = array();
    }
990855
public function addReport($report)
    {
        $report = (array) $report;

        foreach ($report as $r) {
            if (!preg_match('/^{([^}]*)}(.*)$/', $r)) {
                throw new DAV\Exception('Reportname must be in clark-notation');
            }
            $this->reports[] = $r;
        }
    }
253848
public void addNew() throws DBException
    {
        if (((this.getRecord().getOpenMode() & DBConstants.OPEN_REFRESH_AND_LOCK_ON_CHANGE_STRATEGY) == 0)
            && ((this.getRecord().getOpenMode() & DBConstants.OPEN_READ_ONLY) != DBConstants.OPEN_READ_ONLY)
            && (this.getRecord().getCounterField() != null))
                this.getRecord().setOpenMode(this.getRecord().getOpenMode() | DBConstants.OPEN_REFRESH_AND_LOCK_ON_CHANGE_STRATEGY); // Must have for MirrorTable to sync new records
        super.addNew();
        Iterator<BaseTable> iterator = this.getTables();
        while (iterator.hasNext())
        {
            BaseTable table = iterator.next();
            if ((table != null) && (table != this.getNextTable()))
            {
                table.addNew();
            }
        }
    }
1126896
private void addMetaData() {
		document.addTitle(getDocumentTitle());
		document.addAuthor(ReleaseInfoAdapter.getCompany());
		document.addCreator("NextReports " + ReleaseInfoAdapter.getVersionNumber());
		document.addSubject("Created by NextReports Designer" + ReleaseInfoAdapter.getVersionNumber());
		document.addCreationDate();
		document.addKeywords(ReleaseInfoAdapter.getHome());
	}
251538
public void addReportingUser(String userId)
	{
		addActiveParticipant(
				userId, 
				null, 
				null, 
				true, 
				null, 
				null);
	}
327161
public function run(JobReport $report)
    {
        $this->report = $report;
        $report->setStartTime(microtime(true));
        $this->getProcess()->start(function ($type, $buffer) use ($report) {
            if (Process::ERR === $type) {
                $report->addError($buffer);
            } else {
                $report->addOutput($buffer);
            }
        });
    }
491137
public void appendReport (StringBuilder report, long now, long sinceLast, boolean reset)
    {
        PresentsConMgrStats stats = getStats();
        long eventCount = stats.eventCount - _lastStats.eventCount;
        int connects = stats.connects - _lastStats.connects;
        int disconnects = stats.disconnects - _lastStats.disconnects;
        int closes = stats.closes - _lastStats.closes;
        long bytesIn = stats.bytesIn - _lastStats.bytesIn;
        long bytesOut = stats.bytesOut - _lastStats.bytesOut;
        long msgsIn = stats.msgsIn - _lastStats.msgsIn;
        long msgsOut = stats.msgsOut - _lastStats.msgsOut;
        if (reset) {
            _lastStats = stats;
        }

        // make sure we don't div0 if this method somehow gets called twice in
        // the same millisecond
        sinceLast = Math.max(sinceLast, 1L);

        report.append("* presents.net.ConnectionManager:\n");
        report.append("- Network connections: ");
        report.append(stats.connectionCount).append(" connections, ");
        report.append(stats.handlerCount).append(" handlers\n");
        report.append("- Network activity: ");
        report.append(eventCount).append(" events, ");
        report.append(connects).append(" connects, ");
        report.append(disconnects).append(" disconnects, ");
        report.append(closes).append(" closes\n");
        report.append("- Network input: ");
        report.append(bytesIn).append(" bytes, ");
        report.append(msgsIn).append(" msgs, ");
        report.append(msgsIn*1000/sinceLast).append(" mps, ");
        long avgIn = (msgsIn == 0) ? 0 : (bytesIn/msgsIn);
        report.append(avgIn).append(" avg size, ");
        report.append(bytesIn*1000/sinceLast).append(" bps\n");
        report.append("- Network output: ");
        report.append(bytesOut).append(" bytes, ");
        report.append(msgsOut).append(" msgs, ");
        report.append(msgsOut*1000/sinceLast).append(" mps, ");
        long avgOut = (msgsOut == 0) ? 0 : (bytesOut/msgsOut);
        report.append(avgOut).append(" avg size, ");
        report.append(bytesOut*1000/sinceLast).append(" bps\n");
    }
1226498
def update_report_collector(self, timestamp):
        """"""
        report_enabled = 'report' in self.information and self.information['report'] == 'html'
        report_enabled = report_enabled and 'stage' in self.information
        report_enabled = report_enabled and Event.collector_queue is not None

        if report_enabled:
            Event.collector_queue.put(CollectorUpdate(
                matrix=self.information['matrix'] if 'matrix' in self.information else 'default',
                stage=self.information['stage'],
                status=self.status,
                timestamp=timestamp,
                information=self.information
            ))
1018687
protected function update()
    {
        DbTable::update($this->db, $this->_tableName, $this->_cols, $this->id);
    }
614392
public function writeReport(Report $report): void
    {
        $xml = new \DOMDocument('1.0', 'UTF-8');

        $root = $xml->createElement('checkstyle');
        $root->setAttribute('version', APP_NAME . '-' . APP_VERSION);

        foreach ($report->getFiles() as $file) {
            $xmlFile = $xml->createElement('file');
            $xmlFile->setAttribute('name', $file->getFilename());

            foreach ($file->getIssues() as $issue) {
                $xmlWarning = $xml->createElement('error');
                $xmlWarning->setAttribute('line', "" . $issue->getLine());
                $xmlWarning->setAttribute('severity', $issue->getSeverity());
                $xmlWarning->setAttribute('message', $issue->getMessage());
                $xmlWarning->setAttribute('source', $issue->getSource());

                if ($issue->getColumn() !== null) {
                    $xmlWarning->setAttribute('column', "" . $issue->getColumn());
                }

                $xmlFile->appendChild($xmlWarning);
            }

            $root->appendChild($xmlFile);
        }

        $xml->appendChild($root);
        $xml->formatOutput = true;

        $this->output->write($xml->saveXML());
    }
1196317
protected function insertDayReports()
    {
        /** @var DataTable $dataTable */
        $dataTable = $this->arrays->asDataTable();
        $this->setVisitorIds($dataTable);
        $report = $dataTable->getSerialized($this->maximumRowsInDataTableLevelZero, null, Metrics::INDEX_NB_VISITS);
        $this->getProcessor()->insertBlobRecord(self::USERID_ARCHIVE_RECORD, $report);
    }
641693
public function onInstallCommandCompletedOutputReport()
    {
        $report = new InstallReport($this->eventDataCollector, $this->dataCollectors);
        $report->generate($this->logger);
    }
414627
void add(long reportingHsid, final Map<Long,Boolean> failed) {
        // skip if the reporting site did not belong to the pre
        // failure mesh
        if (!m_hsids.contains(reportingHsid)) return;

        // ship if the reporting site is reporting itself dead
        Boolean harakiri = failed.get(reportingHsid);
        if (harakiri != null && harakiri.booleanValue()) return;

        Set<Long> dead = Sets.newHashSet();

        for (Map.Entry<Long, Boolean> e: failed.entrySet()) {
            // skip if the failed site did not belong to the
            // pre failure mesh
            if (!m_hsids.contains(e.getKey())) continue;

            m_reported.put(e.getKey(), reportingHsid);
            // if the failure is witnessed add it to the dead graph
            if (e.getValue()) {
                m_dead.put(e.getKey(), reportingHsid);
                dead.add(e.getKey());
            }
        }
        // once you are witnessed dead you cannot become undead,
        // but it is not the case for alive nodes, as they can
        // die. So remove all what the reporting site thought
        // was alive before this invocation
        removeValue(m_alive, reportingHsid);

        for (Long alive: Sets.difference(m_hsids, dead)) {
            m_alive.put(alive, reportingHsid);
        }
    }
824
protected function addReview()
    {
        if (!$this->isError()) {
            $id = $this->review->add($this->getSubmitted());
            if (empty($id)) {
                $this->errorAndExit($this->text('Unexpected result'));
            }
            $this->line($id);
        }
    }
134576
public function writeRevision()
    {
        if ($this->syncCommit) {
            $localRevision = $this->syncCommit;
        } else {
            $localRevision = $this->git->localRevision()[0];
        }

        try {
            $this->bridge->put($localRevision, $this->revisionFile);
        }
        catch (Exception $e) {
            throw new Exception("Could not update the revision file on server: {$e->getMessage()}");
        }
    }
71342
static function appendBottomReport( $reportName, $reportContent )
    {
        $debug = eZDebug::instance();
        $debug->bottomReportsList[$reportName] = $reportContent;
    }
427261
def append(self, report):
        """"""
        assert report not in self.examples
        self.count += 1
        if len(self.examples) < self.top:
            self.examples.append(report)