• R/O
  • HTTP
  • SSH
  • HTTPS

nucleus-plugins: Commit

Nucleus CMS日本語版用プラグインのうち、日本語版開発者がサポートしているもの


Commit MetaInfo

Revision28db45305f4cb96ed1afa18b9d63630a159fe87d (tree)
Time2009-03-18 04:57:55
Authorkmorimatsu <kmorimatsu@1ca2...>
Commiterkmorimatsu

Log Message

SQLite: support using '-- ' as comment.

git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@986 1ca29b6e-896d-4ea0-84a5-967f57386b96

Change Summary

Incremental Difference

--- a/sqlite/trunk/nucleus/sqlite/sqlite.php
+++ b/sqlite/trunk/nucleus/sqlite/sqlite.php
@@ -1,7 +1,7 @@
11 <?php
22 /****************************************
33 * SQLite-MySQL wrapper for Nucleus *
4- * ver 0.9.0.4 *
4+ * ver 0.9.0.5 *
55 * Written by Katsumi *
66 ****************************************/
77
@@ -13,7 +13,7 @@ if (!function_exists('sqlite_open')) exit('Sorry, SQLite is not available from P
1313 require_once dirname(__FILE__) . '/sqliteconfig.php';
1414 $SQLITE_DBHANDLE=sqlite_open($SQLITECONF['DBFILENAME']);
1515 require_once dirname(__FILE__) . '/sqlitequeryfunctions.php';
16-$SQLITECONF['VERSION']='0.9.0.4';
16+$SQLITECONF['VERSION']='0.9.0.5';
1717
1818 //Following thing may work if MySQL is NOT installed in server.
1919 if (!function_exists('mysql_query')) {
@@ -111,6 +111,9 @@ function nucleus_mysql_query($p1,$p2=null,$unbuffered=false){//echo htmlspecialc
111111 if (strpos($query,"\xEF\xBB\xBF")===0) $query=substr($query,3);// UTF-8 stuff
112112 if (substr($query,-1)==';') $query=substr($query,0,strlen($query)-1);
113113
114+ // Remove MySQL specific comment, '-- '.
115+ $query=preg_replace('/($|[\r\n])\-\-[\s^\r\n]([^\r\n]*)/','',$query);
116+
114117 // Escape style is changed from MySQL type to SQLite type here.
115118 // This is important to avoid possible SQL-injection.
116119 $strpositions=array();// contains the data show where the strings are (startposition => endposition)
Show on old repository browser