芝麻web文件管理V1.00
编辑当前文件:/home/asmplong/www/ancien-site-2019/site/libraries/joomla/database/table/asset.php
_db->setQuery( 'SELECT '.$this->_db->quoteName('id') . ' FROM '.$this->_db->quoteName('#__assets') . ' WHERE '.$this->_db->quoteName('name').' = '.$this->_db->Quote($name) ); $assetId = (int) $this->_db->loadResult(); if (empty($assetId)) { return false; } // Check for a database error. if ($error = $this->_db->getErrorMsg()) { $this->setError($error); return false; } return $this->load($assetId); } /** * Asset that the nested set data is valid. * * @return boolean True if the instance is sane and able to be stored in the database. * * @link http://docs.joomla.org/JTable/check * @since 11.1 */ public function check() { $this->parent_id = (int) $this->parent_id; // JTableNested does not allow parent_id = 0, override this. if ($this->parent_id > 0) { $this->_db->setQuery( 'SELECT COUNT(id)' . ' FROM '.$this->_db->quoteName($this->_tbl). ' WHERE '.$this->_db->quoteName('id').' = '.$this->parent_id ); if ($this->_db->loadResult()) { return true; } else { if ($error = $this->_db->getErrorMsg()) { $this->setError($error); } else { $this->setError(JText::_('JLIB_DATABASE_ERROR_INVALID_PARENT_ID')); } return false; } } return true; } }