got rid of =& when constructing objects
This commit is contained in:
parent
bb00be70bb
commit
0d9129d16c
|
@ -3,30 +3,30 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Do database restore in background. - command line php application
|
* Do database restore in background. - command line php application
|
||||||
*
|
*
|
||||||
* required command line parameters:
|
* required command line parameters:
|
||||||
* @param 1. backup file
|
* @param 1. backup file
|
||||||
* @param 2. status file
|
* @param 2. status file
|
||||||
* @param 3. token
|
* @param 3. token
|
||||||
* @param 4. sessid
|
* @param 4. sessid
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once dirname(__FILE__).'/../var/conf.php';
|
require_once dirname(__FILE__).'/../var/conf.php';
|
||||||
require_once dirname(__FILE__).'/../var/GreenBox.php';
|
require_once dirname(__FILE__).'/../var/GreenBox.php';
|
||||||
require_once dirname(__FILE__).'/../var/Restore.php';
|
require_once dirname(__FILE__).'/../var/Restore.php';
|
||||||
include_once 'DB.php';
|
include_once 'DB.php';
|
||||||
|
|
||||||
PEAR::setErrorHandling(PEAR_ERROR_RETURN);
|
PEAR::setErrorHandling(PEAR_ERROR_RETURN);
|
||||||
$dbc = DB::connect($config['dsn'], TRUE);
|
$dbc = DB::connect($config['dsn'], TRUE);
|
||||||
if (DB::isError($dbc)) {
|
if (DB::isError($dbc)) {
|
||||||
die($dbc->getMessage());
|
die($dbc->getMessage());
|
||||||
}
|
}
|
||||||
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||||
|
|
||||||
$gb =& new GreenBox($dbc, $config);
|
$gb = new GreenBox($dbc, $config);
|
||||||
$rs = new Restore($gb);
|
$rs = new Restore($gb);
|
||||||
|
|
||||||
if ($rs->loglevel=='debug') {
|
if ($rs->loglevel=='debug') {
|
||||||
$rs->addLogItem('argv:'.print_r($argv,true));
|
$rs->addLogItem('argv:'.print_r($argv,true));
|
||||||
}
|
}
|
||||||
|
@ -37,5 +37,5 @@
|
||||||
$token = $argv[3];
|
$token = $argv[3];
|
||||||
$sessid = $argv[4];
|
$sessid = $argv[4];
|
||||||
$rs->startRestore($backupfile,$token,$sessid);
|
$rs->startRestore($backupfile,$token,$sessid);
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue