/** * Get the columns from database table. * * adjusted to vm2, We use the same, except that the cache is not a global static,.. we use static belonging to table * @return mixed An array of the field names, or false if an error occurs. * * @since 11.1 */ public function getFields() { if (self::$_cache === null) { // Lookup the fields for this table only once. $name = $this->_tbl; if (JVM_VERSION === 1) { $fields = $this->getTableColumns($name, false); } else { $fields = $this->_db->getTableColumns($name, false); } if (empty($fields)) { $e = new JException(JText::_('JLIB_DATABASE_ERROR_COLUMNS_NOT_FOUND')); $this->setError($e); return false; } self::$_cache = $fields; } return self::$_cache; }
public function emptyCache() { self::$_cache = array(); }
/** * Get the columns from database table. * * adjusted to vm2, We use the same, except that the cache is not a global static,.. we use static belonging to table * @return mixed An array of the field names, or false if an error occurs. * * @since 11.1 */ public function getFields() { if (self::$_cache === null) { // Lookup the fields for this table only once. $name = $this->_tbl; //ALCON Modifica per evitare che esegua 200 volte la richiesta dei campi della tabella media if (!($name == "#__virtuemart_medias")) { $fields = $this->_db->getTableColumns($name, false); //$resultmedia = $result; //var_dump( $fields); //break; } if (empty($fields)) { $e = new JException(JText::_('JLIB_DATABASE_ERROR_COLUMNS_NOT_FOUND')); $this->setError($e); return false; } self::$_cache = $fields; } return self::$_cache; }