summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-09-22 19:24:32 +0200
committerFlorian Pritz <bluewind@xinu.at>2011-09-24 18:41:47 +0200
commit8648e3c43c26da898c17798f89d60c9505d149b3 (patch)
tree34e10780eca9ec004900163f958f79192a0f226c /apps
parent9c550e8e9f52efa9c117ef1b577386e555010547 (diff)
downloadnextcloud-server-8648e3c43c26da898c17798f89d60c9505d149b3.tar.gz
nextcloud-server-8648e3c43c26da898c17798f89d60c9505d149b3.zip
only call error_log() if DEBUG is true
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'apps')
-rw-r--r--apps/files_publiclink/lib_public.php2
-rw-r--r--apps/media/ajax/autoupdate.php4
-rw-r--r--apps/media/lib_ampache.php2
-rw-r--r--apps/media/lib_media.php2
-rw-r--r--apps/media/lib_scanner.php8
-rw-r--r--apps/media/server/xml.server.php2
-rw-r--r--apps/unhosted/lib_unhosted.php8
-rw-r--r--apps/user_openid/appinfo/app.php14
-rw-r--r--apps/user_openid/phpmyid.php8
-rw-r--r--apps/user_openid/user.php2
10 files changed, 26 insertions, 26 deletions
diff --git a/apps/files_publiclink/lib_public.php b/apps/files_publiclink/lib_public.php
index ece0a540d39..f895615380d 100644
--- a/apps/files_publiclink/lib_public.php
+++ b/apps/files_publiclink/lib_public.php
@@ -14,7 +14,7 @@ class OC_PublicLink{
if( PEAR::isError($result)) {
$entry = 'DB Error: "'.$result->getMessage().'"<br />';
$entry .= 'Offending command was: '.$result->getDebugInfo().'<br />';
- error_log( $entry );
+ if(defined("DEBUG") && DEBUG) {error_log( $entry );}
die( $entry );
}
$this->token=$token;
diff --git a/apps/media/ajax/autoupdate.php b/apps/media/ajax/autoupdate.php
index ded1fd02bc3..ac3d0650b4b 100644
--- a/apps/media/ajax/autoupdate.php
+++ b/apps/media/ajax/autoupdate.php
@@ -29,9 +29,9 @@ $RUNTIME_NOSETUPFS=true;
require_once('../../../lib/base.php');
-error_log($_GET['autoupdate']);
+if(defined("DEBUG") && DEBUG) {error_log($_GET['autoupdate']);}
$autoUpdate=(isset($_GET['autoupdate']) and $_GET['autoupdate']=='true');
-error_log((integer)$autoUpdate);
+if(defined("DEBUG") && DEBUG) {error_log((integer)$autoUpdate);}
OC_Preferences::setValue(OC_User::getUser(),'media','autoupdate',(integer)$autoUpdate);
diff --git a/apps/media/lib_ampache.php b/apps/media/lib_ampache.php
index dc88e35a697..87291958af3 100644
--- a/apps/media/lib_ampache.php
+++ b/apps/media/lib_ampache.php
@@ -195,7 +195,7 @@ class OC_MEDIA_AMPACHE{
$filter=isset($params['filter'])?$params['filter']:'';
$exact=isset($params['exact'])?($params['exact']=='true'):false;
$artists=OC_MEDIA_COLLECTION::getArtists($filter,$exact);
- error_log('artists found: '.print_r($artists,true));
+ if(defined("DEBUG") && DEBUG) {error_log('artists found: '.print_r($artists,true));}
echo('<root>');
foreach($artists as $artist){
self::printArtist($artist);
diff --git a/apps/media/lib_media.php b/apps/media/lib_media.php
index 3086f84a93a..1d8321a774c 100644
--- a/apps/media/lib_media.php
+++ b/apps/media/lib_media.php
@@ -37,7 +37,7 @@ class OC_MEDIA{
*/
public static function loginListener($params){
if(isset($_POST['user']) and $_POST['password']){
- error_log('postlogin');
+ if(defined("DEBUG") && DEBUG) {error_log('postlogin');}
$name=$_POST['user'];
$query=OC_DB::prepare("SELECT user_id from *PREFIX*media_users WHERE user_id LIKE ?");
$uid=$query->execute(array($name))->fetchAll();
diff --git a/apps/media/lib_scanner.php b/apps/media/lib_scanner.php
index c774c3c9fdb..9bf9397b19a 100644
--- a/apps/media/lib_scanner.php
+++ b/apps/media/lib_scanner.php
@@ -97,25 +97,25 @@ class OC_MEDIA_SCANNER{
$data=@self::$getID3->analyze($file);
getid3_lib::CopyTagsToComments($data);
if(!isset($data['comments'])){
- error_log("error reading id3 tags in '$file'");
+ if(defined("DEBUG") && DEBUG) {error_log("error reading id3 tags in '$file'");}
return;
}
if(!isset($data['comments']['artist'])){
- error_log("error reading artist tag in '$file'");
+ if(defined("DEBUG") && DEBUG) {error_log("error reading artist tag in '$file'");}
$artist='unknown';
}else{
$artist=stripslashes($data['comments']['artist'][0]);
$artist=utf8_encode($artist);
}
if(!isset($data['comments']['album'])){
- error_log("error reading album tag in '$file'");
+ if(defined("DEBUG") && DEBUG) {error_log("error reading album tag in '$file'");}
$album='unknown';
}else{
$album=stripslashes($data['comments']['album'][0]);
$album=utf8_encode($album);
}
if(!isset($data['comments']['title'])){
- error_log("error reading title tag in '$file'");
+ if(defined("DEBUG") && DEBUG) {error_log("error reading title tag in '$file'");}
$title='unknown';
}else{
$title=stripslashes($data['comments']['title'][0]);
diff --git a/apps/media/server/xml.server.php b/apps/media/server/xml.server.php
index e61fadf234c..387c3480047 100644
--- a/apps/media/server/xml.server.php
+++ b/apps/media/server/xml.server.php
@@ -36,7 +36,7 @@ foreach($arguments as &$argument){
}
ob_clean();
if(isset($arguments['action'])){
- error_log($arguments['action']);
+ if(defined("DEBUG") && DEBUG) {error_log($arguments['action']);}
switch($arguments['action']){
case 'url_to_song':
OC_MEDIA_AMPACHE::url_to_song($arguments);
diff --git a/apps/unhosted/lib_unhosted.php b/apps/unhosted/lib_unhosted.php
index 59dc380c45c..484f469f0ed 100644
--- a/apps/unhosted/lib_unhosted.php
+++ b/apps/unhosted/lib_unhosted.php
@@ -7,7 +7,7 @@ class OC_UnhostedWeb {
if( PEAR::isError($result)) {
$entry = 'DB Error: "'.$result->getMessage().'"<br />';
$entry .= 'Offending command was: '.$result->getDebugInfo().'<br />';
- error_log( $entry );
+ if(defined("DEBUG") && DEBUG) {error_log( $entry );}
die( $entry );
}
$ret = array();
@@ -24,7 +24,7 @@ class OC_UnhostedWeb {
if( PEAR::isError($result)) {
$entry = 'DB Error: "'.$result->getMessage().'"<br />';
$entry .= 'Offending command was: '.$result->getDebugInfo().'<br />';
- error_log( $entry );
+ if(defined("DEBUG") && DEBUG) {error_log( $entry );}
die( $entry );
}
$ret = array();
@@ -45,7 +45,7 @@ class OC_UnhostedWeb {
if( PEAR::isError($result)) {
$entry = 'DB Error: "'.$result->getMessage().'"<br />';
$entry .= 'Offending command was: '.$result->getDebugInfo().'<br />';
- error_log( $entry );
+ if(defined("DEBUG") && DEBUG) {error_log( $entry );}
die( $entry );
}
}
@@ -56,7 +56,7 @@ class OC_UnhostedWeb {
if( PEAR::isError($result)) {
$entry = 'DB Error: "'.$result->getMessage().'"<br />';
$entry .= 'Offending command was: '.$result->getDebugInfo().'<br />';
- error_log( $entry );
+ if(defined("DEBUG") && DEBUG) {error_log( $entry );}
die( $entry );
}
}
diff --git a/apps/user_openid/appinfo/app.php b/apps/user_openid/appinfo/app.php
index 578f8f4dade..546f9f4565a 100644
--- a/apps/user_openid/appinfo/app.php
+++ b/apps/user_openid/appinfo/app.php
@@ -26,14 +26,14 @@ OC_User::useBackend('openid');
//check for results from openid requests
if(isset($_GET['openid_mode']) and $_GET['openid_mode'] == 'id_res'){
- error_log('openid retured');
+ if(defined("DEBUG") && DEBUG) {error_log('openid retured');}
$openid = new SimpleOpenID;
$openid->SetIdentity($_GET['openid_identity']);
$openid_validation_result = $openid->ValidateWithServer();
if ($openid_validation_result == true){ // OK HERE KEY IS VALID
- error_log('auth sucessfull');
+ if(defined("DEBUG") && DEBUG) {error_log('auth sucessfull');}
$identity=$openid->GetIdentity();
- error_log("auth as $identity");
+ if(defined("DEBUG") && DEBUG) {error_log("auth as $identity");}
$user=OC_USER_OPENID::findUserForIdentity($identity);
if($user){
$_SESSION['user_id']=$user;
@@ -41,13 +41,13 @@ if(isset($_GET['openid_mode']) and $_GET['openid_mode'] == 'id_res'){
}
}else if($openid->IsError() == true){ // ON THE WAY, WE GOT SOME ERROR
$error = $openid->GetError();
- error_log("ERROR CODE: " . $error['code']);
- error_log("ERROR DESCRIPTION: " . $error['description']);
+ if(defined("DEBUG") && DEBUG) {error_log("ERROR CODE: " . $error['code']);}
+ if(defined("DEBUG") && DEBUG) {error_log("ERROR DESCRIPTION: " . $error['description']);}
}else{ // Signature Verification Failed
- error_log("INVALID AUTHORIZATION");
+ if(defined("DEBUG") && DEBUG) {error_log("INVALID AUTHORIZATION");}
}
}else if (isset($_GET['openid_mode']) and $_GET['openid_mode'] == 'cancel'){ // User Canceled your Request
- error_log("USER CANCELED REQUEST");
+ if(defined("DEBUG") && DEBUG) {error_log("USER CANCELED REQUEST");}
return false;
}
diff --git a/apps/user_openid/phpmyid.php b/apps/user_openid/phpmyid.php
index 24fab44ca7a..09538b61ab1 100644
--- a/apps/user_openid/phpmyid.php
+++ b/apps/user_openid/phpmyid.php
@@ -1054,7 +1054,7 @@ function debug ($x, $m = null) {
$x .= "\n";
}
- error_log($x . "\n", 3, $profile['logfile']);
+ if(defined("DEBUG") && DEBUG) {error_log($x . "\n", 3, $profile['logfile']);}
}
@@ -1501,7 +1501,7 @@ function wrap_html ( $message ) {
</body>
</html>
';
- error_log($html);
+ if(defined("DEBUG") && DEBUG) {error_log($html);}
echo $html;
exit(0);
}
@@ -1653,8 +1653,8 @@ $profile['req_url'] = sprintf("%s://%s%s",
// $profile['req_url']=str_replace($incompleteId,$fullId,$profile['req_url']);
// }
-// error_log('inc id: '.$fullId);
-// error_log('req url: '.$profile['req_url']);
+// if(defined("DEBUG") && DEBUG) {error_log('inc id: '.$fullId);}
+// if(defined("DEBUG") && DEBUG) {error_log('req url: '.$profile['req_url']);}
// Set the default allowance for testing
if (! array_key_exists('allow_test', $profile))
diff --git a/apps/user_openid/user.php b/apps/user_openid/user.php
index 60e12ed88e0..d90e0b71900 100644
--- a/apps/user_openid/user.php
+++ b/apps/user_openid/user.php
@@ -39,7 +39,7 @@ $RUNTIME_NOAPPS=false;
require_once '../../lib/base.php';
if(!OC_User::userExists($USERNAME)){
- error_log($USERNAME.' doesn\'t exist');
+ if(defined("DEBUG") && DEBUG) {error_log($USERNAME.' doesn\'t exist');}
$USERNAME='';
}
$IDENTITY=OC_Helper::linkTo( "user_openid", "user.php", null, true ).'/'.$USERNAME;