cvs: pear /Translation2/Container dataobjectsimple.php

From: Date: Thu, 06 May 2004 05:53:59 +0000
Subject: cvs: pear /Translation2/Container dataobjectsimple.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-19248@lists.php.net to get a copy of this message
alan_k Thu May 6 01:53:59 2004 EDT Modified files: /pear/Translation2/Container dataobjectsimple.php Log: fix assignment of datobjects simple to empty string using default constructor http://cvs.php.net/diff.php/pear/Translation2/Container/dataobjectsimple.php?r1=1.4&r2=1.5&ty=u Index: pear/Translation2/Container/dataobjectsimple.php diff -u pear/Translation2/Container/dataobjectsimple.php:1.4 pear/Translation2/Container/dataobjectsimple.php:1.5 --- pear/Translation2/Container/dataobjectsimple.php:1.4 Thu May 6 01:50:00 2004 +++ pear/Translation2/Container/dataobjectsimple.php Thu May 6 01:53:59 2004 @@ -16,11 +16,11 @@ // | Author: Alan Knowles <alan@akbkhome.com> | // +----------------------------------------------------------------------+ // -// $Id: dataobjectsimple.php,v 1.4 2004/05/06 05:50:00 alan_k Exp $ +// $Id: dataobjectsimple.php,v 1.5 2004/05/06 05:53:59 alan_k Exp $ // /** * @package Translation2 -* @version $Id: dataobjectsimple.php,v 1.4 2004/05/06 05:50:00 alan_k Exp $ +* @version $Id: dataobjectsimple.php,v 1.5 2004/05/06 05:53:59 alan_k Exp $ */ /** @@ -54,7 +54,7 @@ * by the PEAR DB abstraction layer to fetch data. * * @package Translation2 - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ */ class Translation2_Container_dataobjectsimple extends Translation2_Container { @@ -75,7 +75,7 @@ function Translation2_Container_dataobjectsimple($table=null) { $this->_setDefaultOptions(); - if (!is_null($table)) { + if (!empty($table)) { $this->options['table'] = $table; } } @@ -162,10 +162,10 @@ */ function getOne($string, $page=null, $lang=null) { - $lang = $lang ? $lang : $this->currentLang['id']; + $lang = $lang ? $lang : (isset($this->currentLang['id']) ? $this->currentLang['id'] : '-'); // get the string id $do = DB_DataObject::factory($this->options['table']); - $do->lang = '-'; + $do->lang = '-'; $do->page = $page; $do->translation = $string; // we dont have the base language translation..

« previous php.pear.cvs (#19248) next »