Changeset 6655


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

Bug 1755 fixed : Needs single quotes in queries official plugins
Merge from trunk

Location:
branches/2.1
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/admin/include/functions_upgrade.php

    r6551 r6655  
    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;';
  • branches/2.1/include/functions_category.inc.php

    r6364 r6655  
    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);
  • branches/2.1/picture.php

    r6614 r6655  
    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)) ) )
  • branches/2.1/plugins/LocalFilesEditor/maintain.inc.php

    r6364 r6655  
    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}
  • branches/2.1/plugins/c13y_upgrade/initialize.inc.php

    r6640 r6655  
    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.