aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Karlitschek <karlitschek@kde.org>2011-04-16 20:35:15 +0200
committerFrank Karlitschek <karlitschek@kde.org>2011-04-16 20:35:15 +0200
commitfb74de326d9bb9b8b215f2f819c9aa7bd56a2438 (patch)
treee33b176ccfbbc114279e68cffcb0fb03d85ea14d
parent1372d8339d78c01b1514708f26520e244cc991e2 (diff)
parentbf45dcb959a4afbfcfb158dea55acf3804c49ea9 (diff)
downloadnextcloud-server-fb74de326d9bb9b8b215f2f819c9aa7bd56a2438.tar.gz
nextcloud-server-fb74de326d9bb9b8b215f2f819c9aa7bd56a2438.zip
Merge branch 'refactoring' of git.kde.org:owncloud into refactoring
-rw-r--r--3dparty/MDB2.php26
-rw-r--r--3dparty/MDB2/Driver/mysql.php2
-rw-r--r--3dparty/PEAR.php2
-rw-r--r--lib/base.php5
4 files changed, 17 insertions, 18 deletions
diff --git a/3dparty/MDB2.php b/3dparty/MDB2.php
index c07545588dc..ac54aabb6c6 100644
--- a/3dparty/MDB2.php
+++ b/3dparty/MDB2.php
@@ -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__);
diff --git a/3dparty/MDB2/Driver/mysql.php b/3dparty/MDB2/Driver/mysql.php
index 091c479d194..b9b46c0d762 100644
--- a/3dparty/MDB2/Driver/mysql.php
+++ b/3dparty/MDB2/Driver/mysql.php
@@ -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')) {
diff --git a/3dparty/PEAR.php b/3dparty/PEAR.php
index d5c9635a501..9760b9d265a 100644
--- a/3dparty/PEAR.php
+++ b/3dparty/PEAR.php
@@ -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)) {
diff --git a/lib/base.php b/lib/base.php
index 8504518dbfb..9fc9d57f7ae 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -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);
}