From e537255e277a1f53ba9030bf5cc1f672b917dfbd Mon Sep 17 00:00:00 2001 From: "paul.baranowski" Date: Fri, 10 Sep 2010 15:49:35 -0400 Subject: [PATCH] Apparently we do need the StationPrefs group. Since the group name was hard-coded in everywhere, I didnt detect that this value was used in the app. I changed the hard-coded values to use the value from the config file instead. Fixed the Transport.php::xmlrpcCall() function, an object was not being created before it was used. Fixed the archive server URLs in the default config files. --- src/modules/htmlUI/var/ui_base.inc.php | 23 ++--- src/modules/htmlUI/var/ui_browser.class.php | 3 +- src/modules/htmlUI/var/ui_handler.class.php | 7 +- src/modules/htmlUI/var/ui_twitter.class.php | 83 ++++++++++--------- src/modules/storageServer/var/BasicStor.php | 36 ++++---- src/modules/storageServer/var/GreenBox.php | 4 +- src/modules/storageServer/var/Prefs.php | 14 ++-- src/modules/storageServer/var/Transport.php | 34 ++++---- src/modules/storageServer/var/conf.php | 4 +- .../storageServer/var/conf.php.template | 4 +- .../storageServer/var/conf_only.php.template | 4 +- .../storageServer/var/install/install.php | 2 +- .../storageServer/var/xmlrpc/XR_LocStor.php | 2 +- 13 files changed, 115 insertions(+), 105 deletions(-) diff --git a/src/modules/htmlUI/var/ui_base.inc.php b/src/modules/htmlUI/var/ui_base.inc.php index bf4c26efd..c5fbaa53a 100644 --- a/src/modules/htmlUI/var/ui_base.inc.php +++ b/src/modules/htmlUI/var/ui_base.inc.php @@ -311,17 +311,18 @@ class uiBase */ public function loadStationPrefs(&$mask, $reload=FALSE) { + global $CC_CONFIG; if (!is_array($this->STATIONPREFS) || ($reload === TRUE) ) { $this->STATIONPREFS = array(); foreach ($mask as $key => $val) { if (isset($val['isPref']) && $val['isPref']) { - $setting = $this->gb->loadGroupPref(NULL, 'StationPrefs', $val['element']); + $setting = $this->gb->loadGroupPref($CC_CONFIG['StationPrefsGr'], $val['element']); if (is_string($setting)) { $this->STATIONPREFS[$val['element']] = $setting; } elseif ($val['required']) { // set default values on first login $default = isset($val['default'])?$val['default']:null; - $this->gb->saveGroupPref($this->sessid, 'StationPrefs', $val['element'], $default); + $this->gb->saveGroupPref($this->sessid, $CC_CONFIG['StationPrefsGr'], $val['element'], $default); $this->STATIONPREFS[$val['element']] = $default; } } @@ -529,24 +530,24 @@ class uiBase public function getMetaInfo($id) { $type = strtolower(GreenBox::getFileType($id)); - + if($type == 'playlist') { require_once("../../../storageServer/var/Playlist.php"); - + $playList = new Playlist(GreenBox::GunidFromId($id)); $playListData = $playList->export(); - + for ($i = 1; $i < count($playListData); $i++) { - - $entry = StoredFile::RecallByGunid($playListData["".$i]["gunid"]); + + $entry = StoredFile::RecallByGunid($playListData["".$i]["gunid"]); $playListEntries[] = $entry->getName(); - + } - + $_SESSION['mdata'] = $playListEntries; - + } - + $data = array('id' => $id, 'gunid' => BasicStor::GunidFromId($id), 'title' => $this->getMetadataValue($id, UI_MDATA_KEY_TITLE), diff --git a/src/modules/htmlUI/var/ui_browser.class.php b/src/modules/htmlUI/var/ui_browser.class.php index c889f81b9..02bd35642 100644 --- a/src/modules/htmlUI/var/ui_browser.class.php +++ b/src/modules/htmlUI/var/ui_browser.class.php @@ -296,10 +296,11 @@ class uiBrowser extends uiBase { function changeStationPrefs(&$mask) { + global $CC_CONFIG; $form = new HTML_QuickForm('changeStationPrefs', UI_STANDARD_FORM_METHOD, UI_HANDLER); foreach($mask as $key => $val) { $element = isset($val['element']) ? $val['element'] : null; - $p = $this->gb->loadGroupPref($this->sessid, 'StationPrefs', $element); + $p = $this->gb->loadGroupPref($CC_CONFIG['StationPrefsGr'], $element); if (is_string($p)) { $mask[$key]['default'] = $p; } diff --git a/src/modules/htmlUI/var/ui_handler.class.php b/src/modules/htmlUI/var/ui_handler.class.php index 6f57425ce..fb6b9e9df 100644 --- a/src/modules/htmlUI/var/ui_handler.class.php +++ b/src/modules/htmlUI/var/ui_handler.class.php @@ -696,6 +696,7 @@ class uiHandler extends uiBase { */ function changeStationPrefs($formdata, $mask) { + global $CC_CONFIG; $this->redirUrl = UI_BROWSER; if ($this->_validateForm($formdata, $mask) == FALSE) { @@ -705,18 +706,18 @@ class uiHandler extends uiBase { foreach ($mask as $key => $val) { if (isset($val['isPref']) && $val['isPref']) { if (!empty($formdata[$val['element']])) { - $result = $this->gb->saveGroupPref($this->sessid, 'StationPrefs', $val['element'], $formdata[$val['element']]); + $result = $this->gb->saveGroupPref($this->sessid, $CC_CONFIG['StationPrefsGr'], $val['element'], $formdata[$val['element']]); if (PEAR::isError($result)) $this->_retMsg('Error while saving settings.'); } else { - $this->gb->delGroupPref($this->sessid, 'StationPrefs', $val['element']); + $this->gb->delGroupPref($this->sessid, $CC_CONFIG['StationPrefsGr'], $val['element']); } } if (isset($val['type']) && ($val['type'] == 'file') && ($val['element'] == "stationlogo") && !empty($formdata[$val['element']]['name'])) { - $stationLogoPath = $this->gb->loadGroupPref($this->sessid, 'StationPrefs', 'stationLogoPath'); + $stationLogoPath = $this->gb->loadGroupPref($CC_CONFIG['StationPrefsGr'], 'stationLogoPath'); $filePath = $formdata[$val['element']]['tmp_name']; if (function_exists("getimagesize")) { $size = @getimagesize($filePath); diff --git a/src/modules/htmlUI/var/ui_twitter.class.php b/src/modules/htmlUI/var/ui_twitter.class.php index c3c16a256..506fc5cf9 100644 --- a/src/modules/htmlUI/var/ui_twitter.class.php +++ b/src/modules/htmlUI/var/ui_twitter.class.php @@ -1,12 +1,12 @@ 'campcaster', - 'bitly-apikey' => 'R_2f812152bfc21035468350273ec8ff43' + 'bitly-apikey' => 'R_2f812152bfc21035468350273ec8ff43' ); - + /** * Time in sec * @@ -19,7 +19,7 @@ class uiTwitter { $this->Base =& $uiBase; $this->loadSettings(); } - + private static function getSettingFormMask() { $formmask = array( @@ -182,7 +182,7 @@ class uiTwitter { 'label' => 'Provider', 'options' => array( 'bit.ly' => 'bit.ly', - 'tinyurl.com' => 'tinyurl.com', + 'tinyurl.com' => 'tinyurl.com', ), 'isPref' => true ), @@ -209,29 +209,30 @@ class uiTwitter { 'label' => 'Submit', ) ); - return $formmask; + return $formmask; } - + private function loadSettings() { + global $CC_CONFIG; $mask = uiTwitter::getSettingFormMask(); - + foreach($mask as $key => $val) { if (isset($val['isPref']) && $val['isPref']) { $element = preg_replace('/^twitter-/', '', $val['element'], 1); - $p = $this->Base->gb->loadGroupPref($this->Base->sessid, 'StationPrefs', $val['element']); + $p = $this->Base->gb->loadGroupPref($CC_CONFIG['StationPrefsGr'], $val['element']); if (is_string($p)) { $this->settings[$element] = $p; } } } } - + public function getSettingsForm() { $mask = uiTwitter::getSettingFormMask(); $form = new HTML_QuickForm('twitter', UI_STANDARD_FORM_METHOD, UI_HANDLER);# - + foreach($mask as $key => $val) { if (isset($val['isPref']) && $val['isPref'] && !$val['hiddenPref']) { $element = preg_replace('/^twitter-/', '', $val['element']); @@ -246,48 +247,49 @@ class uiTwitter { $form->accept($renderer); return $renderer->toArray(); } - + public function saveSettings() { + global $CC_CONFIG; if ($this->Base->_validateForm($_REQUEST, uiTwitter::getSettingFormMask()) !== TRUE) { $this->Base->_retMsg('An error has occured on validating the form.'); return FALSE; } - + $mask = uiTwitter::getSettingFormMask(); $form = new HTML_QuickForm('twitter', UI_STANDARD_FORM_METHOD, UI_HANDLER); uiBase::parseArrayToForm($form, $mask); $formdata = $form->exportValues(); - + foreach ($mask as $key => $val) { if (isset($val['isPref']) && $val['isPref']) { if (!empty($formdata[$val['element']])) { - $result = $this->Base->gb->saveGroupPref($this->Base->sessid, 'StationPrefs', $val['element'], $formdata[$val['element']]); + $result = $this->Base->gb->saveGroupPref($this->Base->sessid, $CC_CONFIG['StationPrefsGr'], $val['element'], $formdata[$val['element']]); if (PEAR::isError($result)) $this->Base->_retMsg('Error while saving twitter settings.'); } elseif (!$val['hiddenPref']) { - $this->Base->gb->delGroupPref($this->Base->sessid, 'StationPrefs', $val['element']); + $this->Base->gb->delGroupPref($this->Base->sessid, $CC_CONFIG['StationPrefsGr'], $val['element']); } } } - + $this->Base->_retMsg('Twitter settings saved.'); } - + public function getFeed($p_useSampledata = false) - { + { if ($p_useSampledata) { $whatsplaying = array( "tracktitle" => "Gimme Shelter", "trackartist" => "The Rolling Stones", "playlisttitle" => "The Blues Hour" - ); + ); } else { $whatsplaying = $this->getWhatsplaying($this->settings['offset']); } - + if (!$whatsplaying) { - return; + return; } //////////////////////////////////////////////////////////////////////// @@ -313,35 +315,35 @@ class uiTwitter { if ($this->settings['has_trackartist']) { $tweetbody[] = $whatsplaying['trackartist']; } if ($this->settings['has_playlisttitle']) { $tweetbody[] = $whatsplaying['playlisttitle']; } if ($this->settings['has_stationname']) { $tweetbody[] = $this->Base->STATIONPREFS['stationName']; } - + $tweetbody = implode (". ",$tweetbody); - + // chop body to fit if necessary if ((strlen($tweetprefix) + strlen($tweetbody) + strlen($tweetsuffix)) > 140) { $tweetbody = substr($tweetbody, 0, (140 - (strlen($tweetprefix) + strlen($tweetsuffix) + 3))) . "..."; } - + $tweet = $tweetprefix . $tweetbody . $tweetsuffix; - + return $tweet; } - + public function shortUrl($p_url) { switch ($this->settings['shortener-provider']) { case 'tinyurl.com': $short = file_get_contents('http://tinyurl.com/api-create.php?url='.$p_url); break; - + case 'bit.ly': $short = file_get_contents("http://api.bit.ly/shorten?version=2.0.1&longUrl={$p_url}&format=text&login={$this->settings['bitly-login']}&apiKey={$this->settings['bitly-apikey']}"); break; } - + return $short; } - + public function getWhatsplaying($p_offset) { $timestamp = time() + $p_offset; @@ -362,47 +364,48 @@ class uiTwitter { if (!$clip['gunid']) { return FALSE; } - + return array( 'tracktitle' => $this->Base->gb->getMetadataValue(BasicStor::IdFromGunid($clip['gunid']), UI_MDATA_KEY_TITLE, $this->Base->sessid), 'trackartist' => $this->Base->gb->getMetadataValue(BasicStor::IdFromGunid($clip['gunid']), UI_MDATA_KEY_CREATOR, $this->Base->sessid), 'playlisttitle' => $this->Base->gb->getMetadataValue(BasicStor::IdFromGunid($pl['playlistId']), UI_MDATA_KEY_TITLE, $this->Base->sessid), ); } - + public function sendFeed($p_feed) { + global $CC_CONFIG; $twitter = new twitter(); $twitter->username = $this->settings['login']; $twitter->password = $this->settings['password']; - + if ($res = $twitter->update($p_feed)) { - $this->Base->gb->saveGroupPref($this->Base->sessid, 'StationPrefs', 'twitter-lastupdate', time()); + $this->Base->gb->saveGroupPref($this->Base->sessid, $CC_CONFIG['StationPrefsGr'], 'twitter-lastupdate', time()); return $res; } return false; } - + public function needsUpdate() { - if (time() - $this->Base->gb->loadGroupPref($this->Base->sessid, 'StationPrefs', 'twitter-lastupdate') + $this->runtime > $this->settings['interval']) { + if (time() - $this->Base->gb->loadGroupPref($CC_CONFIG['StationPrefsGr'], 'twitter-lastupdate') + $this->runtime > $this->settings['interval']) { return true; } return false; } - + public function twitterify($p_string) { $string = preg_replace("#(^|[\n ])([\w]+?://[\w]+[^ \"\n\r\t< ]*)#", "\\1\\2", $p_string); $string = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r< ]*)#", "\\1\\2", $string); $string = preg_replace("/@(\w+)/", "@\\1", $string); $string = preg_replace("/#(\w+)/", "#\\1", $string); - + return $string; } - + public function isActive() { - return $this->settings['is_active']; + return $this->settings['is_active']; } } diff --git a/src/modules/storageServer/var/BasicStor.php b/src/modules/storageServer/var/BasicStor.php index d55b47085..5d3e473f5 100644 --- a/src/modules/storageServer/var/BasicStor.php +++ b/src/modules/storageServer/var/BasicStor.php @@ -1385,10 +1385,10 @@ class BasicStor { if (PEAR::isError($res)) { return $res; } -// $res = Subjects::AddSubjectToGroup($login, $CC_CONFIG['StationPrefsGr']); -// if (PEAR::isError($res)) { -// return $res; -// } + $res = Subjects::AddSubjectToGroup($login, $CC_CONFIG['StationPrefsGr']); + if (PEAR::isError($res)) { + return $res; + } // $res = Subjects::AddSubjectToGroup($login, $CC_CONFIG['AllGr']); // if (PEAR::isError($res)) { // return $res; @@ -1926,19 +1926,19 @@ class BasicStor { // } // Add the "Station Preferences" group -// if (!empty($CC_CONFIG['StationPrefsGr'])) { -// if (!Subjects::GetSubjId('scheduler')) { -// echo " * Creating group '".$CC_CONFIG['StationPrefsGr']."'..."; -// $stPrefGr = Subjects::AddSubj($CC_CONFIG['StationPrefsGr']); -// if (PEAR::isError($stPrefGr)) { -// return $stPrefGr; -// } -// Subjects::AddSubjectToGroup('root', $CC_CONFIG['StationPrefsGr']); -// echo "done.\n"; -// } else { -// echo " * Skipping: group already exists: '".$CC_CONFIG['StationPrefsGr']."'\n"; -// } -// } + if (!empty($CC_CONFIG['StationPrefsGr'])) { + if (!Subjects::GetSubjId('scheduler')) { + echo " * Creating group '".$CC_CONFIG['StationPrefsGr']."'..."; + $stPrefGr = Subjects::AddSubj($CC_CONFIG['StationPrefsGr']); + if (PEAR::isError($stPrefGr)) { + return $stPrefGr; + } + Subjects::AddSubjectToGroup('root', $CC_CONFIG['StationPrefsGr']); + echo "done.\n"; + } else { + echo " * Skipping: group already exists: '".$CC_CONFIG['StationPrefsGr']."'\n"; + } + } // Add the root user if it doesnt exist yet. $rootUid = Subjects::GetSubjId('root'); @@ -1974,7 +1974,7 @@ class BasicStor { } // Need to add 'scheduler' to group StationPrefs - //Subjects::AddSubjectToGroup('scheduler', $CC_CONFIG['StationPrefsGr']); + Subjects::AddSubjectToGroup('scheduler', $CC_CONFIG['StationPrefsGr']); } diff --git a/src/modules/storageServer/var/GreenBox.php b/src/modules/storageServer/var/GreenBox.php index fc0a930db..60a4e682e 100644 --- a/src/modules/storageServer/var/GreenBox.php +++ b/src/modules/storageServer/var/GreenBox.php @@ -1432,10 +1432,10 @@ class GreenBox extends BasicStor { * @return string * preference value */ - public function loadGroupPref($sessid, $group, $key) + public function loadGroupPref($group, $key) { $pr = new Prefs($this); - $res = $pr->loadGroupPref($sessid, $group, $key); + $res = $pr->loadGroupPref($group, $key); return $res; } // fn loadGroupPref diff --git a/src/modules/storageServer/var/Prefs.php b/src/modules/storageServer/var/Prefs.php index ac4a0f1c6..7c9039510 100644 --- a/src/modules/storageServer/var/Prefs.php +++ b/src/modules/storageServer/var/Prefs.php @@ -132,16 +132,16 @@ class Prefs { /** * Read group preference record * - * @param string $sessid - * session id * @param string $group * group name * @param string $key * preference key + * @param boolean $returnErrorIfKeyNotExists + * If set to true and the key doesnt exist, return a PEAR error. * @return string * preference value */ - function loadGroupPref($sessid, $group, $key) + function loadGroupPref($group, $key, $returnErrorIfKeyNotExists = true) { // if sessid is would be used here fix Transport::cronCallMethod ! $subjid = Subjects::GetSubjId($group); @@ -157,8 +157,12 @@ class Prefs { return $val; } if ($val === FALSE) { - return PEAR::raiseError( - "Prefs::loadGroupPref: invalid preference key", GBERR_PREF); + if ($returnErrorIfKeyNotExists) { + return PEAR::raiseError( + "Prefs::loadGroupPref: invalid preference key", GBERR_PREF); + } else { + return ''; + } } return $val; } diff --git a/src/modules/storageServer/var/Transport.php b/src/modules/storageServer/var/Transport.php index 08ab2f0ac..5ea961d7b 100644 --- a/src/modules/storageServer/var/Transport.php +++ b/src/modules/storageServer/var/Transport.php @@ -199,9 +199,9 @@ class Transport { require_once('Prefs.php'); $pr = new Prefs($this->gb); - $group = 'StationPrefs'; + $group = $CC_CONFIG['StationPrefsGr']; $key = 'TransportsDenied'; - $res = $pr->loadGroupPref($sessid, $group, $key); + $res = $pr->loadGroupPref($group, $key); if (PEAR::isError($res)) { if ($res->getCode() !== GBERR_PREF) { return $res; @@ -863,6 +863,7 @@ class Transport */ function cronCallMethod($trtok) { + global $CC_CONFIG; $trec = TransportRecord::recall($this, $trtok); if (PEAR::isError($trec)) { return $trec; @@ -903,9 +904,9 @@ class Transport case 'waiting': require_once('Prefs.php'); $pr = new Prefs($this->gb); - $group = 'StationPrefs'; + $group = $CC_CONFIG['StationPrefsGr']; $key = 'TransportsDenied'; - $res = $pr->loadGroupPref(NULL/*sessid*/, $group, $key); + $res = $pr->loadGroupPref($group, $key); if (PEAR::isError($res)) { if ($res->getCode() !== GBERR_PREF) { return $res; @@ -1668,32 +1669,31 @@ class Transport { global $CC_CONFIG; $xrp = XML_RPC_encode($pars); - - $group = 'StationPrefs'; + + $pr = new Prefs($this->gb); + $group = $CC_CONFIG["StationPrefsGr"]; $key = 'archiveServerLocation'; - $archiveUrl = $pr->loadGroupPref(NULL/*sessid*/, $group, $key); - - if($archiveUrl){ - + $archiveUrl = $pr->loadGroupPref($group, $key, false); + + echo "Archive URL: $archiveUrl\n"; + if ($archiveUrl) { $archiveUrlInfo = parse_url($archiveUrl); - - if($archiveUrlInfo['port']){ + if ($archiveUrlInfo['port']) { $port = $archiveUrlInfo['port']; } else { $port = 80; } - - - $c = new XML_RPC_Client($archiveUrlInfo['path'], $archiveUrlInfo['host'], $port); + + $c = new XML_RPC_Client($archiveUrlInfo['path'], $archiveUrlInfo['host'], $port); } else { $c = new XML_RPC_Client( $CC_CONFIG['archiveUrlPath']."/".$CC_CONFIG['archiveXMLRPC'], $CC_CONFIG['archiveUrlHost'], $CC_CONFIG['archiveUrlPort'] - ); + ); } - + $f = new XML_RPC_Message($method, array($xrp)); $r = $c->send($f); if (!$r) { diff --git a/src/modules/storageServer/var/conf.php b/src/modules/storageServer/var/conf.php index 8e31d59a3..b17e648af 100644 --- a/src/modules/storageServer/var/conf.php +++ b/src/modules/storageServer/var/conf.php @@ -47,7 +47,7 @@ $CC_CONFIG = array( /* ================================================ storage configuration */ 'authCookieName'=> 'campcaster_session_id', //'AdminsGr' => 'Admins', - //'StationPrefsGr'=> 'StationPrefs', + 'StationPrefsGr'=> 'StationPrefs', //'AllGr' => 'All', 'TrashName' => 'trash_', 'storageDir' => dirname(__FILE__).'/../../storageServer/var/stor', @@ -129,7 +129,7 @@ $CC_CONFIG['backupTable'] = $CC_CONFIG['tblNamePrefix'].'backup'; $CC_CONFIG['filesSequence'] = $CC_CONFIG['tblNamePrefix']."file_id_seq"; $CC_CONFIG['sysSubjs'] = array( - 'root', /*$CC_CONFIG['AdminsGr'],*/ /*$CC_CONFIG['AllGr'],*/ /*$CC_CONFIG['StationPrefsGr']*/ + 'root', /*$CC_CONFIG['AdminsGr'],*/ /*$CC_CONFIG['AllGr'],*/ $CC_CONFIG['StationPrefsGr'] ); $old_include_path = get_include_path(); set_include_path('.'.PATH_SEPARATOR.$CC_CONFIG['pearPath'].PATH_SEPARATOR.$old_include_path); diff --git a/src/modules/storageServer/var/conf.php.template b/src/modules/storageServer/var/conf.php.template index 66ab23f8a..7f94c7fb1 100644 --- a/src/modules/storageServer/var/conf.php.template +++ b/src/modules/storageServer/var/conf.php.template @@ -70,8 +70,8 @@ $CC_CONFIG = array( 'storageUrlPort' => ls_php_port, /* ================================================ archive configuration */ - 'archiveUrlPath' => 'ls_archiveUrlPath', - 'archiveXMLRPC' => 'xmlrpc/xrArchive.php', + 'archiveUrlPath' => 'ls_storageUrlPath', + 'archiveXMLRPC' => 'xmlrpc/xrLocStor.php', 'archiveUrlHost' => 'ls_php_host', 'archiveUrlPort' => ls_php_port, 'archiveAccountLogin' => 'root', diff --git a/src/modules/storageServer/var/conf_only.php.template b/src/modules/storageServer/var/conf_only.php.template index edd49f490..b1a8db3ab 100644 --- a/src/modules/storageServer/var/conf_only.php.template +++ b/src/modules/storageServer/var/conf_only.php.template @@ -43,8 +43,8 @@ $CC_CONFIG = array( 'storageUrlPort' => ls_php_port, /* ================================================ archive configuration */ - 'archiveUrlPath' => 'ls_archiveUrlPath', - 'archiveXMLRPC' => 'xmlrpc/xrArchive.php', + 'archiveUrlPath' => 'ls_storageUrlPath', + 'archiveXMLRPC' => 'xmlrpc/xrLocStor.php', 'archiveUrlHost' => 'ls_php_host', 'archiveUrlPort' => ls_php_port, 'archiveAccountLogin' => 'root', diff --git a/src/modules/storageServer/var/install/install.php b/src/modules/storageServer/var/install/install.php index d4c5ef3a9..d17674204 100644 --- a/src/modules/storageServer/var/install/install.php +++ b/src/modules/storageServer/var/install/install.php @@ -412,7 +412,7 @@ if (!camp_db_table_exists($CC_CONFIG['prefTable'])) { camp_install_query($sql); echo " * Inserting starting data into table ".$CC_CONFIG['prefTable']."..."; - //$stPrefGr = Subjects::GetSubjId($CC_CONFIG['StationPrefsGr']); + $stPrefGr = Subjects::GetSubjId($CC_CONFIG['StationPrefsGr']); Prefs::Insert($CC_CONFIG["systemPrefId"], 'stationName', "Radio Station 1"); $genres = file_get_contents( dirname(__FILE__).'/../genres.xml'); Prefs::Insert($CC_CONFIG["systemPrefId"], 'genres', $genres); diff --git a/src/modules/storageServer/var/xmlrpc/XR_LocStor.php b/src/modules/storageServer/var/xmlrpc/XR_LocStor.php index fbea52d81..f8df60978 100644 --- a/src/modules/storageServer/var/xmlrpc/XR_LocStor.php +++ b/src/modules/storageServer/var/xmlrpc/XR_LocStor.php @@ -2742,7 +2742,7 @@ class XR_LocStor extends LocStor { } require_once(dirname(__FILE__).'/../Prefs.php'); $pr = new Prefs($this); - $res = $pr->loadGroupPref($r['sessid'], $r['group'], $r['key']); + $res = $pr->loadGroupPref($r['group'], $r['key']); if (PEAR::isError($res)) { $ec0 = intval($res->getCode()); $ec = (