diff --git a/phpgwapi/inc/class.egw_db.inc.php b/phpgwapi/inc/class.egw_db.inc.php index 8428a147e1..8c3ec62a62 100644 --- a/phpgwapi/inc/class.egw_db.inc.php +++ b/phpgwapi/inc/class.egw_db.inc.php @@ -1892,7 +1892,7 @@ class egw_db $this->column_data_implode(',',$data,True,true,$table_def['fd']).' WHERE '.$where; } $ret = $this->query($sql,$line,$file,0,-1,$inputarr); - if ($this->Debug) echo "

db::query('$sql',$line,$file) = '$ret'

\n"; + if ($this->Debug) echo "

db::query('$sql',$line,$file)

\n"; } // if we have any blobs to update, we do so now if (($ret || !count($data)) && count($blobs2update)) diff --git a/phpgwapi/inc/class.egw_link.inc.php b/phpgwapi/inc/class.egw_link.inc.php index e48823093f..1d40485253 100644 --- a/phpgwapi/inc/class.egw_link.inc.php +++ b/phpgwapi/inc/class.egw_link.inc.php @@ -120,6 +120,7 @@ class egw_link extends solink */ static $app_register = array( 'home-accounts' => array( // user need run-rights for home + 'app' => 'home', 'name' => 'Accounts', 'icon' => 'addressbook/accounts', 'query' => 'accounts::link_query', diff --git a/phpgwapi/inc/class.egw_vfs.inc.php b/phpgwapi/inc/class.egw_vfs.inc.php index db82a925f8..f887eef94b 100644 --- a/phpgwapi/inc/class.egw_vfs.inc.php +++ b/phpgwapi/inc/class.egw_vfs.inc.php @@ -1143,6 +1143,44 @@ class egw_vfs extends vfs_stream_wrapper return sprintf('%3.1lfG',(float)$size/(1024*1024*1024)); } + /** + * Size in bytes, from human readable + * + * From PHP ini_get docs, Ivo Mandalski 15-Nov-2011 08:27 + */ + static function int_size($val) + { + if(empty($val))return 0; + + $val = trim($val); + + preg_match('#([0-9]+)[\s]*([a-z]+)#i', $val, $matches); + + $last = ''; + if(isset($matches[2])){ + $last = $matches[2]; + } + + if(isset($matches[1])){ + $val = (int) $matches[1]; + } + + switch (strtolower($last)) + { + case 'g': + case 'gb': + $val *= 1024; + case 'm': + case 'mb': + $val *= 1024; + case 'k': + case 'kb': + $val *= 1024; + } + + return (int) $val; + } + /** * like basename($path), but also working if the 1. char of the basename is non-ascii *