code cleanup

-user proper method for checking null
-reduce line length to 80 chars
This commit is contained in:
Martin Konecny 2013-05-10 12:37:25 -04:00
parent f5fa033207
commit c36333ae07
1 changed files with 7 additions and 2 deletions

View File

@ -195,7 +195,7 @@ SQL;
$exist_dir = self::getDirByPath($p_path); $exist_dir = self::getDirByPath($p_path);
if ($exist_dir == NULL) { if (is_null($exist_dir)) {
$temp_dir = new CcMusicDirs(); $temp_dir = new CcMusicDirs();
$dir = new Application_Model_MusicDir($temp_dir); $dir = new Application_Model_MusicDir($temp_dir);
} else { } else {
@ -228,7 +228,12 @@ SQL;
return array("code"=>1, "error"=>"$msg"); return array("code"=>1, "error"=>"$msg");
} catch (Exception $e) { } catch (Exception $e) {
return array("code"=>1, return array("code"=>1,
"error"=>sprintf(_("%s is already set as the current storage dir or in the watched folders list"), $p_path)); "error" => sprintf(
_("%s is already set as the current storage dir or in the".
" watched folders list"),
$p_path
)
);
} }
} }