Changeset 4385 for trunk/admin


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

Feature_1255 :

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

Legend:

Unmodified
Added
Removed
  • trunk/admin/cat_modify.php

    r4367 r4385  
    243243
    244244    'CAT_STATUS'        => $category['status'],
    245     'CAT_VISIBLE'       => $category['visible'],
    246     'CAT_COMMENTABLE'   => $category['commentable'],
    247     'CAT_UPLOADABLE'    => $category['uploadable'],
     245    'CAT_VISIBLE'       => boolean_to_string($category['visible']),
     246    'CAT_COMMENTABLE'   => boolean_to_string($category['commentable']),
     247    'CAT_UPLOADABLE'    => boolean_to_string($category['uploadable']),
    248248
    249249    'IMG_ORDER_DEFAULT'  => empty($category['image_order']) ?
  • 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))
  • trunk/admin/intro.php

    r4325 r4385  
    197197    'OS' => PHP_OS,
    198198    'PHP_VERSION' => phpversion(),
    199     'DB_ENGINE' => 'MySQL',
     199    'DB_ENGINE' => $conf['dblayer'],
    200200    'DB_VERSION' => $db_version,
    201201    'DB_ELEMENTS' => l10n_dec('%d element', '%d elements', $nb_elements),
Note: See TracChangeset for help on using the changeset viewer.