[eGroupWare-svn] r55941 - /trunk/admin/admin-cli.php
[email protected] Fri, 29 Apr 2016 13:02:10 -0000
| Newsgroups | gmane.comp.web.egroupware.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: ralfbecker
Date: Fri Apr 29 15:02:10 2016
New Revision: 55941
URL: http://svn.stylite.de/viewvc/egroupware?rev=55941&view=rev
Log:
missed admin-cli.php when converting to api
Modified:
trunk/admin/admin-cli.php
Modified: trunk/admin/admin-cli.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/admin/admin-cli.php?rev=55941&r1=55940&r2=55941&view=diff
==============================================================================
--- trunk/admin/admin-cli.php (original)
+++ trunk/admin/admin-cli.php Fri Apr 29 15:02:10 2016
@@ -12,6 +12,8 @@
*/
use EGroupware\Api;
+use EGroupware\Api\Framework;
+use EGroupware\Api\Vfs;
chdir(dirname(__FILE__)); // to enable our relative pathes to work
@@ -87,7 +89,7 @@
list($name,$value) = explode('=',$arg,2);
if(property_exists('admin_cmd',$name)) // dont allow to overwrite admin_cmd properties
{
- throw new egw_exception_wrong_userinput(lang("Invalid argument '%1' !!!",$arg),90);
+ throw new Api\Exception\WrongUserinput(lang("Invalid argument '%1' !!!",$arg),90);
}
if (substr($name,-1) == ']') // allow 1-dim. arrays
{
@@ -177,7 +179,7 @@
{
$url = $GLOBALS['egw_info']['server']['webserver_url'].'/json.php?menuaction=admin.admin_hooks.ajax_clear_cache';
if ($url[0] == '/') $url = 'http://'.(!empty($domain) && $domain != 'default' ? $domain : 'localhost').$url;
- $data = file_get_contents($url, false, Api\Framework::proxy_context($user,$arg0s[1]));
+ $data = file_get_contents($url, false, Framework::proxy_context($user,$arg0s[1]));
error_log("file_get_contents('$url') returned ".array2string($data));
if ($data && strpos($data, '"success"') !== false)
{
@@ -189,7 +191,7 @@
}
}
}
- catch (egw_exception_wrong_userinput $e) {
+ catch (Api\Exception\WrongUserinput $e) {
echo "\n".$e->getMessage()."\n\n";
exit($e->getCode());
}
@@ -273,7 +275,7 @@
_check_pw($GLOBALS['egw_domain'][$_GET['domain']]['config_passwd'],$passwd))
{
echo "\nRoot access granted!\n";
- egw_vfs::$is_root = true;
+ Vfs::$is_root = true;
}
else
{
@@ -539,7 +541,7 @@
/* ToDo: this cant work, not even in 14.x
if (!($account_id = $GLOBALS['egw']->accounts->name2id($account_lid)))
{
- throw new egw_exception_wrong_userinput(lang("Unknown account: %1 !!!",$account_lid),15);
+ throw new Api\Exception\WrongUserinput(lang("Unknown account: %1 !!!",$account_lid),15);
}
$GLOBALS['egw_info']['user'] = array(
'account_id' => $account_id,
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z