git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
typo
[plcapi.git]
/
php
/
plc_api.php
diff --git
a/php/plc_api.php
b/php/plc_api.php
index
3224601
..
4bd77a1
100644
(file)
--- a/
php/plc_api.php
+++ b/
php/plc_api.php
@@
-8,10
+8,6
@@
// Mark Huang <mlhuang@cs.princeton.edu>
// Copyright (C) 2005-2006 The Trustees of Princeton University
//
// Mark Huang <mlhuang@cs.princeton.edu>
// Copyright (C) 2005-2006 The Trustees of Princeton University
//
-// $Id$
-// $URL$
-//
-//
require_once 'plc_config.php';
require_once 'plc_config.php';
@@
-61,9
+57,13
@@
class PLCAPI
function backtrace_php () {
$backtrace = debug_backtrace();
$msg = "";
function backtrace_php () {
$backtrace = debug_backtrace();
$msg = "";
- foreach( $backtrace as $line ) {
+ $len = count($backtrace);
+ $cnt = 1;
+ foreach( array_reverse($backtrace) as $line ) {
$msg .= "File '". $line['file'] . "' line " . $line['line'] . "\n";
$msg .= " " . $line['function'] . "( " . $this->rec_join($line['args']) . ")\n";
$msg .= "File '". $line['file'] . "' line " . $line['line'] . "\n";
$msg .= " " . $line['function'] . "( " . $this->rec_join($line['args']) . ")\n";
+ $cnt += 1;
+ if ( $cnt == $len ) { break; }
}
return $msg;
}
}
return $msg;
}
@@
-241,10
+241,15
@@
class PLCAPI
}
}
}
}
+// this tentatively allows to tune mainstream xmlrpc php lib
+// so as to achieve the same behaviour as with our patched lib
+$GLOBALS['xmlrpc_null_extension'] = true;
+$GLOBALS['$xmlrpc_null_apache_encoding'] = true;
+
global $adm;
$adm = new PLCAPI(array('AuthMethod' => "capability",
global $adm;
$adm = new PLCAPI(array('AuthMethod' => "capability",
- 'Username' => PLC_API_MAINTENANCE_USER,
+ 'Username'
=> PLC_API_MAINTENANCE_USER,
'AuthString' => PLC_API_MAINTENANCE_PASSWORD));
?>
'AuthString' => PLC_API_MAINTENANCE_PASSWORD));
?>