logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

cvs: pearweb /cron trackback-cleanup.php: msg#00070

Subject: cvs: pearweb /cron trackback-cleanup.php
mj              Tue Feb  7 18:14:38 2006 UTC

  Modified files:              
    /pearweb/cron       trackback-cleanup.php 
  Log:
  * Changed include strategy to work independently of the given directory
    layout.
  
  * Improved readability of code for error message generation.
  
  
http://cvs.php.net/viewcvs.cgi/pearweb/cron/trackback-cleanup.php?r1=1.2&r2=1.3&diff_format=u
Index: pearweb/cron/trackback-cleanup.php
diff -u pearweb/cron/trackback-cleanup.php:1.2 
pearweb/cron/trackback-cleanup.php:1.3
--- pearweb/cron/trackback-cleanup.php:1.2      Tue Feb  7 18:11:11 2006
+++ pearweb/cron/trackback-cleanup.php  Tue Feb  7 18:14:38 2006
@@ -7,21 +7,18 @@
  * @author    Tobias Schlitt <toby@xxxxxxx>
  * @copyright Copyright (c) 1997-2006 The PHP Group
  * @license   http://www.php.net/license/3_0.txt  PHP License
- * @version   $Id: trackback-cleanup.php,v 1.2 2006/02/07 18:11:11 mj Exp $
+ * @version   $Id: trackback-cleanup.php,v 1.3 2006/02/07 18:14:38 mj Exp $
  */
 
-ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR
-        . '/usr/local/www/pearweb/include');
-
 /**
  * Get common settings.
  */
-require_once 'pear-config.php';
+require_once dirname(__FILE__) . '/../include/pear-config.php';
 
 /**
  * Obtain the system's common functions and classes.
  */
-require_once 'pear-database.php';
+require_once dirname(__FILE__) . '/../include/pear-database.php';
 
 /**
  * Get the database class.
@@ -39,5 +36,5 @@
 $sql = 'DELETE FROM trackbacks WHERE timestamp <= '.(time() - 
TRACKBACK_PURGE_TIME).' AND approved = "false"';
 
 if (PEAR::isError($res = $dbh->query($sql))) {
-    die("SQL <$sql> returned error: <{$res->getMessage()}>.\n");
+    die("SQL <" . $sql . "> returned error: <" . $res->getMessage() . ">.\n");
 }

-- 
PEAR CVS Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>