From: x2000habouzit Date: Tue, 2 Nov 2004 06:34:27 +0000 (+0000) Subject: backport X-Git-Tag: xorg/old~1106 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=fbeae97f5c64d90aa29245b8d3e66ce4bfa03ace;p=platal.git backport --- diff --git a/scripts/cron/connect.db.inc.php b/scripts/cron/connect.db.inc.php index ece77f6..3d0ed8f 100644 --- a/scripts/cron/connect.db.inc.php +++ b/scripts/cron/connect.db.inc.php @@ -18,12 +18,17 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: connect.db.inc.php,v 1.1 2004-10-02 15:34:53 x2000habouzit Exp $ + $Id: connect.db.inc.php,v 1.2 2004-11-02 06:34:27 x2000habouzit Exp $ ***************************************************************************/ -ini_set("include_path","/usr/share/php:../../include"); +ini_set("include_path","/usr/share/php/diogenes:/usr/share/php:../../include"); + +require("diogenes.database.inc.php"); +require("../../include/xorg.globals.inc.php"); +$globals = new XorgGlobals; + require("../../include/xorg.misc.inc.php"); require("../../include/config.xorg.inc.php"); -mysql_connect($globals->dbhost,$globals->dbuser,$globals->dbpwd); -mysql_select_db($globals->dbdb); +$globals->dbconnect(); + ?> diff --git a/scripts/cron/send_nl.php b/scripts/cron/send_nl.php index 9d0fd3a..be581f3 100755 --- a/scripts/cron/send_nl.php +++ b/scripts/cron/send_nl.php @@ -19,7 +19,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: send_nl.php,v 1.2 2004-10-31 16:20:25 x2000chevalier Exp $ + $Id: send_nl.php,v 1.3 2004-11-02 06:34:27 x2000habouzit Exp $ ***************************************************************************/ require('./connect.db.inc.php'); @@ -32,7 +32,7 @@ function query ($sql) { } } -$opts = getopt('i:h'); +$opt = getopt('i:h'); if(empty($opt['i']) || isset($opt['h'])) { echo <<