Merge branch 'refactoring' of git.kde.org:owncloud into refactoring

This commit is contained in:
Frank Karlitschek 2011-04-16 20:35:15 +02:00
commit fb74de326d
4 changed files with 17 additions and 18 deletions

View file

@ -279,7 +279,7 @@ class MDB2
*
* @access public
*/
function setOptions(&$db, $options)
static function setOptions(&$db, $options)
{
if (is_array($options)) {
foreach ($options as $option => $value) {
@ -304,7 +304,7 @@ class MDB2
* @static
* @access public
*/
function classExists($classname)
static function classExists($classname)
{
if (version_compare(phpversion(), "5.0", ">=")) {
return class_exists($classname, false);
@ -325,7 +325,7 @@ class MDB2
*
* @access public
*/
function loadClass($class_name, $debug)
static function loadClass($class_name, $debug)
{
if (!MDB2::classExists($class_name)) {
$file_name = str_replace('_', DIRECTORY_SEPARATOR, $class_name).'.php';
@ -374,7 +374,7 @@ class MDB2
*
* @access public
*/
function &factory($dsn, $options = false)
static function factory($dsn, $options = false)
{
$dsninfo = MDB2::parseDSN($dsn);
if (empty($dsninfo['phptype'])) {
@ -390,7 +390,7 @@ class MDB2
return $err;
}
$db =& new $class_name();
$db =new $class_name();
$db->setDSN($dsninfo);
$err = MDB2::setOptions($db, $options);
if (PEAR::isError($err)) {
@ -516,7 +516,7 @@ class MDB2
* @param array $arr2
* @return boolean
*/
function areEquals($arr1, $arr2)
static function areEquals($arr1, $arr2)
{
if (count($arr1) != count($arr2)) {
return false;
@ -686,7 +686,7 @@ class MDB2
*
* @access public
*/
function isResultCommon($value)
static function isResultCommon($value)
{
return is_a($value, 'MDB2_Result_Common');
}
@ -723,7 +723,7 @@ class MDB2
*
* @access public
*/
function errorMessage($value = null)
static function errorMessage($value = null)
{
static $errorMessages;
@ -824,7 +824,7 @@ class MDB2
* @access public
* @author Tomas V.V.Cox <cox@idecnet.com>
*/
function parseDSN($dsn)
static function parseDSN($dsn)
{
$parsed = $GLOBALS['_MDB2_dsninfo_default'];
@ -954,7 +954,7 @@ class MDB2
*
* @access public
*/
function fileExists($file)
static function fileExists($file)
{
// safe_mode does notwork with is_readable()
global $SERVERROOT;
@ -1498,7 +1498,7 @@ class MDB2_Driver_Common extends PEAR
}
}
$err =& PEAR::raiseError(null, $code, $mode, $options, $userinfo, 'MDB2_Error', true);
$err = PEAR::raiseError(null, $code, $mode, $options, $userinfo, 'MDB2_Error', true);
if ($err->getMode() !== PEAR_ERROR_RETURN
&& isset($this->nested_transaction_counter) && !$this->has_transaction_error) {
$this->has_transaction_error =& $err;
@ -2097,7 +2097,7 @@ class MDB2_Driver_Common extends PEAR
* @access public
* @since 2.1.1
*/
function setTransactionIsolation($isolation, $options = array())
static function setTransactionIsolation($isolation, $options = array())
{
$this->debug('Setting transaction isolation level', __FUNCTION__, array('is_manip' => true));
return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
@ -2647,7 +2647,7 @@ class MDB2_Driver_Common extends PEAR
'result class does not exist '.$class_name, __FUNCTION__);
return $err;
}
$result =& new $class_name($this, $result, $limit, $offset);
$result =new $class_name($this, $result, $limit, $offset);
if (!MDB2::isResultCommon($result)) {
$err =& $this->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
'result class is not extended from MDB2_Result_Common', __FUNCTION__);

View file

@ -462,7 +462,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
* @access public
* @since 2.1.1
*/
function setTransactionIsolation($isolation)
static function setTransactionIsolation($isolation, $options = array())
{
$this->debug('Setting transaction isolation level', __FUNCTION__, array('is_manip' => true));
if (!$this->supports('transactions')) {

View file

@ -247,7 +247,7 @@ class PEAR
* @access public
* @return bool true if parameter is an error
*/
function isError($data, $code = null)
static function isError($data, $code = null)
{
if (is_a($data, 'PEAR_Error')) {
if (is_null($code)) {

View file

@ -23,8 +23,7 @@
// set some stuff
//ob_start();
// error_reporting(E_ALL | E_STRICT);
error_reporting( E_ERROR | E_PARSE | E_WARNING ); // MDB2 gives loads of strict error, disabling for now
error_reporting(E_ALL | E_STRICT);
date_default_timezone_set('Europe/Berlin');
ini_set('arg_separator.output','&amp;');
@ -305,7 +304,7 @@ class OC_UTIL {
}else{
//TODO: premisions checks for windows hosts
}
if(!is_writable($CONFIG_DATADIRECTORY_ROOT)){
if(is_dir($CONFIG_DATADIRECTORY_ROOT) and !is_writable($CONFIG_DATADIRECTORY_ROOT)){
$errors[]=array('error'=>'Data directory ('.$CONFIG_DATADIRECTORY_ROOT.') not writable by ownCloud<br/>','hint'=>$permissionsHint);
}