Refactor override preference

Properly defaults the preference to be true and always return a boolean value since that is what celery will be expecting.
This commit is contained in:
Lucas Bickel 2017-03-17 02:10:04 +01:00
parent fefc53c000
commit ae4c9203e6
3 changed files with 22 additions and 18 deletions

View file

@ -358,8 +358,7 @@ class Application_Model_Preference
{
self::setValue("third_party_api", $bool);
}
public static function GetAllow3rdPartyApi()
{
$val = self::getValue("third_party_api");
@ -374,11 +373,9 @@ class Application_Model_Preference
public static function GetPodcastAlbumOverride()
{
$val = self::getValue("podcast_album_override");
return (strlen($val) == 0 ) ? "1" : $val;
return $val === '1' ? true : false;
}
public static function SetPhone($phone)
{
self::setValue("phone", $phone);