Exemplo n.º 1
0
 /**
  * Loads the Order object with values from the DB tables
  * (non-PHPdoc)
  * @see Citruscart/admin/tables/CitruscartTable#load($oid, $reset)
  */
 function load($oid = null, $reset = true)
 {
     if ($return = parent::load($oid, $reset)) {
         // TODO populate the protected vars with the info from the db
     }
     return $return;
 }
Exemplo n.º 2
0
 public function load($oid = null, $reset = true)
 {
     // Check the table activation status first
     if (!$this->active) {
         // Activate it with a default value
         $this->setType('');
     }
     return parent::load($oid, $reset);
 }
Exemplo n.º 3
0
 /**
  * Loads a row from the database and binds the fields to the object properties
  *
  * @access	public
  * @param	mixed	Optional primary key.  If not specifed, the value of current key is used
  * @return	boolean	True if successful
  */
 function load($oid = null, $reset = true)
 {
     if (!parent::load($oid, $reset)) {
         return false;
     }
     // relative paths start with DSDS
     if (strpos($this->productfile_path, DS . DS) !== false) {
         $app = JFactory::getApplication();
         if ($app->isAdmin()) {
             //saving on admin site -> path_base contains "/Administrator"
             $this->productfile_path = substr(JPATH_BASE, 0, strlen(JPATH_BASE) - 14) . substr($this->productfile_path, 1);
         } else {
             $this->productfile_path = JPATH_BASE . substr($this->productfile_path, 1);
         }
     }
     return true;
 }