Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
d5a2fc93e1
3 changed files with 11 additions and 16 deletions
|
@ -18,7 +18,6 @@ date_default_timezone_set('UTC');
|
|||
require_once (APPLICATION_PATH."/logging/Logging.php");
|
||||
Logging::setLogPath('/var/log/airtime/zendphp.log');
|
||||
|
||||
Logging::info(Application_Model_Preference::GetTimezone());
|
||||
date_default_timezone_set(Application_Model_Preference::GetTimezone());
|
||||
|
||||
global $CC_CONFIG;
|
||||
|
|
|
@ -19,7 +19,6 @@ class WebstreamController extends Zend_Controller_Action
|
|||
if (!$this->isAuthorized(-1)) {
|
||||
// TODO: this header call does not actually print any error message
|
||||
header("Status: 401 Not Authorized");
|
||||
Logging::info("Ain't not Authorized");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -112,8 +111,6 @@ class WebstreamController extends Zend_Controller_Action
|
|||
host/dj, that he has the correct permission.*/
|
||||
$user = Application_Model_User::getCurrentUser();
|
||||
//only allow when webstream belongs to the DJ
|
||||
Logging::info("Webstream id:".$webstream->getDbCreatorId());
|
||||
Logging::info("User id:".$user->getId());
|
||||
return $webstream->getDbCreatorId() == $user->getId();
|
||||
}
|
||||
/*we are creating a new stream. Don't need to check whether the
|
||||
|
@ -122,7 +119,6 @@ class WebstreamController extends Zend_Controller_Action
|
|||
} else {
|
||||
Logging::info( $user );
|
||||
}
|
||||
Logging::info("what the fuck");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -133,15 +129,12 @@ class WebstreamController extends Zend_Controller_Action
|
|||
$id = $request->getParam("id");
|
||||
|
||||
$parameters = array();
|
||||
$parameters['id'] = trim($request->getParam("id"));
|
||||
$parameters['length'] = trim($request->getParam("length"));
|
||||
$parameters['name'] = trim($request->getParam("name"));
|
||||
$parameters['description'] = trim($request->getParam("description"));
|
||||
$parameters['url'] = trim($request->getParam("url"));
|
||||
foreach (array('id','length','name','description','url') as $p) {
|
||||
$parameters[$p] = trim($request->getParam($p));
|
||||
}
|
||||
|
||||
if (!$this->isAuthorized($id)) {
|
||||
header("Status: 401 Not Authorized");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -335,11 +335,14 @@ class Application_Model_User
|
|||
|
||||
public static function getUserData($id)
|
||||
{
|
||||
$sql = "SELECT login, first_name, last_name, type, id, email, cell_phone, skype_contact, jabber_contact"
|
||||
." FROM cc_subjs"
|
||||
." WHERE id = :id";
|
||||
|
||||
return Application_Common_Database::prepareAndExecute($sql, array(":id" => $id), 'single');
|
||||
$sql = <<<SQL
|
||||
SELECT login, first_name, last_name, type, id, email, cell_phone, skype_contact,
|
||||
jabber_contact
|
||||
FROM cc_subjs
|
||||
WHERE id = :id
|
||||
SQL;
|
||||
return Application_Common_Database::prepareAndExecute($sql, array(
|
||||
":id" => $id), 'single');
|
||||
}
|
||||
|
||||
public static function getCurrentUser()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue