Remove just previously added logging statements
This commit is contained in:
parent
c7c683966d
commit
e17b330186
|
@ -9,7 +9,6 @@ class Application_Model_Schedule
|
||||||
*/
|
*/
|
||||||
public static function IsFileScheduledInTheFuture($p_fileId)
|
public static function IsFileScheduledInTheFuture($p_fileId)
|
||||||
{
|
{
|
||||||
Logging::info($p_fileId);
|
|
||||||
$sql = <<<SQL
|
$sql = <<<SQL
|
||||||
SELECT COUNT(*)
|
SELECT COUNT(*)
|
||||||
FROM cc_schedule
|
FROM cc_schedule
|
||||||
|
@ -18,7 +17,6 @@ WHERE file_id = :file_id
|
||||||
SQL;
|
SQL;
|
||||||
$count = Application_Common_Database::prepareAndExecute( $sql, array(
|
$count = Application_Common_Database::prepareAndExecute( $sql, array(
|
||||||
':file_id'=>$p_fileId), 'column');
|
':file_id'=>$p_fileId), 'column');
|
||||||
Logging::info($count);
|
|
||||||
return (is_numeric($count) && ($count != '0'));
|
return (is_numeric($count) && ($count != '0'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -381,18 +381,17 @@ SQL;
|
||||||
if (Application_Model_Schedule::IsFileScheduledInTheFuture($this->getId())) {
|
if (Application_Model_Schedule::IsFileScheduledInTheFuture($this->getId())) {
|
||||||
throw new DeleteScheduledFileException();
|
throw new DeleteScheduledFileException();
|
||||||
}
|
}
|
||||||
Logging::info("1111");
|
|
||||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||||
$user = new Application_Model_User($userInfo->id);
|
$user = new Application_Model_User($userInfo->id);
|
||||||
$isAdminOrPM = $user->isUserType(array(UTYPE_SUPERADMIN, UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
|
$isAdminOrPM = $user->isUserType(array(UTYPE_SUPERADMIN, UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
|
||||||
if (!$isAdminOrPM && $this->getFileOwnerId() != $user->getId()) {
|
if (!$isAdminOrPM && $this->getFileOwnerId() != $user->getId()) {
|
||||||
throw new FileNoPermissionException();
|
throw new FileNoPermissionException();
|
||||||
}
|
}
|
||||||
Logging::info("222");
|
|
||||||
$file_id = $this->_file->getDbId();
|
$file_id = $this->_file->getDbId();
|
||||||
Logging::info($file_id);
|
Logging::info($file_id);
|
||||||
Logging::info("User ".$user->getLogin()." is deleting file: ".$this->_file->getDbTrackTitle()." - file id: ".$file_id);
|
Logging::info("User ".$user->getLogin()." is deleting file: ".$this->_file->getDbTrackTitle()." - file id: ".$file_id);
|
||||||
Logging::info("3333");
|
|
||||||
$filesize = $this->_file->getFileSize();
|
$filesize = $this->_file->getFileSize();
|
||||||
if ($filesize <= 0) {
|
if ($filesize <= 0) {
|
||||||
throw new Exception("Cannot delete file with filesize ".$filesize);
|
throw new Exception("Cannot delete file with filesize ".$filesize);
|
||||||
|
|
Loading…
Reference in New Issue