Ignore:
Timestamp:
May 9, 2010, 10:52:38 PM (14 years ago)
Author:
nikrou
Message:

Fix get_enums function for SQLite
hard coded enums values for all tables
because enum feature doesn't exists for SQLite.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/dblayer/functions_pdo-sqlite.inc.php

    r6090 r6153  
    432432function get_enums($table, $field)
    433433{
    434   return array();
     434  $Enums['categories']['status'] = array('public', 'private');
     435  $Enums['history']['section'] = array('categories','tags','search','list','favorites','most_visited','best_rated','recent_pics','recent_cats');
     436  $Enums['user_infos']['status'] = array('webmaster','admin','normal','generic','guest');
     437  $Enums['image']['type'] = array('picture','high','other');
     438  $Enums['plugins']['state'] = array('active', 'inactive');
     439  $Enums['user_cache_image']['access_type'] = array('NOT IN','IN');
     440
     441  $table = str_replace($GLOBALS['prefixeTable'], '', $table);
     442  if (isset($Enums[$table][$field])) {
     443    return $Enums[$table][$field];
     444  } else {
     445    return array();
     446  }
    435447}
    436448
Note: See TracChangeset for help on using the changeset viewer.