public static function processEdit($change) { if (time() - Globals::$tfas >= 1800 and preg_match('/\\(\'\'\'\\[\\[([^|]*)\\|more...\\]\\]\'\'\'\\)/iU', Api::$q->getpage('Wikipedia:Today\'s featured article/' . date('F j, Y')), $tfam)) { Globals::$tfas = time(); Globals::$tfa = $tfam[1]; } if (Config::$fork) { $pid = pcntl_fork(); if ($pid != 0) { echo 'Forked - ' . $pid . "\n"; return; } } $change = parseFeedData($change); $change['justtitle'] = $change['title']; if (in_array('namespace', $change) && $change['namespace'] != 'Main:') { $change['title'] = $change['namespace'] . $change['title']; } self::processEditThread($change); if (Config::$fork) { die; } }
function oldData($id) { $feedData = genOldFeedData($id); if ($feedData === false) { return false; } $feedData = parseFeedData($feedData, true, true); if ($feedData === false) { return false; } $feedData = $feedData['all']; return $feedData; }
if (!empty($data)) { $line = 0; foreach ($data as $item) { if (!empty($canvas['title'])) { // we don't take empty lines and header $itemArray = array(); if ($feed['feedType'] == 'CSV') { if ($line >= $feed['lineToBegin']) { $itemArray = parseFeedData($feed, $item); $line++; } else { $line++; continue; } } else { $itemArray = parseFeedData($feed, $item); } if (empty($itemArray['title']) || empty($itemArray['outGoingLink'])) { echo "<br><b>Erreur : </b> le titre et l'identifiant externe ne sont par remplis."; echo '<br>Titre : ' . $itemArray['title']; echo '<br>Identifiant externe ( outGoingLink ) : ' . $itemArray['outGoingLink']; continue; } try { //echo "Checking if document exists\n"; echo "<br>-----<b>" . $itemArray['title'] . "</b>---------"; $stamp = $papi->getDocumentStatus($itemArray['outGoingLink']); if ($stamp === false || $forceUpdate == 1) { echo "Doc is new, we push to XL"; $docsPAPI[] = buildPAPIItem($itemArray, $file); //var_dump($docsPAPI);