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.
This commit is contained in:
parent
73d672b552
commit
e537255e27
|
@ -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),
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
class uiTwitter {
|
||||
private $Base;
|
||||
|
||||
|
||||
private $settings = array(
|
||||
'bitly-login' => '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<a href=\"\\2\" target=\"_blank\">\\2</a>", $p_string);
|
||||
$string = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r< ]*)#", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $string);
|
||||
$string = preg_replace("/@(\w+)/", "<a href=\"http://www.twitter.com/\\1\" target=\"_blank\">@\\1</a>", $string);
|
||||
$string = preg_replace("/#(\w+)/", "<a href=\"http://search.twitter.com/search?q=\\1\" target=\"_blank\">#\\1</a>", $string);
|
||||
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
||||
|
||||
public function isActive()
|
||||
{
|
||||
return $this->settings['is_active'];
|
||||
return $this->settings['is_active'];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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']);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 = (
|
||||
|
|
Loading…
Reference in New Issue