Fixed whitespace to standard coding conventions.

This commit is contained in:
paul.baranowski 2010-11-18 14:39:03 -05:00
parent 52fe579ce4
commit 8014f94c58
35 changed files with 6072 additions and 6070 deletions

View File

@ -274,6 +274,7 @@ class Playlist {
return FALSE;
}
/**
* Set playlist edit flag
*

View File

@ -80,8 +80,7 @@ class Prefs {
return $subjid;
}
if (is_null($subjid)) {
return PEAR::raiseError("Prefs::savePref: invalid session id",
GBERR_SESS);
return PEAR::raiseError("Prefs::savePref: invalid session id", GBERR_SESS);
}
$r = $this->update($subjid, $key, $value);
if (PEAR::isError($r)) {
@ -113,16 +112,14 @@ class Prefs {
return $subjid;
}
if (is_null($subjid)) {
return PEAR::raiseError("Prefs::delPref: invalid session id",
GBERR_SESS);
return PEAR::raiseError("Prefs::delPref: invalid session id", GBERR_SESS);
}
$r = $this->delete($subjid, $key);
if (PEAR::isError($r)) {
return $r;
}
if ($r === FALSE) {
return PEAR::raiseError("Prefs::delPref: invalid preference key",
GBERR_PREF);
return PEAR::raiseError("Prefs::delPref: invalid preference key", GBERR_PREF);
}
return TRUE;
}

View File

@ -109,6 +109,7 @@ class ScheduleGroup {
// Check if there are any conflicts with existing entries
$length = trim($playlist->getLength());
var_dump($length);
if (empty($length)) {
return new PEAR_Error("Length is empty.");
}
@ -122,8 +123,10 @@ class ScheduleGroup {
$itemStartTime = $p_datetime;
$plItems = $playlist->getContents();
var_dump($plItems);
foreach ($plItems as $row) {
$trackLength = $row["cliplength"];
var_dump($trackLength);
$sql = "INSERT INTO ".$CC_CONFIG["scheduleTable"]
." (id, playlist_id, starts, ends, group_id, file_id,"
." clip_length, cue_in, cue_out, fade_in, fade_out)"
@ -226,7 +229,9 @@ class Schedule {
." WHERE (starts >= '$p_datetime') "
." AND (ends <= (TIMESTAMP '$p_datetime' + INTERVAL '$p_length'))";
//$_SESSION["debug"] = $sql;
var_dump($sql);
$count = $CC_DBC->GetOne($sql);
var_dump($count);
return ($count == '0');
}

View File

@ -75,7 +75,4 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents {
return Common::setTimeInSub($this, 'CLIPLENGTH', $time);
}
} // CcPlaylistcontents

View File

@ -114,8 +114,9 @@ class twitter{
//
function publicTimeline($sinceid=false){
$qs='';
if($sinceid!==false)
if($sinceid!==false) {
$qs='?since_id='.intval($sinceid);
}
$request = 'http://twitter.com/statuses/public_timeline.xml'.$qs;
return $this->process($request);
}
@ -132,14 +133,15 @@ class twitter{
//
function friendsTimeline($id=false,$since=false){
$qs='';
if($since!==false)
if($since!==false) {
$qs='?since='.urlencode($since);
}
if($id===false)
if($id===false) {
$request = 'http://twitter.com/statuses/friends_timeline.xml'.$qs;
else
} else {
$request = 'http://twitter.com/statuses/friends_timeline/'.urlencode($id).'.xml'.$qs;
}
return $this->process($request);
}
@ -159,10 +161,11 @@ class twitter{
if($since!==false)
$qs .= '&since='.urlencode($since);
if($id===false)
if($id===false) {
$request = 'http://twitter.com/statuses/user_timeline.xml'.$qs;
else
} else {
$request = 'http://twitter.com/statuses/user_timeline/'.urlencode($id).'.xml'.$qs;
}
return $this->process($request);
}
@ -221,8 +224,9 @@ class twitter{
//
function directMessages($since=false){
$qs='';
if($since!==false)
if($since!==false) {
$qs='?since='.urlencode($since);
}
$request = 'http://twitter.com/direct_messages.xml'.$qs;
return $this->process($request);
}
@ -256,8 +260,9 @@ class twitter{
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postargs);
}
if($this->username !== false && $this->password !== false)
if($this->username !== false && $this->password !== false) {
curl_setopt($ch, CURLOPT_USERPWD, $this->username.':'.$this->password);
}
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_NOBODY, 0);

View File

@ -253,8 +253,7 @@ class uiBase
global $CC_DBC, $CC_CONFIG;
$this->gb = new GreenBox();
$CC_CONFIG['accessRawAudioUrl'] = $CC_CONFIG['storageUrlPath'].'/xmlrpc/simpleGet.php';
$this->sessid = isset($_REQUEST[$CC_CONFIG['authCookieName']]) ?
$_REQUEST[$CC_CONFIG['authCookieName']] : null;
$this->sessid = isset($_REQUEST[$CC_CONFIG['authCookieName']]) ? $_REQUEST[$CC_CONFIG['authCookieName']] : null;
$this->userid = GreenBox::GetSessUserId($this->sessid);
$this->login = Alib::GetSessLogin($this->sessid);
if (PEAR::isError($this->login)) {

View File

@ -731,7 +731,7 @@ class uiHandler extends uiBase {
}
return TRUE;
} // fn changeStationPrefs
}
} // class uiHandler
}
?>

View File

@ -32,11 +32,11 @@ class uiPlaylist
public function setReload($url=NULL)
{
if($url)
if($url) {
$this->Base->redirUrl = $url;
else
} else {
$this->Base->redirUrl = $this->reloadUrl;
}
} // fn setReload

View File

@ -1,12 +1,8 @@
<?php
/**
* @package Campcaster
* @subpackage htmlUI
* @copyright 2010 Sourcefabric O.P.S.
*/
class uiScratchPad
{
@ -150,10 +146,11 @@ class uiScratchPad
$scratchpad = $this->get();
foreach ($ids as $id) {
if($type === 'playlist')
if($type === 'playlist') {
$item = $this->Base->getPLMetaInfo($id);
else
} else {
$item = $this->Base->getMetaInfo($id);
}
foreach ($scratchpad as $key => $val) {
if ($val['id'] == $item['id']) {
@ -259,12 +256,13 @@ class uiScratchPad
public function reloadMetadata()
{
foreach ($this->items as $key => $val) {
if($val['type'] === 'playlist')
if ($val['type'] === 'playlist') {
$this->items[$key] = $this->Base->getPLMetaInfo($val['id']);
else
} else {
$this->items[$key] = $this->Base->getMetaInfo($val['id']);
}
}
}
public function reloadActivePLMetadata($id)
{