summaryrefslogtreecommitdiffstats
path: root/apps/media
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/media
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/media')
-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
5 files changed, 9 insertions, 9 deletions
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);