Changeset 6654


Ignore:
Timestamp:
Jul 3, 2010, 2:20:38 PM (14 years ago)
Author:
nikrou
Message:

Bug 1755 : Needs single quotes in queries official plugins

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions_upgrade.php

    r6550 r6654  
    8787SELECT id
    8888FROM '.PREFIX_TABLE.'plugins
    89 WHERE state = "active"
     89WHERE state = \'active\'
    9090AND id NOT IN (\'' . implode('\',\'', $standard_plugins) . '\')
    9191;';
     
    102102    $query = '
    103103UPDATE '.PREFIX_TABLE.'plugins
    104 SET state="inactive"
     104SET state=\'inactive\'
    105105WHERE id IN (\'' . implode('\',\'', $plugins) . '\')
    106106;';
  • trunk/include/functions_category.inc.php

    r6363 r6654  
    432432        $query='
    433433UPDATE '.OLD_PERMALINKS_TABLE.' SET last_hit=NOW(), hit=hit+1
    434   WHERE permalink="'.$permalinks[$i].'" AND cat_id='.$cat_id.'
     434  WHERE permalink=\''.$permalinks[$i].'\' AND cat_id='.$cat_id.'
    435435  LIMIT 1';
    436436        pwg_query($query);
  • trunk/picture.php

    r6615 r6654  
    5353  {// url given by file name
    5454    assert( !empty($page['image_file']) );
    55     $query .= 'file LIKE "' .
     55    $query .= 'file LIKE \'' .
    5656      str_replace(array('_','%'), array('/_','/%'), $page['image_file'] ).
    57       '.%" ESCAPE "/" LIMIT 1';
     57      '.%\' ESCAPE \'/\' LIMIT 1';
    5858  }
    5959  if ( ! ( $row = pwg_db_fetch_assoc(pwg_query($query)) ) )
  • trunk/plugins/LocalFilesEditor/maintain.inc.php

    r5196 r6654  
    2828  $query = '
    2929INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
    30 VALUES ("LocalFilesEditor" , "off" , "LocalFiles Editor plugin parameters");';
     30VALUES (\'LocalFilesEditor\' , \'off\' , \'LocalFiles Editor plugin parameters\');';
    3131
    3232  pwg_query($query);
     
    3737  global $prefixeTable;
    3838
    39   $query = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="LocalFilesEditor" LIMIT 1;';
     39  $query = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param=\'LocalFilesEditor\' LIMIT 1;';
    4040  pwg_query($query);
    4141}
  • trunk/plugins/c13y_upgrade/initialize.inc.php

    r6641 r6654  
    4848  upper('.$conf['user_fields']['email'].')
    4949having count(*) > 1
    50 limit 0,1
     50limit 1
    5151;';
    5252
Note: See TracChangeset for help on using the changeset viewer.