Changeset 4385 for trunk/admin/include


Ignore:
Timestamp:
Nov 29, 2009, 1:35:19 PM (15 years ago)
Author:
nikrou
Message:

Feature_1255 :

  • single quotes in queries
  • start using $confdblayer
Location:
trunk/admin/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/c13y_internal.class.php

    r4325 r4385  
    3939  function c13y_version($c13y)
    4040  {
     41    global $conf;
     42
    4143    $check_list = array();
    4244
     
    4446
    4547    $db_version = pwg_get_db_version();
    46     $check_list[] = array('type' => 'MySQL', 'current' => $db_version, 'required' => REQUIRED_MYSQL_VERSION);
     48    $check_list[] = array('type' => $conf['dblayer'],
     49                          'current' => $db_version,
     50                          'required' => constant('REQUIRED_'.strtoupper($conf['dblayer']).'_VERSION')
     51                          );
    4752
    4853    foreach ($check_list as $elem)
  • trunk/admin/include/functions.php

    r4334 r4385  
    417417{
    418418  $query = '
    419 SELECT id, if(id_uppercat is null,\'\',id_uppercat) AS id_uppercat, uppercats, rank, global_rank
     419SELECT id, id_uppercat, uppercats, rank, global_rank
    420420  FROM '.CATEGORIES_TABLE.'
    421421  ORDER BY id_uppercat,rank,name';
  • trunk/admin/include/plugins.class.php

    r4034 r4385  
    8181        {
    8282          $query = '
    83 INSERT INTO ' . PLUGINS_TABLE . ' (id,version) VALUES ("'
    84 . $plugin_id . '","' . $this->fs_plugins[$plugin_id]['version'] . '"
     83INSERT INTO ' . PLUGINS_TABLE . ' (id,version) VALUES (\''
     84. $plugin_id . '\',\'' . $this->fs_plugins[$plugin_id]['version'] . '\'
    8585)';
    8686          pwg_query($query);
     
    111111          $query = '
    112112UPDATE ' . PLUGINS_TABLE . '
    113 SET state="active", version="'.$this->fs_plugins[$plugin_id]['version'].'"
    114 WHERE id="' . $plugin_id . '"';
     113SET state=\'active\', version=\''.$this->fs_plugins[$plugin_id]['version'].'\'
     114WHERE id=\'' . $plugin_id . '\'';
    115115          pwg_query($query);
    116116        }
     
    127127        }
    128128        $query = '
    129 UPDATE ' . PLUGINS_TABLE . ' SET state="inactive" WHERE id="' . $plugin_id . '"';
     129UPDATE ' . PLUGINS_TABLE . ' SET state=\'inactive\' WHERE id=\'' . $plugin_id . '\'';
    130130        pwg_query($query);
    131131        if (file_exists($file_to_include))
     
    145145        }
    146146        $query = '
    147 DELETE FROM ' . PLUGINS_TABLE . ' WHERE id="' . $plugin_id . '"';
     147DELETE FROM ' . PLUGINS_TABLE . ' WHERE id=\'' . $plugin_id . '\'';
    148148        pwg_query($query);
    149149        if (file_exists($file_to_include))
Note: See TracChangeset for help on using the changeset viewer.