openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 63fec300ce3a9aae82a3b87a087cc804c49cb4aa
parent 6ac0b5a9772c3cbcb1d45e8c390aced50b392a87
Author: dankert <devnull@localhost>
Date:   Mon, 26 Feb 2007 23:05:08 +0100

Neue Methode "loadByName()"

Diffstat:
objectClasses/Project.class.php | 26+++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/objectClasses/Project.class.php b/objectClasses/Project.class.php @@ -20,7 +20,10 @@ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // --------------------------------------------------------------------------- // $Log$ -// Revision 1.10 2006-07-19 21:30:32 dankert +// Revision 1.11 2007-02-26 22:05:08 dankert +// Neue Methode "loadByName()" +// +// Revision 1.10 2006/07/19 21:30:32 dankert // Beim Speichern auch ?ndern des Root-Folders // // Revision 1.9 2006/06/01 20:58:11 dankert @@ -180,6 +183,27 @@ class Project } + // Laden + function loadByName() + { + $db = db_connection(); + + $sql = new Sql( 'SELECT * FROM {t_project} '. + ' WHERE name={projectname}' ); + $sql->setString( 'projectname',$this->name ); + + $row = $db->getRow( $sql->query ); + + $this->projectid = $row['id' ]; + $this->target_dir = $row['target_dir' ]; + $this->ftp_url = $row['ftp_url' ]; + $this->ftp_passive = $row['ftp_passive' ]; + $this->cmd_after_publish = $row['cmd_after_publish' ]; + $this->content_negotiation = $row['content_negotiation']; + $this->cut_index = $row['cut_index' ]; + } + + // Speichern function save() {