// Format definitions

This commit is contained in:
rMalie
2011-12-13 13:41:54 +00:00
parent a40f3c304c
commit c022f4e0e5
71 changed files with 710 additions and 1791 deletions
+2 -15
View File
@@ -30,10 +30,6 @@ class RequestSqlCore extends ObjectModel
public $name;
public $sql;
/**
* @see ObjectModel::$definition
*/
@@ -41,12 +37,11 @@ class RequestSqlCore extends ObjectModel
'table' => 'request_sql',
'primary' => 'id_request_sql',
'fields' => array(
'name' => array('type' => 'FILL_ME', 'validate' => 'isString', 'required' => true, 'size' => 200),
'sql' => array('type' => 'FILL_ME', 'validate' => 'isString', 'required' => true, 'size' => 400),
'name' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'required' => true, 'size' => 200),
'sql' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'required' => true, 'size' => 400),
),
);
public $tested = array('required' => array ('SELECT', 'FROM'),
'option' => array('WHERE', 'ORDER', 'LIMIT', 'HAVING', 'GROUP', 'UNION'),
'operator' => array('AND', '&&', 'BETWEEN', 'AND', 'BINARY', '&', '~', '|', '^', 'CASE', 'WHEN', 'END', 'DIV', '/', '<=>', '=', '>=',
@@ -67,14 +62,6 @@ class RequestSqlCore extends ObjectModel
public $error_sql = array();
public function getFields()
{
parent::validateFields();
$fields['name'] = pSQL($this->name);
$fields['sql'] = pSQL($this->sql);
return $fields;
}
public static function getRequestSql()
{
if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM `'._DB_PREFIX_.'request_sql` ORDER BY `id_request_sql`'))