Exemple #1
0
 if ($cron->get_first_pass_done() == 0) {
     //Correct text - don't just add s to help multi language support later
     if ($c1 == 1) {
         $f_txt1 = $cron_txts[2];
     } else {
         $f_txt1 = $cron_txts[3];
     }
     if ($c2 == 1) {
         $f_txt2 = $cron_txts[4];
     } else {
         $f_txt2 = $cron_txts[5];
     }
     $cron->store_cron_log(1, $c1 . ' ' . $f_txt1 . $cron_txts[6], '');
     $cron->store_cron_log(1, $c2 . ' ' . $f_txt2 . $cron_txts[6], '');
     //Update user to indicate first pass done
     $cron->set_first_pass_done_db();
 } elseif ($cron->get_first_pass_done() == 1 and $cron->get_fr_fw_issue() == 0) {
     /*
     Decided in the end that if there is an API error, not doing anything at all is probably
     safest. Disabling auto-follow alone is fine, but for a large account an API connection
     failure for the friends and followers list could mean a lot of entries being added to
     the user cache.
     */
     //Get array of new users
     $fw_fr_types = array('fw_new' => $cron_txts[7], 'fw_gone' => $cron_txts[8], 'fr_new' => $cron_txts[9], 'fr_gone' => $cron_txts[10]);
     $data_array = array();
     $data_array = $cron->get_id_changes();
     //Loop through and log data
     foreach ($fw_fr_types as $key => $text) {
         if (sizeof($data_array[$key]) > 0) {
             //Log row