Author: ralfbecker
New Revision: 55203
URL: http://svn.stylite.de/viewvc/egroupware?rev=55203&view=rev
Log:
fix namespace usage in refactured code:
namespace EGroupware\Api --> use eg. just Db, not Api\Db for EGroupware\Api\Db
use EGroupware\Api --> use eg. Api\Db for EGroupware\Api\Db
Modified:
trunk/egroupware/ (props changed)
trunk/egroupware/api/src/Cache.php
trunk/egroupware/api/src/Vfs.php
Propchange: trunk/egroupware/
— svn:ignore (original)
+++ svn:ignore Tue Mar 1 10:14:06 2016
@@ -3,3 +3,4 @@
.project
.swp
.swo
+Gruntfile.js.old
— trunk/egroupware/api/src/Cache.php (original)
+++ trunk/egroupware/api/src/Cache.php Tue Mar 1 10:14:06 2016
@@ -118,7 +118,7 @@
{
case self::SESSION:
case self::REQUEST:
@@ -134,13 +134,13 @@
}
return $provider->add(self::keys($level,$app,$location),$data,$expiration);
}
-
-
@param string $level use Api\Cache::(TREE|INSTANCE|SESSION|REQUEST)
-
-
@param string $level use Cache::(TREE|INSTANCE|SESSION|REQUEST)
-
@param string $app application storing data
-
@param string $location location name for data
-
@param mixed $data
@@ -170,7 +170,7 @@
}
return $provider->set(self::keys($level,$app,$location),$data,$expiration);
}
-
throw new Exception\WrongParameter(__METHOD__."() unknown level '$level'!");
}
/**
@@ -209,7 +209,7 @@
{
if (!is_null($callback))
{
@@ -246,7 +246,7 @@
}
return $data;
}
-
throw new Exception\WrongParameter(__METHOD__."() unknown level '$level'!");
}
/**
@@ -274,7 +274,7 @@
}
return $provider->delete(self::keys($level,$app,$location));
}
-
throw new Exception\WrongParameter(__METHOD__."() unknown level '$level'!");
}
/**
@@ -590,7 +590,7 @@
error_log(METHOD."(’$name’, $throw) config value NOT found!");//.function_backtrace());
}
}
@@ -729,7 +729,7 @@
*/
function __construct()
{
— trunk/egroupware/api/src/Vfs.php (original)
+++ trunk/egroupware/api/src/Vfs.php Tue Mar 1 10:14:06 2016
@@ -119,7 +119,7 @@
/**
* Reference to the global db object
*
@@ -134,7 +134,7 @@
{
if ($path[0] != ‘/’)
{
@@ -263,7 +263,7 @@
{
if ($path[0] != ‘/’)
{
@@ -758,7 +758,7 @@
*
* @param string|array $urls url or array of url’s
* @param boolean $allow_urls =false allow to use url’s, default no only pathes (to stay within the vfs)
-
-
@throws Api\Exception\AssertionFailed when trainig to remove /, /apps or /home
-
-
@throws Exception\AssertionFailed when trainig to remove /, /apps or /home
-
@return array
/
static function remove($urls,$allow_urls=false)
@@ -769,7 +769,7 @@
{
if (preg_match(’/^/?(home|apps|)/$/’,self::parse_url($url,PHP_URL_PATH)))
{
-
throw new Exception\AssertionFailed(__METHOD__.'('.array2string($urls).") Cautiously rejecting to remove folder '$url'!");
}
}
return self::find($urls,array('depth'=>true,'url'=>$allow_urls,'hidden'=>true),array(__CLASS__,'_rm_rmdir'));
@@ -869,7 +869,7 @@
// throw exception if stat array is used insead of path, can be removed soon
if (is_array($path))
{
-
throw new Api\Exception\WrongParameter('path has to be string, use check_access($path,$check,$stat=null)!');
-
throw new Exception\WrongParameter('path has to be string, use check_access($path,$check,$stat=null)!');
}
// query stat array, if not given
if (is_null($stat))
@@ -1091,7 +1091,7 @@
if (!preg_match($use=’/^([ugoa]*)([+=-]+)([rwx]+)$/’,$s,$matches))
{
$use = str_replace(array(’/’,’^’,’$’,’(’,’)’),’’,$use);
-
throw new Exception\WrongUserInput("$s is not an allowed mode, use $use !");
}
$base = (strpos($matches[3],'r') !== false ? self::READABLE : 0) |
(strpos($matches[3],'w') !== false ? self::WRITABLE : 0) |
@@ -1436,7 +1436,7 @@
$zip = new \ZipArchive();
if (!$zip->open($zip_file, \ZipArchive::OVERWRITE))
{
@@ -1648,8 +1648,8 @@
),LINE,FILE)->fetch())))
{
$owner = $row[‘lock_owner’];
-
$scope = Db::from_bool($row['lock_exclusive']) ? 'exclusive' : 'shared';
-
$type = Db::from_bool($row['lock_write']) ? 'write' : 'read';
self::$db->update(self::LOCK_TABLE,array(
'lock_expires' => $timeout,
@@ -1694,7 +1694,7 @@
),false,LINE,FILE);
$ret = true;
}
@@ -1749,10 +1749,10 @@
// ToDo: shared locks can return multiple rows
if (($result = self::$db->select(self::LOCK_TABLE,’*’,$where,LINE,FILE)->fetch()))
{
-
$result = Api\Db::strip_array_keys($result,'lock_');
-
$result['type'] = Api\Db::from_bool($result['write']) ? 'write' : 'read';
-
$result['scope'] = Api\Db::from_bool($result['exclusive']) ? 'exclusive' : 'shared';
-
$result['depth'] = Api\Db::from_bool($result['recursive']) ? 'infinite' : 0;
-
$result = Db::strip_array_keys($result,'lock_');
-
$result['type'] = Db::from_bool($result['write']) ? 'write' : 'read';
-
$result['scope'] = Db::from_bool($result['exclusive']) ? 'exclusive' : 'shared';
-
$result['depth'] = Db::from_bool($result['recursive']) ? 'infinite' : 0;
}
if ($result && $result['expires'] < time()) // lock is expired --> remove it
{
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs