diff --git a/airtime_mvc/application/Bootstrap.php b/airtime_mvc/application/Bootstrap.php index 8e8a64e28..c4c53ffa5 100644 --- a/airtime_mvc/application/Bootstrap.php +++ b/airtime_mvc/application/Bootstrap.php @@ -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; diff --git a/airtime_mvc/application/controllers/WebstreamController.php b/airtime_mvc/application/controllers/WebstreamController.php index 9cea83a5e..e9e93fe44 100644 --- a/airtime_mvc/application/controllers/WebstreamController.php +++ b/airtime_mvc/application/controllers/WebstreamController.php @@ -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; } diff --git a/airtime_mvc/application/models/User.php b/airtime_mvc/application/models/User.php index 9fcf9f62c..d07552472 100644 --- a/airtime_mvc/application/models/User.php +++ b/airtime_mvc/application/models/User.php @@ -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 = << $id), 'single'); } public static function getCurrentUser()