From 8ca1caecbee4eff7f3959539dba9fe44131fbe97 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Thu, 30 May 2013 15:52:29 -0400 Subject: [PATCH 1/3] CC-5194: Fail to execute phone_home_stat -fixed by using native Zend autoloader --- utils/phone_home_stat.php | 90 ++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 54 deletions(-) diff --git a/utils/phone_home_stat.php b/utils/phone_home_stat.php index 3de05a8da..d09d85c49 100644 --- a/utils/phone_home_stat.php +++ b/utils/phone_home_stat.php @@ -1,4 +1,17 @@ registerNamespace('Application_'); + +$resourceLoader = new Zend_Loader_Autoloader_Resource(array( + 'basePath' => $CC_CONFIG['phpDir'].'/'.'application', + 'namespace' => 'Application', + 'resourceTypes' => array( + 'model' => array( + 'path' => 'models/', + 'namespace' => 'Model', + ), + 'common' => array( + 'path' => 'common/', + 'namespace' => 'Common', + ), + ), +)); $infoArray = Application_Model_Preference::GetSystemInfo(true); @@ -88,6 +82,7 @@ if(Application_Model_Preference::GetSupportFeedback() == '1'){ curl_close($ch); } + // Get latest version from stat server and store to db if(Application_Model_Preference::GetPlanLevel() == 'disabled'){ $url = 'http://stat.sourcefabric.org/airtime-stats/airtime_latest_version'; @@ -113,16 +108,3 @@ if(Application_Model_Preference::GetPlanLevel() == 'disabled'){ curl_close($ch); } -/** - * Ensures that the user is running this PHP script with root - * permissions. If not running with root permissions, causes the - * script to exit. - */ -function exitIfNotRoot() -{ - // Need to check that we are superuser before running this. - if(posix_geteuid() != 0){ - echo "Must be root user.\n"; - exit(1); - } -} From 891cc8006918d2e2d12daef812796b25175e1aa3 Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 30 May 2013 16:52:03 -0400 Subject: [PATCH 2/3] CC-5190 : Playlist: Copy playlist will lost cue in/out setting --- airtime_mvc/application/models/Playlist.php | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/airtime_mvc/application/models/Playlist.php b/airtime_mvc/application/models/Playlist.php index e01484d2f..23150d266 100644 --- a/airtime_mvc/application/models/Playlist.php +++ b/airtime_mvc/application/models/Playlist.php @@ -154,8 +154,6 @@ class Application_Model_Playlist implements Application_Model_LibraryEditable */ public function getContents($filterFiles=false) { - Logging::info("Getting contents for playlist {$this->id}"); - $sql = <<findPK($p_afterItem); $index = $afterItem->getDbPosition(); - Logging::info("index is {$index}"); + $pos = ($addType == 'after') ? $index + 1 : $index; $contentsToUpdate = CcPlaylistcontentsQuery::create() @@ -500,9 +503,6 @@ SQL; } - Logging::info("Adding to playlist"); - Logging::info("at position {$pos}"); - foreach ($p_items as $ac) { $res = $this->insertPlaylistElement($this->buildEntry($ac, $pos)); @@ -512,8 +512,6 @@ SQL; $db_file->setDbIsPlaylist(true)->save($this->con); $pos = $pos + 1; - Logging::info("Adding $ac[1] $ac[0]"); - } //reset the positions of the remaining items. @@ -745,7 +743,6 @@ SQL; if (!is_null($offset)) { $row->setDbTrackOffset($offset); - Logging::info("Setting offset {$offset} on item {$id}"); $row->save($this->con); } } From 2c35a0416a86fda56ddc1ed35ee12baa6657dd44 Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 30 May 2013 16:53:03 -0400 Subject: [PATCH 3/3] clrf fix --- airtime_mvc/application/models/Playlist.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/Playlist.php b/airtime_mvc/application/models/Playlist.php index 23150d266..7011a501f 100644 --- a/airtime_mvc/application/models/Playlist.php +++ b/airtime_mvc/application/models/Playlist.php @@ -437,10 +437,10 @@ SQL; } $entry["ftype"] = $objType; - $entry["fadein"] = isset($p_item['fadein']) ? + $entry["fadein"] = isset($p_item['fadein']) ? $p_item['fadein'] : $entry["fadein"]; - $entry["fadeout"] = isset($p_item['fadeout']) ? + $entry["fadeout"] = isset($p_item['fadeout']) ? $p_item['fadeout'] : $entry["fadeout"]; }