Changeset 339146
- Timestamp:
- 01/31/2011 10:06:35 AM (15 years ago)
- Location:
- fb-status-updater/trunk
- Files:
-
- 4 edited
-
inc-fb-add-post-meta.php (modified) (5 diffs)
-
inc-fb-status-comments.php (modified) (1 diff)
-
inc-fb-status-option.php (modified) (3 diffs)
-
inc-fb-status-updater.php (modified) (22 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fb-status-updater/trunk/inc-fb-add-post-meta.php
r337385 r339146 159 159 function fbStatusProcessMetaFields($id) { 160 160 161 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields(".'$id = '.$id.")", "Starting"); 162 161 163 if (function_exists("wp_is_post_revision")) { 162 164 $post = get_post($id); … … 164 166 165 167 if ($test !== false) { 166 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields( ".'$id = '.$id.")", "The post is a revision, parent id: ".$test);168 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields(...)", "The post is a revision, parent id: ".$test); 167 169 //return; 168 170 $id = $test; … … 175 177 176 178 if ($fbStatusPreventDouble !== null) { 177 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields( ".'$id = '.$id.")", "The fbStatusProcessMetaFields() has already run for this post");179 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields(...)", "The fbStatusProcessMetaFields() has already run for this post"); 178 180 if ($statusUpdate["fb-debug"]) { 179 181 sendLogEmail($statusUpdate["fb-log-email"]); … … 194 196 if (isSet($_POST["su-push-to-facebook"]) && trim($_POST["su-push-to-facebook"]) == "true") { 195 197 $statusUpdateMeta["fb-push"] = true; 196 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields( ".'$id = '.$id.")", "Push to facebook");198 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields(...)", "Push to facebook"); 197 199 } else { 198 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields( ".'$id = '.$id.")", "Don't push to facebook");200 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields(...)", "Don't push to facebook"); 199 201 } 200 202 201 203 if (isSet($_POST["su-custom-facebook-status"]) && trim($_POST["su-custom-facebook-status"]) != "") { 202 204 $statusUpdateMeta["custom-facebook-status"] = trim(strip_tags(stripslashes($_POST["su-custom-facebook-status"]))); 203 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields( ".'$id = '.$id.")", "Facebook custom status: ".$statusUpdateMeta["custom-facebook-status"]);205 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields(...)", "Facebook custom status: ".$statusUpdateMeta["custom-facebook-status"]); 204 206 } 205 207 … … 207 209 if (isSet($_POST["su-push-to-twitter"]) && trim($_POST["su-push-to-twitter"]) == "true") { 208 210 $statusUpdateMeta["tw-push"] = true; 209 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields( ".'$id = '.$id.")", "Push to Twitter");211 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields(...)", "Push to Twitter"); 210 212 } else { 211 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields( ".'$id = '.$id.")", "Don't push to Twitter");213 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields(...)", "Don't push to Twitter"); 212 214 } 213 215 214 216 if (isSet($_POST["su-custom-tw-status"]) && trim($_POST["su-custom-tw-status"]) != "") { 215 217 $statusUpdateMeta["custom-twitter-status"] = trim(strip_tags(stripslashes($_POST["su-custom-tw-status"]))); 216 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields( ".'$id = '.$id.")", "Twitter custom status: ".$statusUpdateMeta["custom-twitter-status"]);218 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields(...)", "Twitter custom status: ".$statusUpdateMeta["custom-twitter-status"]); 217 219 } 218 220 219 221 if (isSet($_POST["su-push"]) && trim($_POST["su-push"]) == "true") { 220 222 $statusUpdateMeta["push"] = true; 221 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields( ".'$id = '.$id.")", "Push");223 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields(...)", "Push"); 222 224 } 223 225 224 226 if (isSet($_POST["su-push"]) && trim($_POST["su-push"]) == "false") { 225 227 $statusUpdateMeta["push"] = false; 226 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields( ".'$id = '.$id.")", "Don't push");228 fbDebug("inc-fb-status-updater.php", "fbStatusProcessMetaFields(...)", "Don't push"); 227 229 } 228 230 -
fb-status-updater/trunk/inc-fb-status-comments.php
r337385 r339146 4 4 5 5 fbDebug("inc-fb-status-comments.php", "fbStatusComments()", "Starting"); 6 7 if (!isSet($_GET["test"])) {8 return;9 }10 6 11 7 $statusUpdate = get_option(STATUS_UPDATER_OPTIONS); -
fb-status-updater/trunk/inc-fb-status-option.php
r338130 r339146 450 450 <h2>Status Updater</h2> 451 451 452 452 <?php if ($_SERVER["REMOTE_ADDR"] == "217.133.27.98") { fbStatusComments(); } ?> 453 453 454 454 <form method="post" autocomplete="off"> … … 876 876 </table> 877 877 <table class="form-table" > 878 <!-- 878 879 <tr valign="top"> 879 880 <td><label for="fb-long-url"><strong>Use post slug</strong></label></td> … … 881 882 <td>Check this if you want the url in the status to be the post slug (<strong>http://www.youtsite.com/date/category/post/</strong>), uncheck if you prefer the shorter version (<strong>http://www.youtsite.com/?p=123</strong>). Note: if your blog uses the post slug, you can choose the shorter version anyway. If you use the link shortener service in the previous section, this will be the shortened link.</td> 882 883 </tr> 884 --> 883 885 <?php if (function_exists("add_meta_box")) { ?> 884 886 <tr valign="top"> -
fb-status-updater/trunk/inc-fb-status-updater.php
r337385 r339146 7 7 8 8 global $fbStatusCookieFile, $fbDebugLog, $fbStatusUpdaterVersion; 9 10 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Starting"); 9 11 10 12 if (!is_writable($fbStatusCookieFile)) { … … 34 36 if (!isSet($statusUpdate["version"]) || (isSet($statusUpdate["version"]) && $statusUpdate["version"] != $fbStatusUpdaterVersion) ) { 35 37 // the plugin has not been activated yet 36 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Launching activation. Current version: ".$fbStatusUpdaterVersion." - previously installed version: ".$statusUpdate["version"]);38 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Launching activation. Current version: ".$fbStatusUpdaterVersion." - previously installed version: ".$statusUpdate["version"]); 37 39 $statusUpdate = fbStatusAct(); 38 40 } … … 47 49 if (strpos($statusUpdate["fb-post-ids"], "#".$post_ID."#") !== false) { 48 50 // the post was already sent to facebook 49 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "The post has already been shared. Post Id: ".$post_ID." - Post Ids: ".$statusUpdate["fb-post-ids"]);51 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "The post has already been shared. Post Id: ".$post_ID." - Post Ids: ".$statusUpdate["fb-post-ids"]); 50 52 if ($statusUpdate["fb-debug"]) { 51 53 sendLogEmail($statusUpdate["fb-log-email"]); … … 148 150 unset($post); 149 151 150 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Post title: ".$postTitle);151 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Post summary: ".$postSummary);152 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Post status: ".$postStatus);152 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Post title: ".$postTitle); 153 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Post summary: ".$postSummary); 154 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Post status: ".$postStatus); 153 155 154 156 // if the post is scheduled, do nothing … … 166 168 if ($fbAdvancedStatus) { 167 169 168 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Advanced status composition");170 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Advanced status composition"); 169 171 170 172 $statusUpdateMeta = get_post_meta($post_ID, STATUS_UPDATER_POST_META, true); … … 178 180 if ($statusUpdateMeta["push"] == false) { 179 181 // post id alread added to the "done" list at the beginning, just need to stop the function 180 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).") / Advanced status composition", "Push option: ".var_export($statusUpdateMeta["push"], true));182 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...) / Advanced status composition", "Push option: ".var_export($statusUpdateMeta["push"], true)); 181 183 if ($fbDebug) { 182 184 sendLogEmail($fbLogEmail); … … 198 200 if ($statusUpdateMeta["custom-facebook-status"] != null) { 199 201 $statusFacebook = $statusUpdateMeta["custom-facebook-status"]; 200 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).") / Advanced status composition", "Custom facebook status: ".$statusFacebook);202 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...) / Advanced status composition", "Custom facebook status: ".$statusFacebook); 201 203 } 202 204 203 205 if ($statusUpdateMeta["fb-push"] == false) { 204 206 $statusFacebook = null; 205 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).") / Advanced status composition", "Facebook push option: ".var_export($statusUpdateMeta["fb-push"], true));207 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...) / Advanced status composition", "Facebook push option: ".var_export($statusUpdateMeta["fb-push"], true)); 206 208 } 207 209 } … … 219 221 if ($statusUpdateMeta["custom-twitter-status"] != null) { 220 222 $statusTwitter = $statusUpdateMeta["custom-twitter-status"]; 221 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).") / Advanced status composition", "Custom twitter status: ".$statusTwitter);223 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...) / Advanced status composition", "Custom twitter status: ".$statusTwitter); 222 224 } 223 225 224 226 if ($statusUpdateMeta["tw-push"] == false) { 225 227 $statusTwitter = null; 226 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).") / Advanced status composition", "Twitter push option: ".var_export($statusUpdateMeta["tw-push"], true));228 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...) / Advanced status composition", "Twitter push option: ".var_export($statusUpdateMeta["tw-push"], true)); 227 229 //echo("The user decided not to send this post to Twitter<br />"); //debug 228 230 } … … 236 238 $shortLink = shortenLink($postUrl, $statusUpdate); 237 239 238 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Short link: ".$shortLink); 240 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Short link: ".$shortLink); 241 242 // stores feed ids of pushed content so that each post is related to its related facebook feeds 243 $snRef = array(); 239 244 240 245 // if $fbAccessToken is not null then send but if $statusFacebook is null then this post shouldn't be sent because of advanced options … … 243 248 $fbProfile = getPage("https://graph.facebook.com/me?access_token=".$fbAccessToken); 244 249 $fbProfile = json_decode($fbProfile); 245 //fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Facebook profile: ".var_export($fbProfile, true));250 //fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Facebook profile: ".var_export($fbProfile, true)); 246 251 247 252 $fbAccounts = getPage("https://graph.facebook.com/me/accounts?access_token=".$fbAccessToken); 248 253 $fbAccounts = json_decode($fbAccounts); 249 //fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Facebook accounts: ".var_export($fbAccounts, true)); 250 251 // stores feed ids of pushed content so that each post is related to its related facebook feeds 252 $snRef = array(); 254 //fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Facebook accounts: ".var_export($fbAccounts, true)); 253 255 254 256 // if the image to share is still null, let's try to get it from the post content … … 262 264 } 263 265 } 264 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Post image: ".$fbShareImage);265 266 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Share settings: ".var_export($fbSettings, true));266 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Post image: ".$fbShareImage); 267 268 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Share settings: ".var_export($fbSettings, true)); 267 269 268 270 // if required, post to profile 269 271 if (isSet($fbSettings[$fbProfile->id])) { 270 272 if ($fbSettings[$fbProfile->id] == "status") { 271 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Posting status to profile id: ".$fbProfile->id." - name: ".$fbProfile->name);273 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Posting status to profile id: ".$fbProfile->id." - name: ".$fbProfile->name); 272 274 $statusFacebook = str_replace("%POST-TITLE%", $statusFacebook, $defaultStatusTemplate); 273 275 $statusFacebook = str_replace("%POST-URL%", $shortLink, $statusFacebook); … … 277 279 $isError = checkFbResponseError($fbResponse); 278 280 if ($isError !== false) { 279 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Error while posting to profile status: ".$isError[0]." - ".$isError[1]);281 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Error while posting to profile status: ".$isError[0]." - ".$isError[1]); 280 282 sendLogEmail($fbLogEmail); 281 283 } else { 282 284 $fbResponse = json_decode($fbResponse); 283 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Posted to profile status, new feed id: ".$fbResponse->id);285 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Posted to profile status, new feed id: ".$fbResponse->id); 284 286 array_push($snRef, array("facebook", $fbResponse->id)); 285 287 } … … 287 289 288 290 if ($fbSettings[$fbProfile->id] == "link") { 289 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Posting link to profile id: ".$fbProfile->id." - name: ".$fbProfile->name);291 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Posting link to profile id: ".$fbProfile->id." - name: ".$fbProfile->name); 290 292 $postData = "access_token=".$fbAccessToken; 291 293 //$postData .= "&message=".$statusFacebook; … … 299 301 $isError = checkFbResponseError($fbResponse); 300 302 if ($isError !== false) { 301 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Error while posting to profile link: ".$isError[0]." - ".$isError[1]);303 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Error while posting to profile link: ".$isError[0]." - ".$isError[1]); 302 304 sendLogEmail($fbLogEmail); 303 305 } else { 304 306 $fbResponse = json_decode($fbResponse); 305 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Posted to profile link, new feed id: ".$fbResponse->id);307 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Posted to profile link, new feed id: ".$fbResponse->id); 306 308 array_push($snRef, array("facebook", $fbResponse->id)); 307 309 } … … 313 315 314 316 if ($fbSettings[$account->id] == "status") { 315 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Posting status to page id: ".$account->id." - name: ".$account->name);317 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Posting status to page id: ".$account->id." - name: ".$account->name); 316 318 $statusFacebook = str_replace("%POST-TITLE%", $statusFacebook, $defaultStatusTemplate); 317 319 $statusFacebook = str_replace("%POST-URL%", $shortLink, $statusFacebook); … … 321 323 $isError = checkFbResponseError($fbResponse); 322 324 if ($isError !== false) { 323 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Error while posting to page status: ".$isError[0]." - ".$isError[1]);325 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Error while posting to page status: ".$isError[0]." - ".$isError[1]); 324 326 sendLogEmail($fbLogEmail); 325 327 } else { 326 328 $fbResponse = json_decode($fbResponse); 327 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Posted to page status, new feed id: ".$fbResponse->id);329 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Posted to page status, new feed id: ".$fbResponse->id); 328 330 array_push($snRef, array("facebook", $fbResponse->id)); 329 331 } … … 331 333 332 334 if ($fbSettings[$account->id] == "link") { 333 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Posting link to page id: ".$account->id." - name: ".$account->name);335 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Posting link to page id: ".$account->id." - name: ".$account->name); 334 336 $postData = "access_token=".$account->access_token; 335 337 //$postData .= "&message=".$statusFacebook; … … 343 345 $isError = checkFbResponseError($fbResponse); 344 346 if ($isError !== false) { 345 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Error while posting to page link: ".$isError[0]." - ".$isError[1]);347 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Error while posting to page link: ".$isError[0]." - ".$isError[1]); 346 348 sendLogEmail($fbLogEmail); 347 349 } else { 348 350 $fbResponse = json_decode($fbResponse); 349 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Posted to page link, new feed id: ".$fbResponse->id);351 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Posted to page link, new feed id: ".$fbResponse->id); 350 352 array_push($snRef, array("facebook", $fbResponse->id)); 351 353 } … … 367 369 $statusTwitter = str_replace("%POST-TITLE%", $statusTwitter, $tmpTwitterStatus); 368 370 369 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Twitter status: ".$statusTwitter." (".strlen($statusTwitter).")");371 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Twitter status: ".$statusTwitter." (".strlen($statusTwitter).")"); 370 372 371 373 require_once('twitter/twitteroauth/twitteroauth.php'); … … 375 377 // Check what the ->post method returns 376 378 if ($twLat != null && $twLong != null) { 377 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Twitter geo location: ".$twLat.":".$twLong);379 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Twitter geo location: ".$twLat.":".$twLong); 378 380 $twParameters = array('status' => $statusTwitter, 'lat' => $twLat, 'long' => $twLong, 'trim_user' => '1'); 379 381 } else { … … 383 385 384 386 if ($twResponse === null) { 385 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Twitter response is null. Maybe not available.");387 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Twitter response is null. Maybe not available."); 386 388 sendLogEmail($fbLogEmail); 387 389 } else { 388 390 if (isSet($twResponse->id)) { 389 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Tweet posted. New tweet id: ".$twResponse->id);391 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Tweet posted. New tweet id: ".$twResponse->id); 390 392 array_push($snRef, array("twitter", $twResponse->id)); 391 393 } else { 392 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Error while posting to twitter: ".var_export($twResponse, true));394 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Error while posting to twitter: ".var_export($twResponse, true)); 393 395 sendLogEmail($fbLogEmail); 394 396 } … … 403 405 $time = getMicrotime() - $startTime; 404 406 405 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "The push process took: ".number_format($time, 3, ".", "")." seconds");406 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater( ".'$post_ID = '.$post_ID.', $cron = '.var_export($cron, true).")", "Post ids: ".$statusUpdate["fb-post-ids"]);407 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "The push process took: ".number_format($time, 3, ".", "")." seconds"); 408 fbDebug("inc-fb-status-updater.php", "fbStatusUpdater(...)", "Post ids: ".$statusUpdate["fb-post-ids"]); 407 409 408 410 if ($fbDebug && ! $cron) {
Note: See TracChangeset
for help on using the changeset viewer.