From 9c23b86c53bf0556806d8736b89311d0f13dd3ab Mon Sep 17 00:00:00 2001 From: naomiaro <naomiaro@gmail.com> Date: Mon, 10 Jan 2011 15:44:13 -0500 Subject: [PATCH] last of changing database name, removing old files --- application/models/campcaster/CcFiles.php | 31 ------- application/models/campcaster/CcPlaylist.php | 48 ----------- .../models/campcaster/CcPlaylistcontents.php | 81 ------------------- application/models/campcaster/Common.php | 19 ----- 4 files changed, 179 deletions(-) delete mode 100644 application/models/campcaster/CcFiles.php delete mode 100644 application/models/campcaster/CcPlaylist.php delete mode 100644 application/models/campcaster/CcPlaylistcontents.php delete mode 100644 application/models/campcaster/Common.php diff --git a/application/models/campcaster/CcFiles.php b/application/models/campcaster/CcFiles.php deleted file mode 100644 index edc51a659..000000000 --- a/application/models/campcaster/CcFiles.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -require_once('Common.php'); - -/** - * Skeleton subclass for representing a row from the 'cc_files' table. - * - * - * - * You should add additional methods to this class to meet the - * application requirements. This class will only be generated as - * long as it does not already exist in the output directory. - * - * @package propel.generator.campcaster - */ -class CcFiles extends BaseCcFiles { - - public function getDbLength() - { - return $this->length; - } - - public function setDbLength($time) - { - $this->length = $time; - //$this->modifiedColumns[] = CcPlaylistcontentsPeer::LENGTH; - return Common::setTimeInSub($this, 'LENGTH', $time); - } - - -} // CcFiles diff --git a/application/models/campcaster/CcPlaylist.php b/application/models/campcaster/CcPlaylist.php deleted file mode 100644 index 0d3cff401..000000000 --- a/application/models/campcaster/CcPlaylist.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - - - -/** - * Skeleton subclass for representing a row from the 'cc_playlist' table. - * - * - * - * You should add additional methods to this class to meet the - * application requirements. This class will only be generated as - * long as it does not already exist in the output directory. - * - * @package propel.generator.campcaster - */ -class CcPlaylist extends BaseCcPlaylist { - - - public function computeLastPosition() - { - $con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME); - - $sql = 'SELECT MAX('.CcPlaylistcontentsPeer::POSITION.') AS pos' - . ' FROM ' .CcPlaylistcontentsPeer::TABLE_NAME - . ' WHERE ' .CcPlaylistcontentsPeer::PLAYLIST_ID. ' = :p1'; - - $stmt = $con->prepare($sql); - $stmt->bindValue(':p1', $this->getDbId()); - $stmt->execute(); - return $stmt->fetchColumn(); - } - - public function computeLength() - { - $con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME); - - $sql = 'SELECT SUM('.CcPlaylistcontentsPeer::CLIPLENGTH.') AS length' - . ' FROM ' .CcPlaylistcontentsPeer::TABLE_NAME - . ' WHERE ' .CcPlaylistcontentsPeer::PLAYLIST_ID. ' = :p1'; - - $stmt = $con->prepare($sql); - $stmt->bindValue(':p1', $this->getDbId()); - $stmt->execute(); - return $stmt->fetchColumn(); - } - - -} // CcPlaylist diff --git a/application/models/campcaster/CcPlaylistcontents.php b/application/models/campcaster/CcPlaylistcontents.php deleted file mode 100644 index 1b6417a66..000000000 --- a/application/models/campcaster/CcPlaylistcontents.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php - -require_once('Common.php'); - -/** - * Skeleton subclass for representing a row from the 'cc_playlistcontents' table. - * - * - * - * You should add additional methods to this class to meet the - * application requirements. This class will only be generated as - * long as it does not already exist in the output directory. - * - * @package propel.generator.campcaster - */ -class CcPlaylistcontents extends BaseCcPlaylistcontents { - - public function getDbFadein() - { - return $this->fadein; - } - - public function setDbFadein($time) - { - $this->fadein = $time; - //$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEIN; - Common::setTimeInSub($this, 'FADEIN', $time); - } - - public function getDbFadeout() - { - return $this->fadeout; - } - - public function setDbFadeout($time) - { - $this->fadeout = $time; - //$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEOUT; - Common::setTimeInSub($this, 'FADEOUT', $time); - } - - public function getDbCuein() - { - return $this->cuein; - } - - public function setDbCuein($time) - { - $this->cuein = $time; - //$this->modifiedColumns[] = CcPlaylistcontentsPeer::CUEIN; - Common::setTimeInSub($this, 'CUEIN', $time); - } - - public function getDbCueout() - { - return $this->cueout; - } - - public function setDbCueout($time) - { - $this->cueout = $time; - //$this->modifiedColumns[] = CcPlaylistcontentsPeer::CUEOUT; - Common::setTimeInSub($this, 'CUEOUT', $time); - } - - public function getDbCliplength() - { - return $this->cliplength; - } - - public function setDbCliplength($time) - { - $this->cliplength = $time; - //$this->modifiedColumns[] = CcPlaylistcontentsPeer::CLIPLENGTH; - Common::setTimeInSub($this, 'CLIPLENGTH', $time); - } - - - - -} // CcPlaylistcontents diff --git a/application/models/campcaster/Common.php b/application/models/campcaster/Common.php deleted file mode 100644 index 3e13c7fa3..000000000 --- a/application/models/campcaster/Common.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -class Common { - - public static function setTimeInSub($row, $col, $time) - { - $class = get_class($row).'Peer'; - - $con = Propel::getConnection($class::DATABASE_NAME); - - $sql = 'UPDATE '.$class::TABLE_NAME - . ' SET '.$col.' = :f1' - . ' WHERE ' .$class::ID. ' = :p1'; - $stmt = $con->prepare($sql); - $stmt->bindValue(':f1', $time); - $stmt->bindValue(':p1', $row->getDbId()); - $stmt->execute(); - } -}