diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-07-03 14:06:40 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-07-03 18:00:16 +0200 |
commit | d3ac73c0c9419750c65d3ccb8f0b0c25edacf34f (patch) | |
tree | 6517676c49da188ae4ee832245236fe0e1e25cf3 /lib/private/setup | |
parent | 68fd74963eda73fe0e3173cde495c284ea1fd8f4 (diff) | |
download | nextcloud-server-d3ac73c0c9419750c65d3ccb8f0b0c25edacf34f.tar.gz nextcloud-server-d3ac73c0c9419750c65d3ccb8f0b0c25edacf34f.zip |
Remove OC_Log
Diffstat (limited to 'lib/private/setup')
-rw-r--r-- | lib/private/setup/mssql.php | 20 | ||||
-rw-r--r-- | lib/private/setup/mysql.php | 2 | ||||
-rw-r--r-- | lib/private/setup/oci.php | 22 | ||||
-rw-r--r-- | lib/private/setup/postgresql.php | 10 |
4 files changed, 27 insertions, 27 deletions
diff --git a/lib/private/setup/mssql.php b/lib/private/setup/mssql.php index f8815259af4..0ae02d6cbcc 100644 --- a/lib/private/setup/mssql.php +++ b/lib/private/setup/mssql.php @@ -66,7 +66,7 @@ class MSSQL extends AbstractDatabase { $entry = ''; } $entry.='Offending command was: '.$query.'<br />'; - \OC_Log::write('setup.mssql', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.mssql', $entry, \OCP\Util::WARN); } else { $row = sqlsrv_fetch_array($result); @@ -77,7 +77,7 @@ class MSSQL extends AbstractDatabase { $entry = ''; } $entry.='Offending command was: '.$query.'<br />'; - \OC_Log::write('setup.mssql', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.mssql', $entry, \OCP\Util::WARN); } else { if ($row == null) { $query = "CREATE LOGIN [".$this->dbuser."] WITH PASSWORD = '".$this->dbpassword."';"; @@ -89,7 +89,7 @@ class MSSQL extends AbstractDatabase { $entry = ''; } $entry.='Offending command was: '.$query.'<br />'; - \OC_Log::write('setup.mssql', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.mssql', $entry, \OCP\Util::WARN); } } } @@ -106,7 +106,7 @@ class MSSQL extends AbstractDatabase { $entry = ''; } $entry.='Offending command was: '.$query.'<br />'; - \OC_Log::write('setup.mssql', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.mssql', $entry, \OCP\Util::WARN); } else { $row = sqlsrv_fetch_array($result); @@ -117,7 +117,7 @@ class MSSQL extends AbstractDatabase { $entry = ''; } $entry.='Offending command was: '.$query.'<br />'; - \OC_Log::write('setup.mssql', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.mssql', $entry, \OCP\Util::WARN); } else { if ($row == null) { $query = "USE [".$this->dbname."]; CREATE USER [".$this->dbuser."] FOR LOGIN [".$this->dbuser."];"; @@ -129,7 +129,7 @@ class MSSQL extends AbstractDatabase { $entry = ''; } $entry.='Offending command was: '.$query.'<br />'; - \OC_Log::write('setup.mssql', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.mssql', $entry, \OCP\Util::WARN); } } @@ -142,7 +142,7 @@ class MSSQL extends AbstractDatabase { $entry = ''; } $entry.='Offending command was: '.$query.'<br />'; - \OC_Log::write('setup.mssql', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.mssql', $entry, \OCP\Util::WARN); } } } @@ -158,7 +158,7 @@ class MSSQL extends AbstractDatabase { $entry = ''; } $entry.='Offending command was: '.$query.'<br />'; - \OC_Log::write('setup.mssql', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.mssql', $entry, \OCP\Util::WARN); } } @@ -179,7 +179,7 @@ class MSSQL extends AbstractDatabase { $entry = ''; } $entry.='Offending command was: '.$query.'<br />'; - \OC_Log::write('setup.mssql', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.mssql', $entry, \OCP\Util::WARN); } else { $row = sqlsrv_fetch_array($result); @@ -190,7 +190,7 @@ class MSSQL extends AbstractDatabase { $entry = ''; } $entry.='Offending command was: '.$query.'<br />'; - \OC_Log::write('setup.mssql', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.mssql', $entry, \OCP\Util::WARN); } else { if ($row == null) { \OC_DB::createDbFromStructure($this->dbDefinitionFile); diff --git a/lib/private/setup/mysql.php b/lib/private/setup/mysql.php index b9246a915a6..c01ff724b80 100644 --- a/lib/private/setup/mysql.php +++ b/lib/private/setup/mysql.php @@ -103,7 +103,7 @@ class MySQL extends AbstractDatabase { if(!$result) { $entry = $this->trans->t('DB Error: "%s"', array(mysql_error($connection))) . '<br />'; $entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />'; - \OC_Log::write('setup.mssql', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.mssql', $entry, \OCP\Util::WARN); } $query="GRANT ALL PRIVILEGES ON `$name` . * TO '$user'"; diff --git a/lib/private/setup/oci.php b/lib/private/setup/oci.php index 791dc7232f5..d46d5529da0 100644 --- a/lib/private/setup/oci.php +++ b/lib/private/setup/oci.php @@ -66,7 +66,7 @@ class OCI extends AbstractDatabase { } else { $easy_connect_string = '//'.$e_host.'/'.$e_dbname; } - \OC_Log::write('setup oracle', 'connect string: ' . $easy_connect_string, \OC_Log::DEBUG); + \OCP\Util::writeLog('setup oracle', 'connect string: ' . $easy_connect_string, \OCP\Util::DEBUG); $connection = @oci_connect($this->dbuser, $this->dbpassword, $easy_connect_string); if(!$connection) { $errorMessage = $this->getLastError(); @@ -93,7 +93,7 @@ class OCI extends AbstractDatabase { if (!$stmt) { $entry = $this->trans->t('DB Error: "%s"', array($this->getLastError($connection))) . '<br />'; $entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />'; - \OC_Log::write('setup.oci', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.oci', $entry, \OCP\Util::WARN); } $result = oci_execute($stmt); if($result) { @@ -155,7 +155,7 @@ class OCI extends AbstractDatabase { if (!$stmt) { $entry = $this->trans->t('DB Error: "%s"', array($this->getLastError($connection))) . '<br />'; $entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />'; - \OC_Log::write('setup.oci', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.oci', $entry, \OCP\Util::WARN); } $result = oci_execute($stmt); @@ -178,14 +178,14 @@ class OCI extends AbstractDatabase { if (!$stmt) { $entry = $this->trans->t('DB Error: "%s"', array($this->getLastError($connection))) . '<br />'; $entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />'; - \OC_Log::write('setup.oci', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.oci', $entry, \OCP\Util::WARN); } oci_bind_by_name($stmt, ':un', $name); $result = oci_execute($stmt); if(!$result) { $entry = $this->trans->t('DB Error: "%s"', array($this->getLastError($connection))) . '<br />'; $entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />'; - \OC_Log::write('setup.oci', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.oci', $entry, \OCP\Util::WARN); } if(! oci_fetch_row($stmt)) { @@ -196,7 +196,7 @@ class OCI extends AbstractDatabase { if (!$stmt) { $entry = $this->trans->t('DB Error: "%s"', array($this->getLastError($connection))) . '<br />'; $entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />'; - \OC_Log::write('setup.oci', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.oci', $entry, \OCP\Util::WARN); } //oci_bind_by_name($stmt, ':un', $name); $result = oci_execute($stmt); @@ -204,7 +204,7 @@ class OCI extends AbstractDatabase { $entry = $this->trans->t('DB Error: "%s"', array($this->getLastError($connection))) . '<br />'; $entry .= $this->trans->t('Offending command was: "%s", name: %s, password: %s', array($query, $name, $password)) . '<br />'; - \OC_Log::write('setup.oci', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.oci', $entry, \OCP\Util::WARN); } } else { // change password of the existing role $query = "ALTER USER :un IDENTIFIED BY :pw"; @@ -212,7 +212,7 @@ class OCI extends AbstractDatabase { if (!$stmt) { $entry = $this->trans->t('DB Error: "%s"', array($this->getLastError($connection))) . '<br />'; $entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />'; - \OC_Log::write('setup.oci', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.oci', $entry, \OCP\Util::WARN); } oci_bind_by_name($stmt, ':un', $name); oci_bind_by_name($stmt, ':pw', $password); @@ -220,7 +220,7 @@ class OCI extends AbstractDatabase { if(!$result) { $entry = $this->trans->t('DB Error: "%s"', array($this->getLastError($connection))) . '<br />'; $entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />'; - \OC_Log::write('setup.oci', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.oci', $entry, \OCP\Util::WARN); } } // grant necessary roles @@ -229,14 +229,14 @@ class OCI extends AbstractDatabase { if (!$stmt) { $entry = $this->trans->t('DB Error: "%s"', array($this->getLastError($connection))) . '<br />'; $entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />'; - \OC_Log::write('setup.oci', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.oci', $entry, \OCP\Util::WARN); } $result = oci_execute($stmt); if(!$result) { $entry = $this->trans->t('DB Error: "%s"', array($this->getLastError($connection))) . '<br />'; $entry .= $this->trans->t('Offending command was: "%s", name: %s, password: %s', array($query, $name, $password)) . '<br />'; - \OC_Log::write('setup.oci', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.oci', $entry, \OCP\Util::WARN); } } diff --git a/lib/private/setup/postgresql.php b/lib/private/setup/postgresql.php index 597e38f43a6..c8fd3b98fe4 100644 --- a/lib/private/setup/postgresql.php +++ b/lib/private/setup/postgresql.php @@ -118,7 +118,7 @@ class PostgreSQL extends AbstractDatabase { if(!$result) { $entry = $this->trans->t('DB Error: "%s"', array(pg_last_error($connection))) . '<br />'; $entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />'; - \OC_Log::write('setup.pg', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.pg', $entry, \OCP\Util::WARN); } if(! pg_fetch_row($result)) { //The database does not exists... let's create it @@ -127,7 +127,7 @@ class PostgreSQL extends AbstractDatabase { if(!$result) { $entry = $this->trans->t('DB Error: "%s"', array(pg_last_error($connection))) . '<br />'; $entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />'; - \OC_Log::write('setup.pg', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.pg', $entry, \OCP\Util::WARN); } else { $query = "REVOKE ALL PRIVILEGES ON DATABASE \"$e_name\" FROM PUBLIC"; @@ -144,7 +144,7 @@ class PostgreSQL extends AbstractDatabase { if(!$result) { $entry = $this->trans->t('DB Error: "%s"', array(pg_last_error($connection))) . '<br />'; $entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />'; - \OC_Log::write('setup.pg', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.pg', $entry, \OCP\Util::WARN); } if(! pg_fetch_row($result)) { @@ -154,7 +154,7 @@ class PostgreSQL extends AbstractDatabase { if(!$result) { $entry = $this->trans->t('DB Error: "%s"', array(pg_last_error($connection))) . '<br />'; $entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />'; - \OC_Log::write('setup.pg', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.pg', $entry, \OCP\Util::WARN); } } else { // change password of the existing role @@ -163,7 +163,7 @@ class PostgreSQL extends AbstractDatabase { if(!$result) { $entry = $this->trans->t('DB Error: "%s"', array(pg_last_error($connection))) . '<br />'; $entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />'; - \OC_Log::write('setup.pg', $entry, \OC_Log::WARN); + \OCP\Util::writeLog('setup.pg', $entry, \OCP\Util::WARN); } } } |