From 683e2866c57a237090e2d63bebab8d889ee68de1 Mon Sep 17 00:00:00 2001 From: kjmtsh Date: Sat, 10 May 2014 00:36:11 +0000 Subject: [PATCH] tagging version 1.6.3 git-svn-id: https://plugins.svn.wordpress.org/sqlite-integration/tags/1.6.3@911419 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- db.php | 61 +- functions-5-2.php | 414 +++++- functions.php | 453 ++++++- index.php | 2 + install.php | 21 +- js/index.php | 2 + js/sqlite.js | 13 +- js/sqlite.min.js | 1 + languages/index.php | 2 + languages/sqlite-integration-es_ES.mo | Bin 0 -> 39590 bytes languages/sqlite-integration-es_ES.po | 1404 +++++++++++++++++++++ languages/sqlite-integration-ja.mo | Bin 43052 -> 46535 bytes languages/sqlite-integration-ja.po | 1015 ++++++++------- languages/sqlite-integration.pot | 1670 +++++++++++++------------ pdodb.class.php | 180 ++- pdoengine.class.php | 745 ++++++++--- query.class.php | 646 +++++++--- query_alter.class.php | 454 ++++--- query_create.class.php | 253 ++-- readme-ja.txt | 249 ++-- readme.txt | 229 ++-- schema.php | 41 +- sqlite-integration.php | 184 ++- styles/blue.css | 43 + styles/blue.min.css | 1 + styles/coffee.css | 42 + styles/coffee.min.css | 1 + styles/doc.css | 141 --- styles/ectoplasm.css | 42 + styles/ectoplasm.min.css | 1 + styles/index.php | 2 + styles/light.css | 44 + styles/light.min.css | 1 + styles/midnight.css | 46 + styles/midnight.min.css | 1 + styles/ocean.css | 42 + styles/ocean.min.css | 1 + styles/style.css | 284 ++++- styles/style.min.css | 1 + styles/sunrise.css | 42 + styles/sunrise.min.css | 1 + utilities/database_maintenance.php | 607 +++++++++ utilities/documentation.php | 84 +- utilities/index.php | 2 + utilities/patch.php | 137 +- utilities/plugin_lists.json | 772 +++++++++++- utilities/utility.php | 493 +++++++- 47 files changed, 8310 insertions(+), 2560 deletions(-) create mode 100644 index.php create mode 100644 js/index.php create mode 100644 js/sqlite.min.js create mode 100644 languages/index.php create mode 100644 languages/sqlite-integration-es_ES.mo create mode 100644 languages/sqlite-integration-es_ES.po create mode 100644 styles/blue.css create mode 100644 styles/blue.min.css create mode 100644 styles/coffee.css create mode 100644 styles/coffee.min.css delete mode 100644 styles/doc.css create mode 100644 styles/ectoplasm.css create mode 100644 styles/ectoplasm.min.css create mode 100644 styles/index.php create mode 100644 styles/light.css create mode 100644 styles/light.min.css create mode 100644 styles/midnight.css create mode 100644 styles/midnight.min.css create mode 100644 styles/ocean.css create mode 100644 styles/ocean.min.css create mode 100644 styles/style.min.css create mode 100644 styles/sunrise.css create mode 100644 styles/sunrise.min.css create mode 100644 utilities/database_maintenance.php create mode 100644 utilities/index.php diff --git a/db.php b/db.php index 3724300..4c665c2 100644 --- a/db.php +++ b/db.php @@ -1,16 +1,39 @@ + * define('USE_MYSQL', true); + * + * + * If you want to use SQLite, the line below will do. Or simply removing the line will + * be enough. + * + * + * define('USE_MYSQL', false); + * + */ +if (defined('USE_MYSQL') && USE_MYSQL) return; + +function pdo_log_error($message, $data = null) { if (strpos($_SERVER['SCRIPT_NAME'], 'wp-admin') !== false) { $admin_dir = ''; @@ -24,7 +47,7 @@ function pdo_log_erro($message, $data = null) { WordPress › Error - +

WordPress

@@ -38,24 +61,28 @@ HTML } if (version_compare( PHP_VERSION, '5.2.4', '<')) { - pdo_log_erro(__('PHP version on this server is too old.'), sprinf(__("Your server is running PHP version %d but this version of WordPress requires at least 5.2.4"), phpversion())); + pdo_log_error('PHP version on this server is too old.', sprinf("Your server is running PHP version %d but this version of WordPress requires at least 5.2.4", phpversion())); } if (!extension_loaded('pdo')) { - pdo_log_erro(__('PHP PDO Extension is not loaded.'), __('Your PHP installation appears to be missing the PDO extension which is required for this version of WordPress.')); + pdo_log_error('PHP PDO Extension is not loaded.', 'Your PHP installation appears to be missing the PDO extension which is required for this version of WordPress.'); } if (!extension_loaded('pdo_sqlite')) { - pdo_log_erro(__('PDO Driver for SQLite is missing.'), __('Your PHP installtion appears not to have the right PDO drivers loaded. These are required for this version of WordPress and the type of database you have specified.')); + pdo_log_error('PDO Driver for SQLite is missing.', 'Your PHP installtion appears not to have the right PDO drivers loaded. These are required for this version of WordPress and the type of database you have specified.'); } -/** +/* * Notice: * Your scripts have the permission to create directories or files on your server. * If you write in your wp-config.php like below, we take these definitions. * define('DB_DIR', '/full_path_to_the_database_directory/'); * define('DB_FILE', 'database_file_name'); */ + +/* + * PDODIR is SQLite Integration installed directory. + */ if (defined('WP_PLUGIN_DIR')) { define('PDODIR', WP_PLUGIN_DIR . '/sqlite-integration/'); } else { @@ -65,7 +92,10 @@ if (defined('WP_PLUGIN_DIR')) { define('PDODIR', ABSPATH . 'wp-content/plugins/sqlite-integration/'); } } - +/* + * FQDBDIR is a directory where the sqlite database file is placed. + * If DB_DIR is defined, it is used as FQDBDIR. + */ if (defined('DB_DIR')) { if (substr(DB_DIR, -1, 1) != '/') { define('FQDBDIR', DB_DIR . '/'); @@ -79,13 +109,18 @@ if (defined('DB_DIR')) { define('FQDBDIR', ABSPATH . 'wp-content/database/'); } } - +/* + * FQDB is a database file name. If DB_FILE is defined, it is used + * as FQDB. + */ if ( defined('DB_FILE' )) { define('FQDB', FQDBDIR . DB_FILE); } else { define('FQDB', FQDBDIR . '.ht.sqlite'); } - +/* + * UDF_FILE is a file that contains user defined functions. + */ if (version_compare(PHP_VERSION, '5.3', '<')) { define('UDF_FILE', PDODIR . 'functions-5-2.php'); } elseif (version_compare(PHP_VERSION, '5.3', '>=')) { diff --git a/functions-5-2.php b/functions-5-2.php index 6867473..8d5f2a5 100644 --- a/functions-5-2.php +++ b/functions-5-2.php @@ -1,24 +1,48 @@ + * new PDOSQLiteUDFS(ref_to_pdo_obj); + * + * + * This automatically enables ref_to_pdo_obj to replace the function in the SQL statement + * to the ones defined here. */ class PDOSQLiteUDFS { + /** + * Constructor + * + * Initialize the user defined functions to the PDO object with PDO::sqliteCreateFunction(). + * + * @param reference to PDO object $pdo + */ public function __construct(&$pdo){ foreach ($this->functions as $f=>$t) { $pdo->sqliteCreateFunction($f, array($this, $t)); } } - + /** + * Array to associate MySQL function to the substituted one. + * + * @var associative array + */ private $functions = array( 'month' => 'month', 'year' => 'year', @@ -42,7 +66,6 @@ class PDOSQLiteUDFS { 'subdate' => 'date_sub', 'localtime' => 'now', 'localtimestamp' => 'now', - //'date'=>'date', 'isnull' => 'isnull', 'if' => '_if', 'regexpp' => 'regexp', @@ -50,6 +73,7 @@ class PDOSQLiteUDFS { 'field' => 'field', 'log' => 'log', 'least' => 'least', + 'greatest' => 'greatest', 'get_lock' => 'get_lock', 'release_lock' => 'release_lock', 'ucase' => 'ucase', @@ -57,36 +81,92 @@ class PDOSQLiteUDFS { 'inet_ntoa' => 'inet_ntoa', 'inet_aton' => 'inet_aton', 'datediff' => 'datediff', - 'locate' => 'locate' + 'locate' => 'locate', + 'utc_date' => 'utc_date', + 'utc_time' => 'utc_time', + 'utc_timestamp' => 'utc_timestamp', + 'version' => 'version' ); - + /** + * Method to extract the month value from the date. + * + * @param string representing the date formated as 0000-00-00. + * @return string representing the number of the month between 1 and 12. + */ public function month($field){ $t = strtotime($field); return date('n', $t); } + /** + * Method to extract the year value from the date. + * + * @param string representing the date formated as 0000-00-00. + * @return string representing the number of the year. + */ public function year($field){ $t = strtotime($field); return date('Y', $t); } + /** + * Method to extract the day value from the date. + * + * @param string representing the date formated as 0000-00-00. + * @return string representing the number of the day of the month from 1 and 31. + */ public function day($field){ $t = strtotime($field); return date('j', $t); } + /** + * Method to return the unix timestamp. + * + * Used without an argument, it returns PHP time() function (total seconds passed + * from '1970-01-01 00:00:00' GMT). Used with the argument, it changes the value + * to the timestamp. + * + * @param string representing the date formated as '0000-00-00 00:00:00'. + * @return number of unsigned integer + */ public function unix_timestamp($field = null){ return is_null($field) ? time() : strtotime($field); } + /** + * Method to emulate MySQL SECOND() function. + * + * @param string representing the time formated as '00:00:00'. + * @return number of unsigned integer + */ public function second($field){ $t = strtotime($field); return intval( date("s", $t) ); } + /** + * Method to emulate MySQL MINUTE() function. + * + * @param string representing the time formated as '00:00:00'. + * @return number of unsigned integer + */ public function minute($field){ $t = strtotime($field); return intval(date("i", $t)); } + /** + * Method to emulate MySQL HOUR() function. + * + * @param string representing the time formated as '00:00:00'. + * @return number + */ public function hour($time){ list($hours, $minutes, $seconds) = explode(":", $time); return intval($hours); } + /** + * Method to emulate MySQL FROM_UNIXTIME() function. + * + * @param integer of unix timestamp + * @param string to indicate the way of formatting(optional) + * @return string formatted as '0000-00-00 00:00:00'. + */ public function from_unixtime($field, $format=null){ // $field is a timestamp //convert to ISO time @@ -95,25 +175,76 @@ class PDOSQLiteUDFS { return is_null($format) ? $date : $self->dateformat($date, $format); } + /** + * Method to emulate MySQL NOW() function. + * + * @return string representing current time formatted as '0000-00-00 00:00:00'. + */ public function now(){ return date("Y-m-d H:i:s"); } + /** + * Method to emulate MySQL CURDATE() function. + * + * @return string representing current time formatted as '0000-00-00'. + */ public function curdate() { return date("Y-m-d"); } + /** + * Method to emulate MySQL CHAR_LENGTH() function. + * + * @param string + * @return unsigned integer for the length of the argument. + */ public function char_length($field){ return strlen($field); } + /** + * Method to emulate MySQL MD5() function. + * + * @param string + * @return string of the md5 hash value of the argument. + */ public function md5($field){ return md5($field); } + /** + * Method to emulate MySQL RAND() function. + * + * SQLite does have a random generator, but it is called RANDOM() and returns random + * number between -9223372036854775808 and +9223372036854775807. So we substitute it + * with PHP random generator. + * + * This function uses mt_rand() which is four times faster than rand() and returns + * the random number between 0 and 1. + * + * @return unsigned integer + */ public function rand(){ - return rand(0,1); + return mt_rand(0,1); } + /** + * Method to emulate MySQL SUBSTRING() function. + * + * This function rewrites the function name to SQLite compatible substr(), + * which can manipulate UTF-8 characters. + * + * @param string $text + * @param integer $pos representing the start point. + * @param integer $len representing the length of the substring(optional). + * @return string + */ public function substring($text, $pos, $len=null){ - if (is_null($len)) return substr($text, $pos-1); - else return substr($text, $pos-1, $len); + return "substr($text, $pos, $len)"; } + /** + * Method to emulate MySQL DATEFORMAT() function. + * + * @param string date formatted as '0000-00-00' or datetime as '0000-00-00 00:00:00'. + * @param string $format + * @return string formatted according to $format + */ public function dateformat($date, $format){ $mysql_php_dateformats = array ( '%a' => 'D', '%b' => 'M', '%c' => 'n', '%D' => 'jS', '%d' => 'd', '%e' => 'j', '%H' => 'H', '%h' => 'h', '%I' => 'h', '%i' => 'i', '%j' => 'z', '%k' => 'G', '%l' => 'g', '%M' => 'F', '%m' => 'm', '%p' => 'A', '%r' => 'h:i:s A', '%S' => 's', '%s' => 's', '%T' => 'H:i:s', '%U' => 'W', '%u' => 'W', '%V' => 'W', '%v' => 'W', '%W' => 'l', '%w' => 'w', '%X' => 'Y', '%x' => 'o', '%Y' => 'Y', '%y' => 'y', ); $t = strtotime($date); @@ -121,6 +252,17 @@ class PDOSQLiteUDFS { $output = date($format, $t); return $output; } + /** + * Method to emulate MySQL DATE_ADD() function. + * + * This function adds the time value of $interval expression to $date. + * $interval is a single quoted strings rewritten by SQLiteQueryDriver::rewrite_query(). + * It is calculated in the private function deriveInterval(). + * + * @param string $date representing the start date. + * @param string $interval representing the expression of the time to add. + * @return string date formated as '0000-00-00 00:00:00'. + */ public function date_add($date, $interval) { $interval = $this->deriveInterval($interval); switch (strtolower($date)) { @@ -141,6 +283,17 @@ class PDOSQLiteUDFS { } return $returnval; } + /** + * Method to emulate MySQL DATE_SUB() function. + * + * This function substracts the time value of $interval expression from $date. + * $interval is a single quoted strings rewritten by SQLiteQueryDriver::rewrite_query(). + * It is calculated in the private function deriveInterval(). + * + * @param string $date representing the start date. + * @param string $interval representing the expression of the time to substract. + * @return string date formated as '0000-00-00 00:00:00'. + */ public function date_sub($date, $interval) { $interval = $this->deriveInterval($interval); switch (strtolower($date)) { @@ -161,7 +314,13 @@ class PDOSQLiteUDFS { } return $returnval; } - + /** + * Method to calculate the interval time between two dates value. + * + * @access private + * @param string $interval white space separated expression. + * @return string representing the time to add or substract. + */ private function deriveInterval($interval){ $interval = trim(substr(trim($interval), 8)); $parts = explode(' ', $interval); @@ -252,25 +411,60 @@ class PDOSQLiteUDFS { return false; } } - + /** + * Method to emulate MySQL DATE() function. + * + * @param string $date formatted as unix time. + * @return string formatted as '0000-00-00'. + */ public function date($date){ return date("Y-m-d", strtotime($date)); } - + /** + * Method to emulate MySQL ISNULL() function. + * + * This function returns true if the argument is null, and true if not. + * + * @param various types $field + * @return boolean + */ public function isnull($field){ return is_null($field); } - + /** + * Method to emulate MySQL IF() function. + * + * As 'IF' is a reserved word for PHP, function name must be changed. + * + * @param unknonw $expression the statement to be evaluated as true or false. + * @param unknown $true statement or value returned if $expression is true. + * @param unknown $false statement or value returned if $expression is false. + * @return unknown + */ public function _if($expression, $true, $false){ return ($expression == true) ? $true : $false; } - + /** + * Method to emulate MySQL REGEXP() function. + * + * @param string $field haystack + * @param string $pattern: regular expression to match. + * @return integer 1 if matched, 0 if not matched. + */ public function regexp($field, $pattern){ $pattern = str_replace('/', '\/', $pattern); $pattern = "/" . $pattern ."/i"; return preg_match ($pattern, $field); } - + /** + * Method to emulate MySQL CONCAT() function. + * + * SQLite does have CONCAT() function, but it has a different syntax from MySQL. + * So this function must be manipulated here. + * + * @param string + * @return NULL if the argument is null | string conatenated if the argument is given. + */ public function concat() { $returnValue = ""; $argsNum = func_num_args(); @@ -283,20 +477,48 @@ class PDOSQLiteUDFS { } return $returnValue; } - + /** + * Method to emulate MySQL FIELD() function. + * + * This function gets the list argument and compares the first item to all the others. + * If the same value is found, it returns the position of that value. If not, it + * returns 0. + * + * @param variable number of string, integer or double + * @return unsigned integer + */ public function field() { $numArgs = func_num_args(); if ($numArgs < 2 or is_null(func_get_arg(0))) { - return null; + return 0; } $arr = func_get_args(); $searchString = strtolower(array_shift($arr)); for ($i = 0; $i < $numArgs-1; $i++) { if ($searchString === strtolower($arr[$i])) return $i + 1; } - return null; + return 0; } - + /** + * Method to emulate MySQL LOG() function. + * + * Used with one argument, it returns the natural logarithm of X. + * + * LOG(X) + * + * Used with two arguments, it returns the natural logarithm of X base B. + * + * LOG(B, X) + * + * In this case, it returns the value of log(X) / log(B). + * + * Used without an argument, it returns false. This returned value will be + * rewritten to 0, because SQLite doesn't understand true/false value. + * + * @param integer representing the base of the logarithm, which is optional. + * @param double value to turn into logarithm. + * @return double | NULL + */ public function log() { $numArgs = func_num_args(); if ($numArgs == 1) { @@ -307,18 +529,36 @@ class PDOSQLiteUDFS { $arg2 = func_get_arg(1); return log($arg1)/log($arg2); } else { - return false; + return null; } } - - public function least() { - $arr = func_get_args(); - return min($arr); - } - /** - * These two functions are meaningless in SQLite - * So we return meaningless statement and do nothing + * Method to emulate MySQL LEAST() function. + * + * This function rewrites the function name to SQLite compatible function name. + * + * @return mixed + */ + public function least() { + $arg_list = func_get_args(); + return "min($arg_list)"; + } + /** + * Method to emulate MySQL GREATEST() function. + * + * This function rewrites the function name to SQLite compatible function name. + * + * @return mixed + */ + public function greatest() { + $arg_list = func_get_args(); + return "max($arg_list)"; + } + /** + * Method to dummy out MySQL GET_LOCK() function. + * + * This function is meaningless in SQLite, so we do nothing. + * * @param string $name * @param integer $timeout * @return string @@ -326,39 +566,75 @@ class PDOSQLiteUDFS { public function get_lock($name, $timeout) { return '1=1'; } + /** + * Method to dummy out MySQL RELEASE_LOCK() function. + * + * This function is meaningless in SQLite, so we do nothing. + * + * @param string $name + * @return string + */ public function release_lock($name) { return '1=1'; } - /** - * MySQL aliases for upper and lower functions - * @param unknown $string - * @return string + * Method to emulate MySQL UCASE() function. + * + * This is MySQL alias for upper() function. This function rewrites it + * to SQLite compatible name upper(). + * + * @param string + * @return string SQLite compatible function name. */ public function ucase($string) { return "upper($string)"; } + /** + * Method to emulate MySQL LCASE() function. + * + * This is MySQL alias for lower() function. This function rewrites it + * to SQLite compatible name lower(). + * + * @param string + * @return string SQLite compatible function name. + */ public function lcase($string) { return "lower($string)"; } - /** - * MySQL aliases for INET_NTOA and INET_ATON functions - * @param unsigned integer, string respectively - * @return string, unsigned integer respectively + * Method to emulate MySQL INET_NTOA() function. + * + * This function gets 4 or 8 bytes integer and turn it into the network address. + * + * @param unsigned long integer + * @return string */ public function inet_ntoa($num) { return long2ip($num); } + /** + * Method to emulate MySQL INET_ATON() function. + * + * This function gets the network address and turns it into integer. + * + * @param string + * @return unsigned long integer + */ public function inet_aton($addr) { $int_data = ip2long($addr); $unsigned_int_data = sprintf('%u', $address); return $unsigned_int_data; } - /** - * MySQL aliase for DATEDIFF function - * @param string, string + * Method to emulate MySQL DATEDIFF() function. + * + * This function compares two dates value and returns the difference. + * + * PHP 5.3.2 has a serious bug in DateTime::diff(). So if users' PHP is that version, + * we don't use that function. See https://bugs.php.net/bug.php?id=51184. + * + * @param string start + * @param string end * @return string */ public function datediff($start, $end) { @@ -368,7 +644,16 @@ class PDOSQLiteUDFS { return $interval; } /** - * emulates MySQL LOCATE() function + * Method to emulate MySQL LOCATE() function. + * + * This function returns the position if $substr is found in $str. If not, + * it returns 0. If mbstring extension is loaded, mb_strpos() function is + * used. + * + * @param string needle + * @param string haystack + * @param integer position + * @return integer */ public function locate($substr, $str, $pos = 0) { if (!extension_loaded('mbstring')) { @@ -385,5 +670,46 @@ class PDOSQLiteUDFS { } } } + /** + * Method to return GMT date in the string format. + * + * @param none + * @return string formatted GMT date 'dddd-mm-dd' + */ + public function utc_date() { + return gmdate('Y-m-d', time()); + } + /** + * Method to return GMT time in the string format. + * + * @param none + * @return string formatted GMT time '00:00:00' + */ + public function utc_time() { + return gmdate('H:i:s', time()); + } + /** + * Method to return GMT time stamp in the string format. + * + * @param none + * @return string formatted GMT timestamp 'yyyy-mm-dd 00:00:00' + */ + public function utc_timestamp() { + return gmdate('Y-m-d H:i:s', time()); + } + /** + * Method to return MySQL version. + * + * This function only returns the current newest version number of MySQL, + * because it is meaningless for SQLite database. + * + * @param none + * @return string representing the version number: major_version.minor_version + */ + public function version() { +// global $required_mysql_version; +// return $required_mysql_version; + return '5.5'; + } } ?> \ No newline at end of file diff --git a/functions.php b/functions.php index 8cb715c..7dd6247 100644 --- a/functions.php +++ b/functions.php @@ -1,24 +1,50 @@ + * new PDOSQLiteUDFS(ref_to_pdo_obj); + * + * + * This automatically enables ref_to_pdo_obj to replace the function in the SQL statement + * to the ones defined here. */ class PDOSQLiteUDFS { + /** + * The class constructor + * + * Initializes the use defined functions to PDO object with PDO::sqliteCreateFunction(). + * + * @param reference to PDO object $pdo + */ public function __construct(&$pdo){ foreach ($this->functions as $f=>$t) { $pdo->sqliteCreateFunction($f, array($this, $t)); } } - + /** + * array to define MySQL function => function defined with PHP. + * + * Replaced functions must be public. + * + * @var associative array + */ private $functions = array( 'month' => 'month', 'year' => 'year', @@ -42,7 +68,6 @@ class PDOSQLiteUDFS { 'subdate' => 'date_sub', 'localtime' => 'now', 'localtimestamp' => 'now', - //'date'=>'date', 'isnull' => 'isnull', 'if' => '_if', 'regexpp' => 'regexp', @@ -50,7 +75,7 @@ class PDOSQLiteUDFS { 'field' => 'field', 'log' => 'log', 'least' => 'least', - 'replace' => 'replace', + 'greatest' => 'greatest', 'get_lock' => 'get_lock', 'release_lock' => 'release_lock', 'ucase' => 'ucase', @@ -58,110 +83,245 @@ class PDOSQLiteUDFS { 'inet_ntoa' => 'inet_ntoa', 'inet_aton' => 'inet_aton', 'datediff' => 'datediff', - 'locate' => 'locate' + 'locate' => 'locate', + 'utc_date' => 'utc_date', + 'utc_time' => 'utc_time', + 'utc_timestamp' => 'utc_timestamp', + 'version' => 'version' ); - + /** + * Method to extract the month value from the date. + * + * @param string representing the date formated as 0000-00-00. + * @return string representing the number of the month between 1 and 12. + */ public function month($field){ $t = strtotime($field); return date('n', $t); } + /** + * Method to extract the year value from the date. + * + * @param string representing the date formated as 0000-00-00. + * @return string representing the number of the year. + */ public function year($field){ $t = strtotime($field); return date('Y', $t); } + /** + * Method to extract the day value from the date. + * + * @param string representing the date formated as 0000-00-00. + * @return string representing the number of the day of the month from 1 and 31. + */ public function day($field){ $t = strtotime($field); return date('j', $t); } + /** + * Method to return the unix timestamp. + * + * Used without an argument, it returns PHP time() function (total seconds passed + * from '1970-01-01 00:00:00' GMT). Used with the argument, it changes the value + * to the timestamp. + * + * @param string representing the date formated as '0000-00-00 00:00:00'. + * @return number of unsigned integer + */ public function unix_timestamp($field = null){ return is_null($field) ? time() : strtotime($field); } + /** + * Method to emulate MySQL SECOND() function. + * + * @param string representing the time formated as '00:00:00'. + * @return number of unsigned integer + */ public function second($field){ $t = strtotime($field); return intval( date("s", $t) ); } + /** + * Method to emulate MySQL MINUTE() function. + * + * @param string representing the time formated as '00:00:00'. + * @return number of unsigned integer + */ public function minute($field){ $t = strtotime($field); return intval(date("i", $t)); } + /** + * Method to emulate MySQL HOUR() function. + * + * @param string representing the time formated as '00:00:00'. + * @return number + */ public function hour($time){ list($hours, $minutes, $seconds) = explode(":", $time); return intval($hours); } + /** + * Method to emulate MySQL FROM_UNIXTIME() function. + * + * @param integer of unix timestamp + * @param string to indicate the way of formatting(optional) + * @return string formatted as '0000-00-00 00:00:00'. + */ public function from_unixtime($field, $format=null){ // $field is a timestamp //convert to ISO time $date = date("Y-m-d H:i:s", $field); //now submit to dateformat - return is_null($format) ? $date : $self->dateformat($date, $format); } + /** + * Method to emulate MySQL NOW() function. + * + * @return string representing current time formatted as '0000-00-00 00:00:00'. + */ public function now(){ return date("Y-m-d H:i:s"); } + /** + * Method to emulate MySQL CURDATE() function. + * + * @return string representing current time formatted as '0000-00-00'. + */ public function curdate() { return date("Y-m-d"); } + /** + * Method to emulate MySQL CHAR_LENGTH() function. + * + * @param string + * @return unsigned integer for the length of the argument. + */ public function char_length($field){ return strlen($field); } + /** + * Method to emulate MySQL MD5() function. + * + * @param string + * @return string of the md5 hash value of the argument. + */ public function md5($field){ return md5($field); } + /** + * Method to emulate MySQL RAND() function. + * + * SQLite does have a random generator, but it is called RANDOM() and returns random + * number between -9223372036854775808 and +9223372036854775807. So we substitute it + * with PHP random generator. + * + * This function uses mt_rand() which is four times faster than rand() and returns + * the random number between 0 and 1. + * + * @return unsigned integer + */ public function rand(){ - return rand(0,1); + return mt_rand(0, 1); } + /** + * Method to emulate MySQL SUBSTRING() function. + * + * This function rewrites the function name to SQLite compatible substr(), + * which can manipulate UTF-8 characters. + * + * @param string $text + * @param integer $pos representing the start point. + * @param integer $len representing the length of the substring(optional). + * @return string + */ public function substring($text, $pos, $len=null){ - if (is_null($len)) return substr($text, $pos-1); - else return substr($text, $pos-1, $len); + return "substr($text, $pos, $len)"; } + /** + * Method to emulate MySQL DATEFORMAT() function. + * + * @param string date formatted as '0000-00-00' or datetime as '0000-00-00 00:00:00'. + * @param string $format + * @return string formatted according to $format + */ public function dateformat($date, $format){ $mysql_php_dateformats = array ( '%a' => 'D', '%b' => 'M', '%c' => 'n', '%D' => 'jS', '%d' => 'd', '%e' => 'j', '%H' => 'H', '%h' => 'h', '%I' => 'h', '%i' => 'i', '%j' => 'z', '%k' => 'G', '%l' => 'g', '%M' => 'F', '%m' => 'm', '%p' => 'A', '%r' => 'h:i:s A', '%S' => 's', '%s' => 's', '%T' => 'H:i:s', '%U' => 'W', '%u' => 'W', '%V' => 'W', '%v' => 'W', '%W' => 'l', '%w' => 'w', '%X' => 'Y', '%x' => 'o', '%Y' => 'Y', '%y' => 'y', ); - $t = strtotime($date); + $t = strtotime($date); $format = strtr($format, $mysql_php_dateformats); $output = date($format, $t); return $output; } + /** + * Method to emulate MySQL DATE_ADD() function. + * + * This function adds the time value of $interval expression to $date. + * $interval is a single quoted strings rewritten by SQLiteQueryDriver::rewrite_query(). + * It is calculated in the private function deriveInterval(). + * + * @param string $date representing the start date. + * @param string $interval representing the expression of the time to add. + * @return string date formated as '0000-00-00 00:00:00'. + */ public function date_add($date, $interval) { $interval = $this->deriveInterval($interval); switch (strtolower($date)) { case "curdate()": - $objDate = new Datetime($this->curdate()); + $objDate = new Datetime($this->curdate()); $objDate->add(new DateInterval($interval)); $returnval = $objDate->format("Y-m-d"); break; case "now()": - $objDate = new Datetime($this->now()); + $objDate = new Datetime($this->now()); $objDate->add(new DateInterval($interval)); $returnval = $objDate->format("Y-m-d H:i:s"); break; default: - $objDate = new Datetime($date); + $objDate = new Datetime($date); $objDate->add(new DateInterval($interval)); $returnval = $objDate->format("Y-m-d H:i:s"); } return $returnval; } + /** + * Method to emulate MySQL DATE_SUB() function. + * + * This function substracts the time value of $interval expression from $date. + * $interval is a single quoted strings rewritten by SQLiteQueryDriver::rewrite_query(). + * It is calculated in the private function deriveInterval(). + * + * @param string $date representing the start date. + * @param string $interval representing the expression of the time to substract. + * @return string date formated as '0000-00-00 00:00:00'. + */ public function date_sub($date, $interval) { $interval = $this->deriveInterval($interval); switch (strtolower($date)) { case "curdate()": - $objDate = new Datetime($this->curdate()); + $objDate = new Datetime($this->curdate()); $objDate->sub(new DateInterval($interval)); $returnval = $objDate->format("Y-m-d"); break; case "now()": - $objDate = new Datetime($this->now()); + $objDate = new Datetime($this->now()); $objDate->sub(new DateInterval($interval)); $returnval = $objDate->format("Y-m-d H:i:s"); break; default: - $objDate = new Datetime($date); + $objDate = new Datetime($date); $objDate->sub(new DateInterval($interval)); $returnval = $objDate->format("Y-m-d H:i:s"); } return $returnval; } + /** + * Method to calculate the interval time between two dates value. + * + * @access private + * @param string $interval white space separated expression. + * @return string representing the time to add or substract. + */ private function deriveInterval($interval) { $interval = trim(substr(trim($interval), 8)); $parts = explode(' ', $interval); @@ -202,7 +362,7 @@ class PDOSQLiteUDFS { return 'P' . $days . 'D' . 'T' . $hours . 'H' . $minutes . 'M'; break; case "day_hour": - $days = intval($_parts[0]); + $days = intval($_parts[0]); $hours = intval($_parts[1]); return 'P' . $days . 'D' . 'T' . $hours . 'H'; break; @@ -212,28 +372,63 @@ class PDOSQLiteUDFS { break; } } - + /** + * Method to emulate MySQL DATE() function. + * + * @param string $date formatted as unix time. + * @return string formatted as '0000-00-00'. + */ public function date($date){ return date("Y-m-d", strtotime($date)); } - + /** + * Method to emulate MySQL ISNULL() function. + * + * This function returns true if the argument is null, and true if not. + * + * @param various types $field + * @return boolean + */ public function isnull($field){ return is_null($field); } - + /** + * Method to emulate MySQL IF() function. + * + * As 'IF' is a reserved word for PHP, function name must be changed. + * + * @param unknonw $expression the statement to be evaluated as true or false. + * @param unknown $true statement or value returned if $expression is true. + * @param unknown $false statement or value returned if $expression is false. + * @return unknown + */ public function _if($expression, $true, $false){ return ($expression == true) ? $true : $false; } - + /** + * Method to emulate MySQL REGEXP() function. + * + * @param string $field haystack + * @param string $pattern: regular expression to match. + * @return integer 1 if matched, 0 if not matched. + */ public function regexp($field, $pattern){ $pattern = str_replace('/', '\/', $pattern); $pattern = "/" . $pattern ."/i"; return preg_match ($pattern, $field); } - + /** + * Method to emulate MySQL CONCAT() function. + * + * SQLite does have CONCAT() function, but it has a different syntax from MySQL. + * So this function must be manipulated here. + * + * @param string + * @return NULL if the argument is null | string conatenated if the argument is given. + */ public function concat() { $returnValue = ""; - $argsNum = func_num_args(); + $argsNum = func_num_args(); $argsList = func_get_args(); for ($i = 0; $i < $argsNum; $i++) { if (is_null($argsList[$i])) { @@ -243,20 +438,51 @@ class PDOSQLiteUDFS { } return $returnValue; } - + /** + * Method to emulate MySQL FIELD() function. + * + * This function gets the list argument and compares the first item to all the others. + * If the same value is found, it returns the position of that value. If not, it + * returns 0. + * + * @param variable number of string, integer or double + * @return unsigned integer + */ public function field() { $numArgs = func_num_args(); if ($numArgs < 2 or is_null(func_get_arg(0))) { - return null; + return 0; + } else { + $arg_list = func_get_args(); } - $arr = func_get_args(); - $searchString = strtolower(array_shift($arr)); + $searchString = array_shift($arg_list); for ($i = 0; $i < $numArgs-1; $i++) { - if ($searchString === strtolower($arr[$i])) return $i + 1; + if ($searchString === strtolower($arg_list[$i])) { + return $i + 1; + } } - return null; + return 0; } - + /** + * Method to emulate MySQL LOG() function. + * + * Used with one argument, it returns the natural logarithm of X. + * + * LOG(X) + * + * Used with two arguments, it returns the natural logarithm of X base B. + * + * LOG(B, X) + * + * In this case, it returns the value of log(X) / log(B). + * + * Used without an argument, it returns false. This returned value will be + * rewritten to 0, because SQLite doesn't understand true/false value. + * + * @param integer representing the base of the logarithm, which is optional. + * @param double value to turn into logarithm. + * @return double | NULL + */ public function log() { $numArgs = func_num_args(); if ($numArgs == 1) { @@ -267,22 +493,36 @@ class PDOSQLiteUDFS { $arg2 = func_get_arg(1); return log($arg1)/log($arg2); } else { - return false; + return null; } } - + /** + * Method to emulate MySQL LEAST() function. + * + * This function rewrites the function name to SQLite compatible function name. + * + * @return mixed + */ public function least() { - $arr = func_get_args(); - return min($arr); + $arg_list = func_get_args(); + return "min($arg_list)"; } - - public function replace($haystack, $needle, $replace) { - return str_replace($needle, $replace, $haystack); - } - /** - * These two functions are meaningless in SQLite - * So we return meaningless statement and do nothing + * Method to emulate MySQL GREATEST() function. + * + * This function rewrites the function name to SQLite compatible function name. + * + * @return mixed + */ + public function greatest() { + $arg_list = func_get_args(); + return "max($arg_list)"; + } + /** + * Method to dummy out MySQL GET_LOCK() function. + * + * This function is meaningless in SQLite, so we do nothing. + * * @param string $name * @param integer $timeout * @return string @@ -290,30 +530,61 @@ class PDOSQLiteUDFS { public function get_lock($name, $timeout) { return '1=1'; } + /** + * Method to dummy out MySQL RELEASE_LOCK() function. + * + * This function is meaningless in SQLite, so we do nothing. + * + * @param string $name + * @return string + */ public function release_lock($name) { return '1=1'; } - /** - * MySQL aliases for upper and lower functions - * @param $string - * @return string + * Method to emulate MySQL UCASE() function. + * + * This is MySQL alias for upper() function. This function rewrites it + * to SQLite compatible name upper(). + * + * @param string + * @return string SQLite compatible function name. */ public function ucase($string) { return "upper($string)"; } + /** + * Method to emulate MySQL LCASE() function. + * + * + * This is MySQL alias for lower() function. This function rewrites it + * to SQLite compatible name lower(). + * + * @param string + * @return string SQLite compatible function name. + */ public function lcase($string) { return "lower($string)"; } - /** - * MySQL aliases for INET_NTOA and INET_ATON functions - * @param unsigned integer, string respectively - * @return string, unsigned integer respectively + * Method to emulate MySQL INET_NTOA() function. + * + * This function gets 4 or 8 bytes integer and turn it into the network address. + * + * @param unsigned long integer + * @return string */ public function inet_ntoa($num) { return long2ip($num); } + /** + * Method to emulate MySQL INET_ATON() function. + * + * This function gets the network address and turns it into integer. + * + * @param string + * @return unsigned long integer + */ public function inet_aton($addr) { $int_data = ip2long($addr); $unsigned_int_data = sprintf('%u', $address); @@ -321,28 +592,41 @@ class PDOSQLiteUDFS { } /** - * MySQL aliase for DATEDIFF function - * @param string, string + * Method to emulate MySQL DATEDIFF() function. + * + * This function compares two dates value and returns the difference. + * + * PHP 5.3.2 has a serious bug in DateTime::diff(). So if users' PHP is that version, + * we don't use that function. See https://bugs.php.net/bug.php?id=51184. + * + * @param string start + * @param string end * @return string */ public function datediff($start, $end) { - /* PHP 5.3.2 has a serious bug in DateTime::diff() - * see https://bugs.php.net/bug.php?id=51184 - */ if (version_compare(PHP_VERSION, '5.3.2', '==')) { $start_date = strtotime($start); $end_date = strtotime($end); - $interval = floor(($start_date - $end_date)/(3600*24)); + $interval = floor(($start_date - $end_date)/(3600*24)); return $interval; } else { $start_date = new DateTime($start); - $end_date = new DateTime($end); - $interval = $end_date->diff($start_date, false); + $end_date = new DateTime($end); + $interval = $end_date->diff($start_date, false); return $interval->format('%r%a'); } } /** - * emulates MySQL LOCATE() function + * Method to emulate MySQL LOCATE() function. + * + * This function returns the position if $substr is found in $str. If not, + * it returns 0. If mbstring extension is loaded, mb_strpos() function is + * used. + * + * @param string needle + * @param string haystack + * @param integer position + * @return integer */ public function locate($substr, $str, $pos = 0) { if (!extension_loaded('mbstring')) { @@ -359,5 +643,46 @@ class PDOSQLiteUDFS { } } } + /** + * Method to return GMT date in the string format. + * + * @param none + * @return string formatted GMT date 'dddd-mm-dd' + */ + public function utc_date() { + return gmdate('Y-m-d', time()); + } + /** + * Method to return GMT time in the string format. + * + * @param none + * @return string formatted GMT time '00:00:00' + */ + public function utc_time() { + return gmdate('H:i:s', time()); + } + /** + * Method to return GMT time stamp in the string format. + * + * @param none + * @return string formatted GMT timestamp 'yyyy-mm-dd 00:00:00' + */ + public function utc_timestamp() { + return gmdate('Y-m-d H:i:s', time()); + } + /** + * Method to return MySQL version. + * + * This function only returns the current newest version number of MySQL, + * because it is meaningless for SQLite database. + * + * @param none + * @return string representing the version number: major_version.minor_version + */ + public function version() { +// global $required_mysql_version; +// return $required_mysql_version; + return '5.5'; + } } ?> \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..29d690a --- /dev/null +++ b/index.php @@ -0,0 +1,2 @@ +

'; + echo $server_message; + echo '

'; + } + return array('url' => $guessurl, 'user_id' => $user_id, 'password' => $user_password, 'password_message' => $message); } ?> \ No newline at end of file diff --git a/js/index.php b/js/index.php new file mode 100644 index 0000000..29d690a --- /dev/null +++ b/js/index.php @@ -0,0 +1,2 @@ +') diff --git a/js/sqlite.min.js b/js/sqlite.min.js new file mode 100644 index 0000000..a27987e --- /dev/null +++ b/js/sqlite.min.js @@ -0,0 +1 @@ +jQuery(document).ready(function($){function stripe(arg){$(arg).find("tr.alt").removeClass("alt");var $args=arg+" tbody";$($args).each(function(){$(this).children(":visible").has("td").filter(function(index){return 1==index%2}).addClass("alt")})}var $table=null,$headers=null;null!=document.getElementById("sqlite-table")?($table=$("#sqlite-table"),$headers=$table.find("thead th").slice(0,2)):null!=document.getElementById("plugins-table")?($table=$("#plugins-table"),$headers=$table.find("thead th").slice(0)):null!=document.getElementById("patch-files")?($table=$("#patch-files"),$headers=$table.find("thead th").slice(1)):null!=document.getElementById("backup-files")&&($table=$("#backup-files"),$headers=$table.find("thead th").slice(1)),$headers.wrapInner('').addClass("sort");var rows=$table.find("tbody > tr").get();$headers.bind("click",function(event){event.preventDefault();var $header=$(this),sortKey=$header.data("sort").key,sortDirection=1;$header.hasClass("sorted-asc")&&(sortDirection=-1),rows.sort(function(a,b){var keyA=$(a).data("table")[sortKey],keyB=$(b).data("table")[sortKey];return keyB>keyA?-sortDirection:keyA>keyB?sortDirection:0}),$headers.removeClass("sorted-asc sortd-desc"),$headers.addClass(1==sortDirection?"sorted-asc":"sorted-desc"),$.each(rows,function(index,row){$table.children("tbody").append(row)}),stripe("#plugins-table"),stripe("#sqlite-table"),stripe("#patch-files")}),stripe("#plugins-table"),stripe("#sys-info"),stripe("#sqlite-table"),stripe("#status"),stripe("#patch-files")}),jQuery(document).ready(function($){function stripe(arg){$(arg).find("tr.alt").removeClass("alt");var $args=arg+" tbody";$($args).each(function(){$(this).children(":visible").has("td").filter(function(index){return 1==index%2}).addClass("alt")})}var $table=$("#plugins-info"),$headers=$table.find("thead th").slice(0);$headers.wrapInner('').addClass("sort");var rows=$table.find("tbody > tr").get();$headers.bind("click",function(event){event.preventDefault();var $header=$(this),sortKey=$header.data("sort").key,sortDirection=1;$header.hasClass("sorted-asc")&&(sortDirection=-1),rows.sort(function(a,b){var keyA=$(a).data("table")[sortKey],keyB=$(b).data("table")[sortKey];return keyB>keyA?-sortDirection:keyA>keyB?sortDirection:0}),$headers.removeClass("sorted-asc sortd-desc"),$headers.addClass(1==sortDirection?"sorted-asc":"sorted-desc"),$.each(rows,function(index,row){$table.children("tbody").append(row)}),stripe("#plugins-info")}),stripe("#plugins-info")}); \ No newline at end of file diff --git a/languages/index.php b/languages/index.php new file mode 100644 index 0000000..29d690a --- /dev/null +++ b/languages/index.php @@ -0,0 +1,2 @@ +$^}3Ug0G*_pUXv!h6kXkk5lC~Z-mR+F{ocEk zci*e(YBxYY1YFPo)G%m984VI#S`mT+La8WJMdk=-M~iz z{~5Rm_>dLy( zlbDR)BJfJ!F9J1=PXZqW{0xw$lP>~O;N!nBNtk+aEl}g!1$;R0DDV-$TY(=2X27eM z@0CySakro9?G`}cXBnvWUk-d6@O9z(TY#G9d7#>V4^Zv@4)7A-9|8F<`DgxjIq-?8 zzrP3g49-si)&5I?OfmUBASh3M8u$pt^FE-)|64RBy#78={rp)t|7MP!`-2Sr zjt7B9py+)FB1b8n{`1zFpe;cUh|2Uj~3MhW~LOA~_8u=>DzZNL|xCkhEOaax- z5#Uz?Zv%=Bw*zkm4uBfxdw}An4*(?>9|P*We+=-!SNS|14b=4%D7n}M6rQgIYCJPQ z^_u|^(d4B8z6p38=f4CL{XZYz!>>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nos-+lTEOTUbb0~6uaU)y=O2=I$ zv+B+>5xde|V@YYZB;#_!Cc82Xo`-9`$<-KKnX(ADf`Kbl8jV`msYBmnG>EJZGh)HQ zdhUo_X*pbXLy`phE&n!HcHwB;gRIwUE%A6XENz)f5(uYNi|BNrs+zkNxCfMV^);J` zw3QWTCDB(j8js7`$562HqVRYro0UHh#YKZfs#N*u-!sC4mCiCvNqv)w(^xi8_65h1 z_&#{QRl)9VI10HAU#%1L;wzEgYo)PfG-i%@d7>cK)j)_1S)X%*I!Sg=6O#@Mc%7sM zZSDy%ef%9#UGO;!DgB^2HmiWaZo}pF4T&LrI9e`J|000=c0IFkBvfX91H%DY?m9>| zMOBD+G>nh$7Ul=`&s~k!*@FFQ+QlUy$1GNy96tVFtXY>NTe&251~#Zxz-9MCO^I*M z&LGaCRT0x%g-orx@;Sdj~9WkC+9Kt|uG`>U9&2a?) zaha;Dk!2X8ibnX+g9PemZ~F!#o_j8912Qln6N0t#blZ lDB@QoM3!DY%7OyyFcyaCjTl(-AqBP<`h;+rRDY|L{C@%U&}9Gs literal 0 HcmV?d00001 diff --git a/languages/sqlite-integration-es_ES.po b/languages/sqlite-integration-es_ES.po new file mode 100644 index 0000000..e78cd4a --- /dev/null +++ b/languages/sqlite-integration-es_ES.po @@ -0,0 +1,1404 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: sqlite-integration\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-02-06 01:39+0900\n" +"PO-Revision-Date: 2014-05-07 20:49-0300\n" +"Last-Translator: Pablo Laguna \n" +"Language-Team: \n" +"Language: es_ES\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.6.4\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: sqlite-integration.php:205 sqlite-integration.php:235 +msgid "SQLite Integration" +msgstr "SQLite Integration" + +#: install.php:47 +msgid "" +"Note that password carefully! It is a random password that was generated just for you." +msgstr "" +"Guarde esta contraseña con cuidado. Es una " +"contraseña aleatoria que fue generada exclusivamente para usted." + +#: install.php:52 +msgid "Your chosen password." +msgstr "Su contraseña seleccionada." + +#: install.php:63 +msgid "The password you chose during the install." +msgstr "La contraseña que seleccionó durante la instalación." + +#: pdodb.class.php:127 +#, php-format +msgid "WordPress database error %1$s for query %2$s made by %3$s" +msgstr "" +"Error %1$s en la base de datos de WordPress para la query %2$s hecha por %3$s" + +#: pdodb.class.php:129 +#, php-format +msgid "WordPress database error %1$s for query %2$s" +msgstr "Error %1$s en la base de datos de WordPress para la query %2$s" + +#: pdodb.class.php:185 +#, php-format +msgid "" +"

Error establlishing a database connection

We have been unable to " +"connect to the specified database.
The error message received was %s" +msgstr "" +"

Error estableciendo conexión con la base de datos

No pudimos " +"conectar con la base de datos especificada.
El mensaje de error " +"recibido fue %s" + +#: pdoengine.class.php:291 +#, php-format +msgid "" +"

Unknown query type

Sorry, we cannot determine the type of query " +"that is requested.

The query is %s

" +msgstr "" +"

Tipo de query desconocido

Disculpe, no pudimos determinar el tipo " +"de query que es requerido.

La query es %s

" + +#: utility.php:294 utility.php:296 documentation.php:134 +msgid "Needs Patch" +msgstr "Parche requerido" + +#: utility.php:300 documentation.php:136 +msgid "Probably No" +msgstr "Probablemente no" + +#: utility.php:303 +msgid "Probably Yes" +msgstr "Probablemente sí" + +#: utility.php:306 documentation.php:138 +msgid "No" +msgstr "No" + +#: utility.php:310 +msgid "Checked*" +msgstr "Revisado*" + +#: utility.php:312 +msgid "Checked" +msgstr "Revisado" + +#: utility.php:316 utility.php:322 +msgid "Not Checked" +msgstr "No revisado" + +#: utility.php:327 +msgid "Sitewide Active" +msgstr "Activo en todo el sitio" + +#: utility.php:330 +msgid "Active" +msgstr "Activo" + +#: utility.php:333 +msgid "Inactive" +msgstr "Inactivo" + +#: utility.php:434 utility.php:444 +msgid " was created." +msgstr "fue creado." + +#: utility.php:436 utility.php:446 +msgid " was not created." +msgstr "no fue creado." + +#: utility.php:472 +#, php-format +msgid "File %s was deleted." +msgstr "El fichero %s fue eliminado." + +#: utility.php:474 +msgid "Error! File was not deleted." +msgstr "Error. El fichero no fue eliminado." + +#: utility.php:534 +msgid "Welcome to SQLite Integration" +msgstr "Bienvenido a SQLite Integration" + +#: utility.php:536 +msgid "Thank you for using SQLite Integration plugin!" +msgstr "¡Gracias por utilizar el plugin SQLite Integration!" + +#: utility.php:539 +msgid "" +"You read this message, which means you have succeeded in installing " +"WordPress with this plugin SQLite Integration. Congratulations and enjoy " +"your Blogging!" +msgstr "" +"Si lee este mensaje, significa que tuvo éxito al instalar WordPress con el " +"plugin SQLite Integration. ¡Felicidades y disfrute publicando!" + +#: utility.php:542 +msgid "" +"You don't have to set any special settings. In fact there are no other " +"settings. You can write articles or pages and customize you WordPress in an " +"ordinary way. You want to install your plugins? All right, go ahead. But " +"some of them may be incompatible with this. Please read more information " +"about this plugin and your SQLite database below." +msgstr "" +"No tiene que establecer ninguna configuración especial. De hecho no hay " +"otras configuraciones. Puede escribir entradas o páginas y personalizar su " +"WordPress con normalidad. ¿Desea instalar plugins? Sin problema, hágalo. " +"Quizás algunos sean incompatibles. Por favor, lea más información de este " +"plugin y su base de datos SQLite a continuación." + +#: utility.php:544 +msgid "" +"Deactivation makes this documents and utilities disappear from the " +"dashboard, but it doesn't affect the functionality of the SQLite " +"Integration. when uninstalled, it will remove wp-content/uploads/patches " +"directory (if exists) and wp-content/db.php file altogether." +msgstr "" +"La desactivación hará desaparecer de su tablero estos documentos y " +"utilidades, pero no afectará al funcionamiento de SQLite Integration. Cuando " +"desinstale, se eliminará el directorio wp-content/uploads/patches (si " +"existe) y también el fichero wp-content/db.php." + +#: utility.php:547 +msgid "Title" +msgstr "Título" + +#: utility.php:548 +msgid "Contents" +msgstr "Contenidos" + +#: utility.php:552 utility.php:590 utility.php:867 +#: database_maintenance.php:453 documentation.php:30 documentation.php:38 +#: patch.php:296 +msgid "Documentation" +msgstr "Documentación" + +#: utility.php:553 +msgid "You can read documentation about this plugin and plugin compatibility." +msgstr "" +"Puede leer documentación sobre este plugin y la compatibilidad de plugins." + +#: utility.php:556 utility.php:591 utility.php:868 +#: database_maintenance.php:454 documentation.php:31 patch.php:297 +msgid "System Info" +msgstr "Información del sistema" + +#: utility.php:557 +msgid "You can see database and system information." +msgstr "Puede ver información de la base de datos y del sistema." + +#: utility.php:560 utility.php:592 utility.php:869 +#: database_maintenance.php:455 documentation.php:32 patch.php:298 +msgid "Miscellaneous" +msgstr "Herramientas" + +#: utility.php:561 +msgid "" +"You can see the error log and edit db.php file (if necessary) and optimize " +"your database." +msgstr "" +"Puede ver el registro de errores y editar el fichero db.php (si lo necesita) " +"y optimizar su base de datos." + +#: utility.php:564 utility.php:593 utility.php:870 +#: database_maintenance.php:456 documentation.php:33 patch.php:299 +msgid "Patch Utility" +msgstr "Parches" + +#: utility.php:565 +msgid "You can upload patch files and apply them to the incompatible plugins." +msgstr "Puede subir subir parches y aplicarlos a los plugins incompatibles." + +#: utility.php:568 utility.php:594 utility.php:871 +#: database_maintenance.php:457 documentation.php:34 patch.php:300 +msgid "Maintenance" +msgstr "Mantenimiento" + +#: utility.php:569 +msgid "You can check your database and fix it if needed." +msgstr "Puede revisar su base de datos y repararla si lo necesita." + +#: utility.php:583 utility.php:585 utility.php:774 utility.php:776 +#: database_maintenance.php:446 database_maintenance.php:448 +#: documentation.php:23 documentation.php:25 patch.php:236 patch.php:238 +msgid "You are not allowed to access this page!" +msgstr "No tiene permiso para acceder a esta página." + +#: utility.php:598 +msgid "System Information" +msgstr "Información del sistema" + +#: utility.php:599 +msgid "PHP Informations" +msgstr "Información PHP" + +#: utility.php:604 utility.php:640 +msgid "Items" +msgstr "Elementos" + +#: utility.php:605 +msgid "Description" +msgstr "Descripción" + +#: utility.php:610 +msgid "WordPress Version" +msgstr "Versión de WordPress" + +#: utility.php:614 +msgid "PHP Version" +msgstr "Versión de PHP" + +#: utility.php:618 +msgid "PDO Support" +msgstr "Soporte de PDO" + +#: utility.php:622 +msgid "PDO Drivers" +msgstr "Drivers de PDO" + +#: utility.php:626 +msgid "PDO Driver for SQLite 3.x" +msgstr "Drivers de PDO para SQLite 3.x" + +#: utility.php:630 +msgid "SQLite Library Version" +msgstr "Versión de la librería de SQLite" + +#: utility.php:636 +msgid "Your Database Status" +msgstr "Estado de su base de datos" + +#: utility.php:641 +msgid "Status" +msgstr "Estado" + +#: utility.php:647 +msgid "Database Size" +msgstr "Tamaño de la base de datos" + +#: utility.php:651 +msgid "Page Size" +msgstr "Tamaño de la página" + +#: utility.php:655 +msgid "Total Number of Pages" +msgstr "Número total de páginas" + +#: utility.php:659 +msgid "Unused Page" +msgstr "Páginas no usadas" + +#: utility.php:663 +msgid "Integrity Check" +msgstr "Integridad" + +#: utility.php:667 +msgid "Encoding" +msgstr "Codificación" + +#: utility.php:671 +msgid "Collations" +msgstr "Clasificaciones" + +#: utility.php:683 +msgid "Compile Options" +msgstr "Opciones de compilado" + +#: utility.php:697 +msgid "Database Tables and Indexes" +msgstr "Tablas e indexados de la base de datos" + +#: utility.php:699 +msgid "" +"Table names in brown are required by WordPress, and those in blue are " +"created by some plugins. The table sqlite_sequence is not a WordPress table " +"but a table required by SQLite to store the current autoincremented value of " +"each table, which is displayed in the parenthesis after the table names. You " +"can't manipulate the tables or indexes here. Please use SQLite utilities (e." +"g. SQLiteManager)." +msgstr "" +"Los nombres de tabla en marrón son requeridos por WordPress, y los azules " +"son creados por otros plugins. La tabla sqlite_sequence no es una tabla de " +"WordPress pero es requerida por SQLite para almacenar el actual valor " +"autoincrementado de cada tabla, el cual es indicado en el paréntesis después " +"de los nombres de tabla. No puede manipular las tablas o indexados aquí. Por " +"favor utilice utilidades SQLite (por ejemplo SQLiteManager)." + +#: utility.php:704 +msgid "Table Name" +msgstr "Nombre de la tabla" + +#: utility.php:705 +msgid "System/User" +msgstr "Sistema/usuario" + +#: utility.php:706 +msgid "Index ( Column )" +msgstr "Indexado ( Columna )" + +#: utility.php:744 +msgid "Plugin Info" +msgstr "Información del plugin" + +#: utility.php:746 +msgid "This table shows plugins you have installed and their compatibility." +msgstr "" +"Esta tabla muestra los plugins que tiene instalados y su compatibilidad." + +#: utility.php:751 +msgid "Installed Plugins" +msgstr "Plugins instalados" + +#: utility.php:752 +msgid "Active/Inactive" +msgstr "Activo/Inactivo" + +#: utility.php:753 +msgid "Compatible" +msgstr "Compatible" + +#: utility.php:761 +msgid "" +"\"Checked*\" with an asterisk is from the users' information. I didn't check " +"myself yet. If you found any malfunctioning, please let me know." +msgstr "" +"\"Revisado*\" con un asterisco es desde la información de los usuarios. No " +"ha sido revisado oficialmente aún. Si encuentra cualquier mal " +"funcionamiento, por favor, repórtelo." + +#: utility.php:781 +msgid "Log cleared" +msgstr "Registro limpiado" + +#: utility.php:784 +msgid "Log not cleared" +msgstr "Registro no limpiado" + +#: utility.php:796 +msgid "db.php was saved" +msgstr "db.php fue guardado" + +#: utility.php:799 +msgid "Error! db.php couldn't be saved" +msgstr "Error: db.php no pudo ser guardado" + +#: utility.php:810 +#, php-format +msgid "" +"Optimization finished. Before optimization: %1$s, After optimization: %2$s." +msgstr "" +"Optimización finalizada. Antes de la optimización: %1$s, después: %2$s." + +#: utility.php:813 +msgid "Optimization failed" +msgstr "Optimización fallida" + +#: utility.php:821 +msgid "Couldn't find your database file." +msgstr "No se pudo encontrar su fichero de base de datos." + +#: utility.php:833 +msgid "Please select backup file(s)." +msgstr "Por favor, seleccione el/los fichero(s) de respaldo." + +#: utility.php:842 +msgid "Error! Please remove file(s) manyally." +msgstr "Error: Por favor elimine el/los fichero(s) manualmente." + +#: utility.php:853 +msgid "Please select backup file." +msgstr "Por favor selecciones fichero de respaldo." + +#: utility.php:856 +msgid "Please select one file at a time." +msgstr "Por favor selecciones un fichero cada vez." + +#: utility.php:875 +msgid "Database Optimization, Error Log, Init File" +msgstr "Optimización de la base de datos, registro de errores, fichero inicial" + +#: utility.php:876 +msgid "Optimize You Database" +msgstr "Optimice su base de datos" + +#: utility.php:878 +msgid "" +"This button sends "vacuum" command to your SQLite database. That " +"command reclaims space after data has been deleted." +msgstr "" +"Este botón envía el comando "vacuum" a tu base de datos SQLite. " +"Este comando recupera el espacio que queda después de que se hayan eliminado " +"datos." + +#: utility.php:886 +msgid "Optimize" +msgstr "Optimizar" + +#: utility.php:886 +msgid "" +"Are you sure to optimize your database?\\n\\nClick [Cancel] to stop, [OK] to " +"continue." +msgstr "" +"¿Seguro que desea optimizar su base de datos?\\n\\nHaga clic en [Cancelar] " +"para detener, o en [OK] para continuar." + +#: utility.php:889 +msgid "Create or Delete backup file(s)" +msgstr "Crear o eliminar fichero(s) de respaldo" + +#: utility.php:891 +msgid "" +"Click the backup button below if you want to create a current snapshot of " +"your database file. The backup file is named ‘DB_FILE_NAME.yyyymmdd." +"zip’ if PHP zip extension is loaded or ‘DB_FILE_NAME.yyyymmdd." +"back’ if not loaded, and is put in the same directory that the " +"database is in." +msgstr "" +"Haga clic en el siguiente botón si desea crear una imagen de su fichero de " +"base de datos. El fichero de respaldo es nombrado ‘" +"NOMBRE_DE_LA_BASE_DE_DATOS.aaaammdd.zip’ si la extensión zip de PHP " +"está cargada o ‘NOMBRE_DE_LA_BASE_DE_DATOS.aaaammdd.back’ si no " +"lo está, y es guardado en el mismo directorio en el que está la base de " +"datos." + +#: utility.php:894 +msgid "" +"If you want to delete the file(s), check the file name and click the Delete " +"button. You can check multiple files." +msgstr "" +"Si desea eliminar el/los fichero(s), marque el nombre del fichero y haga " +"clic en el botón Eliminar. Puede marcar múltiples ficheros." + +#: utility.php:897 +msgid "" +"If you want to download a file, check the file name and click the Download " +"button. Please check one file at a time." +msgstr "" +"Si desea descargar un fichero, márquelo y haga clic en el botón Descargar. " +"Por favor, marque un sólo fichero a la vez." + +#: utility.php:908 +msgid "Delete/Download" +msgstr "Eliminar/descargar" + +#: utility.php:909 +msgid "Backup Files" +msgstr "Respaldar ficheros" + +#: utility.php:924 +msgid "Backup" +msgstr "Respaldar" + +#: utility.php:924 +msgid "" +"Are you sure to make a backup file?\\n\\nClick [Cancel] to stop, [OK] to " +"continue." +msgstr "" +"¿Seguro que desea crear un fichero de respaldo?\\n\\nHaga clic en [Cancelar] " +"para detener, o en [OK] para continuar." + +#: utility.php:925 patch.php:399 +msgid "Delete file" +msgstr "Eliminar fichero" + +#: utility.php:925 +msgid "" +"Are you sure to delete backup file(s)?\\n\\nClick [Cancel] to stop, [OK] to " +"continue." +msgstr "" +"¿Seguro que desea eliminar el/los fichero(s) de respaldo?\\n\\nHaga clic en " +"[Cancelar] para detener, o en [OK] para continuar." + +#: utility.php:926 +msgid "Download" +msgstr "Descargar" + +#: utility.php:926 +msgid "" +"Are you sure to download backup file?\\n\\nClick [Cancel] to stop, [OK] to " +"continue." +msgstr "" +"¿Seguro \tque desea descargar el fichero de respaldo?\\n\\nHaga clic en " +"[Cancelar] para detener, o en [OK] para continuar." + +#: utility.php:929 +msgid "SQLite Integration Error Log" +msgstr "Registro de errores de SQLite Integration" + +#: utility.php:931 +msgid "" +"This is the contents of SQLite Integration error log file(default: wp-" +"content/database/debug.txt). If you want to clear this file, click the Clear " +"Log button." +msgstr "" +"Esto es el contenido del fichero de registro de errores de SQLite " +"Integration (predeterminado: wp-content/database/debug.txt). Si desea " +"limpiar este fichero, haga clic en el botón Limpiar registro." + +#: utility.php:941 +msgid "No error messages are found" +msgstr "No se han encontrado mensajes de error" + +#: utility.php:949 +msgid "Clear Log" +msgstr "Limpiar registro" + +#: utility.php:949 +msgid "" +"Are you sure to clear Log?\\n\\nClick [Cancel] to stop, [OK] to continue." +msgstr "" +"¿Seguro que desea limpiar el registro?\\n\\nHaga clic en [Cancelar] para " +"detener, o en [OK] para continuar." + +#: utility.php:953 +msgid "Edit Initial File (wp-content/db.php)" +msgstr "Editar fichero inicial (wp-content/db.php)" + +#: utility.php:955 +msgid "" +"When you go "Plugins » Edit Plugin" page, you can edit " +"plugin source file. But you can't see this file there because it is not in " +"the plugin directory. If you need to edit this file, you can edit here. This " +"settings may cause problems. If you don't understand " +"well, please don't edit this file." +msgstr "" +"Cuando usted va a la página "Plugins » Editar", puede editar " +"el código del fichero del plugin. Pero no puede ver este fichero porque no " +"está en el directorio del plugin. Si necesita editar este fichero, puede " +"hacerlo aquí. Estos ajustes pueden causar problemas. Si no está seguro, por favor absténgase de editar este fichero." + +#: utility.php:965 +msgid "Save" +msgstr "Guardar" + +#: utility.php:965 +msgid "" +"Are you sure to save this file?\\n\\nClick [Cancel] to stop, [OK] to " +"continue." +msgstr "" +"¿Seguro que desea guardar este fichero?\\n\\nHaga clic en [Cancelar] para " +"detener, o en [OK] para continuar." + +#: utility.php:1049 +msgid "Update db.php" +msgstr "Actualizar db.php" + +#: utility.php:1050 +msgid "Replace the old db.php with the new one." +msgstr "Reemplaza el viejo db.php con el nuevo." + +#: utility.php:1056 +msgid "Update" +msgstr "Actualizar" + +#: utility.php:1056 +msgid "" +"Are you sure to update this file?\n" +"\n" +"Click [Cancel] to stop, [OK] to continue." +msgstr "" +"¿Seguro que desea actualizar este fichero?\\n\\nHaga clic en [Cancelar] para " +"detener, o en [OK] para continuar." + +#: database_maintenance.php:344 +msgid "Can't create backup file." +msgstr "No se puede crear el fichero de respaldo." + +#: database_maintenance.php:363 +msgid "Failed: " +msgstr "Fallo:" + +#: database_maintenance.php:368 database_maintenance.php:561 +msgid "Your database is OK. You don't have to restore it." +msgstr "Su base de datos está bien. No necesita restaurarla." + +#: database_maintenance.php:372 +msgid "Your database restoration is successfully finished!" +msgstr "La restauración de su base de datos finalizó correctamente." + +#: database_maintenance.php:391 +msgid "Table name is not selected." +msgstr "El nombre de la tabla no está seleccionado." + +#: database_maintenance.php:394 +msgid "There's no such table." +msgstr "No existe dicha tabla." + +#: database_maintenance.php:461 +msgid "Database Maintenace" +msgstr "Mantenimiento de la base de datos" + +#: database_maintenance.php:462 +msgid "Important Notice" +msgstr "Aviso importante" + +#: database_maintenance.php:464 +msgid "" +"When you installed WordPress 3.5.x with SQLite Integration and upgraded to " +"3.6, your database might not function as expected." +msgstr "" +"Si instaló WordPress 3.5.x con SQLite Integration y actualizó a 3.6, su base " +"de datos podría no funcionar como esperaba." + +#: database_maintenance.php:465 +msgid "" +"This page provide you the database sanity check utility and the restore " +"utility." +msgstr "" +"Esta página le provee la utilidad de revisión del estado de su base de datos " +"y la utilidad de restauración." + +#: database_maintenance.php:468 +msgid "" +"Click \"Sanity Check\" button first, and see if you need to fix database or " +"not. If needed, click \"Fix Database\" button. Afterward you may go to " +"Miscellaneous page and optimize database (this is not required)." +msgstr "" +"Haga clic en el botón \"Revisar estado\" primero, y vea si necesita reparar " +"la base de datos o no. Si es necesario, haga clic en el botón \"Reparar base " +"de datos\". Después de esto, puede ir a la página Herramientas y optimizar " +"la base de datos (esto no es requerido)." + +#: database_maintenance.php:471 +msgid "" +"Fix Database procedure will create a database backup file each time the " +"button clicked. The backup file is named with \"maintenance-backup\", so you " +"can remove it if you don't need it. Please go to Miscellaneous page and " +"check if there is one." +msgstr "" +"Al reparar la base de datos se creará un fichero de respaldo que será " +"llamado \"maintenance-backup\", luego usted puede eliminarlo si no lo " +"necesita. Por favor, vaya a la página Herramientas y revíselo." + +#: database_maintenance.php:474 +msgid "" +"If you installed WordPress 3.6 (not upgraded), you don't have to restore the " +"database." +msgstr "" +"Si usted instaló WordPress 3.6 (no actualizó), no tiene que restaurar la " +"base de datos." + +#: database_maintenance.php:483 +msgid "Sanity Check" +msgstr "Revisar estado" + +#: database_maintenance.php:483 +msgid "" +"Are you sure to check the database? This will take some time.\\n\\nClick " +"[Cancel] to stop, [OK] to continue." +msgstr "" +"¿Seguro que desea revisar el estado de la base de datos? Esto llevará algún " +"tiempo.\\n\\nHaga clic en [Cancelar] para detener, o en [OK] para continuar." + +#: database_maintenance.php:484 +msgid "Fix database" +msgstr "Reparar base de datos" + +#: database_maintenance.php:484 +msgid "" +"Are you sure to do fix the database? This will take some time.\\n\\nClick " +"[Cancel] to stop, [OK] to continue." +msgstr "" +"¿Seguro que desea reparar la base de datos? Esto tomará algún tiempo.\\n" +"\\nHaga clic en [Cancelar] para detener, o en [OK] para continuar." + +#: database_maintenance.php:488 +msgid "Columns Information" +msgstr "Información de columnas" + +#: database_maintenance.php:490 +msgid "" +"Select a table name and click \"Display Columns\" button, and you'll see the " +"column property of that table. This information is for debug use." +msgstr "" +"Seleccione un nombre de tabla y haga clic en el botón \"Mostrar columnas\", " +"y usted verá la columna de propiedades de esa tabla. Esta información es " +"para uso de depuración." + +#: database_maintenance.php:501 +msgid "Table Name: " +msgstr "Nombre de la tabla:" + +#: database_maintenance.php:507 +msgid "Display Columns" +msgstr "Mostrar columnas" + +#: database_maintenance.php:507 +msgid "" +"Display columns in the selected table.\\n\\nClick [Cancel] to stop, [OK] to " +"continue." +msgstr "" +"Mostrar columnas en la tabla seleccionada.\\n\\nHaga clic en [Cancelar] para " +"detener, o en [OK] para continuar." + +#: database_maintenance.php:517 database_maintenance.php:519 +#: database_maintenance.php:543 database_maintenance.php:545 +#: database_maintenance.php:571 database_maintenance.php:573 patch.php:243 +#: patch.php:245 patch.php:265 patch.php:267 patch.php:287 patch.php:289 +msgid "You are not allowed to do this operation!" +msgstr "No tiene permitido hacer esta operación." + +#: database_maintenance.php:523 database_maintenance.php:533 +msgid "Results" +msgstr "Resultados" + +#: database_maintenance.php:549 database_maintenance.php:560 +msgid "Checked Results" +msgstr "Resultados de la revisión" + +#: database_maintenance.php:554 +msgid " needs restoring." +msgstr " necesita restauración." + +#: database_maintenance.php:577 +#, php-format +msgid "Columns In %s" +msgstr "Columnas %s" + +#: database_maintenance.php:578 +msgid "Column" +msgstr "Columna" + +#: database_maintenance.php:579 +msgid "Type" +msgstr "Tipo" + +#: database_maintenance.php:580 +msgid "Null" +msgstr "Nulo" + +#: database_maintenance.php:581 +msgid "Default" +msgstr "Predeterminado" + +#: database_maintenance.php:598 +msgid "Columns Info" +msgstr "Información de columnas" + +#: documentation.php:40 +msgid "" +"This is a brief documentation about this plugin. For more details, see also " +"the SQLite " +"Integration page." +msgstr "" +"Esta es una breve documentación sobre este plugin. Para más detalle, vea " +"también la página de SQLite Integration." + +#: documentation.php:43 +msgid "" +"Please don't forget: WordPress DOES NOT OFFICIALLY SUPPORT any database " +"other than MySQL. So if you ask about this plugin in the Forum, it's not " +"unlikely that you won't get no answers at all." +msgstr "" +"Por favor, no olvide: WordPress NO SOPORTA OFICIALMENTE ninguna base de " +"datos que no sea MySQL. Así que si usted pregunta acerca de este plugin en " +"el Foro, probablemente no obtenga respuesta." + +#: documentation.php:46 +msgid "Features" +msgstr "Características" + +#: documentation.php:48 +msgid "" +"This plugin is a successor to PDO for WordPress, which enabled WordPress to use " +"SQLite for its database. But PDO for WordPress doesn't seem to be maintained " +"any more only to be outdated. SQLite Integration makes use of the basic " +"ideas and framework of PDO for WordPress, adds some new features and updates " +"it to be able to work with the newest version of WordPress(3.8.1)." +msgstr "" +"Este plugin es un sucesor de PDO for WordPress, el cual habilitaba WordPress " +"para el uso de SQLite para su base de datos. Pero PDO for WordPress parece " +"que no va a tener más mantenimiento. SQLite Integration hace uso de las " +"ideas básicas y framework de PDO for WordPress, añade algunas " +"características nuevas y lo actualiza para hacerlo trabajar con la versión " +"más reciente de WordPress." + +#: documentation.php:51 +msgid "" +"SQLite Web Page says — SQLite " +"is a "software library that implements selfcontained, serverless, zero-" +"configuration, transactional SQL database engine". It is "a good " +"choice for small to medium size websites". It's small and portable, and " +"you don't need any database server system." +msgstr "" +"La página web de SQLite dice: SQLite " +"es una "biblioteca de software que implementa el motor de bases de " +"datos SQL autocontenido, sin servidor, de configuración cero y " +"transaccional". Esto es "una buena opción para sitios web pequeños " +"y medianos". Es pequeño y potable, y no necesita ningún sistema de " +"servidor de base de datos." + +#: documentation.php:54 +msgid "" +"Unfortunately enough, WordPress only supports MySQL. Consequently it doesn't " +"provide any APIs for SQLite. So if you want to create a website using " +"WordPress without a database server, you've got to write a kind of wrapper " +"program yourself to use SQLite. This is the way SQLite Integration goes." +msgstr "" +"Desgraciadamente, WordPress sólo soporta MySQL. En consecuencia no provee " +"ninguna API para SQLite. Por lo que si busca crear un sitio web usando " +"WordPress sin un servidor de base de datos, tiene que escribir una especie " +"de programa envoltorio usted mismo para usar SQLite. Esto es los que SQLite " +"Integration le ofrece." + +#: documentation.php:57 +msgid "SQLite Integration does the work as follows:" +msgstr "SQLite Integration hace tareas como las siguientes:" + +#: documentation.php:60 +msgid "Intercepts SQL statement for MySQL from WordPress" +msgstr "Intercepta enunciados SQL para MySQL de WordPress" + +#: documentation.php:61 +msgid "Rewrites it as SQLite can execute" +msgstr "Los reescribe para que los pueda ejecutar SQLite" + +#: documentation.php:62 +msgid "Gives it to SQLite" +msgstr "Se los da a SQLite" + +#: documentation.php:63 +msgid "Gets the results from SQLite" +msgstr "Obtiene los resultados de SQLite" + +#: documentation.php:64 +msgid "Format the results as MySQL returns, if necessary" +msgstr "Formatea los resultados como MySQL, si es necesario" + +#: documentation.php:65 +msgid "Gives back the results to WordPress" +msgstr "Devuelve los resultados a WordPress" + +#: documentation.php:68 +msgid "" +"WordPress doesn't know what has happened in the background and will be happy " +"with it." +msgstr "" +"WordPress no sabe qué está pasando en la parte trasera y estará bien así." + +#: documentation.php:71 +msgid "Limitations" +msgstr "Limitaciones" + +#: documentation.php:73 +msgid "" +"SQLite Integration uses SQLite, so the limitations of SQLite is, as it is, " +"those of SQLite Integration. MySQL is far from a simple SQL engine and has " +"many extended features and functionalities. WordPress uses some of them. " +"Among those are some SQLite doesn't implement. For those features that " +"WordPress uses, I made them work with SQLite Integration. But for others " +"that some plugins are using, SQLite Integration can't manipulate. So..." +msgstr "" +"SQLite Integration usa SQLite, por lo que las limitaciones de SQLite son a " +"su vez las de SQLite Integration. MySQL está lejos de un motor SQL simple y " +"tiene muchas características y funcionalidades extendidas, y WordPress usa " +"alguna de ellas, es decir, SQLite no implementa algunas características que " +"tiene MySQL y que WordPress usa. Algunas de estas características, SQLite " +"las consigue hacer funcionar. Pero para otras que algunos plugins están " +"usando, SQLite no puede conseguirlo. Así es que..." + +#: documentation.php:76 +msgid "There are some plugins that you can't use. No way around.
" +msgstr "Hay algunos plugins que no podrás usar. No hay manera.
" + +#: documentation.php:77 +msgid "" +"Some plugins can't be activated or work properly. See the "Plugin " +"Compatibility/Incompatibility" section." +msgstr "" +"Algunos plugins no pueden ser activados o funcionar apropiadamente. Vea la " +"sección "Compatibilidad/incompatibilidad de plugins"." + +#: documentation.php:78 +msgid "" +"There are some plugins that you can't use without rewriting some codes in " +"them.
" +msgstr "" +"Hay algunos plugins que no puede usar sin reescribir parte de su código.
" + +#: documentation.php:79 +#, php-format +msgid "" +"Some plugins do work fine if you rewrite MySQL functions. I made some patch " +"files and Patch Utility. See also the SQLite " +"Integration Page for more details." +msgstr "" +"Algunos plugins funcionan bien si reescribe sus funciones MySQL. Hemos hecho " +"algunos parches y una Utilidad de Parches. Vea " +"también la página de SQLite Integration para más detalles." + +#: documentation.php:82 +msgid "" +"And there may be other problems I overlooked. If you find malfunctionality, " +"please let me know at the Support Forum." +msgstr "" +"Y puede ser que haya otros problemas que hemos obviado. Si encuentra " +"cualquier mal funcionamiento, por favor, comuníquelo en el Foro de Soporte." + +#: documentation.php:84 +msgid "User Defined Functions" +msgstr "Funciones definidas por el usuario" + +#: documentation.php:86 +msgid "" +"SQLite Integration replaces some functions of MySQL with the user defined " +"functions built in PHP PDO library. But some of the functions are " +"meaningless in SQLite database: e.g. get_lock() or release_lock(). When " +"SQLite Integration meets those functions, it does nothing but prevent the " +"error." +msgstr "" +"SQLite Integration reemplaza algunas funciones de MySQL con las funciones " +"definidas por el usuario construidas en la librería PHP PDO. Pero algunas de " +"las funciones no tienen sentido en la base de datos SQLite: por ejemplo, " +"get_lock() o release_lock(). Cuando SQLite Integration encuentra esas " +"funciones, no hace nada pero evita el error." + +#: documentation.php:89 +msgid "" +"If you want SQLite Integration to execute more functions, you can add the " +"definition in the file sqlite-integration/functions.php (functions-5-2.php " +"is for PHP 5.2 or lesser)." +msgstr "" +"Si desea que SQLite Integration ejecute más funciones, puede añadir la " +"definición en el fichero sqlite-integration/functions.php (functions-5-2.php " +"es para PHP 5.2 o menor)." + +#: documentation.php:92 +msgid "Database Administration and Maintenance" +msgstr "Administración y mantenimiento de la base de datos" + +#: documentation.php:94 +msgid "" +"SQLite Integration doesn't contain database maintenace functionality, " +"because there are some other free or proprietary softwares that give you " +"such functionalities. For example, these are among free softwares:" +msgstr "" +"SQLite Integration no contiene la funcionalidad de mantenimiento de la base " +"de datos, porque hay software tanto libre como propietario que ofrecen este " +"tipo de funcionalidades. Por ejemplo, estos son algunos ejemplos libres:" + +#: documentation.php:97 +msgid "my recommendation" +msgstr "recomendado" + +#: documentation.php:98 +msgid "unfortunately seems not to maintained..." +msgstr "desgraciadamente parece que ya no es mantenido..." + +#: documentation.php:101 +msgid "" +"I'm not sure if future release may have some of the database maintenance " +"functionality." +msgstr "" +"Quizás en futuras versiones se incorporen algunas funcionalidades de " +"mantenimiento de la base de datos." + +#: documentation.php:107 +msgid "Plugin Compatibility/Incompatibility" +msgstr "Compatibilidad/incompatibilidad de plugins" + +#: documentation.php:109 +msgid "" +"WordPress without its plugins is a king without people. Of course, you need " +"plugins, I know." +msgstr "" +"WordPress sin estos plugins es como un rey sin pueblo. Por supuesto, " +"necesitas plugins, lo sé." + +#: documentation.php:112 +#, php-format +msgid "" +"This is the list of the problematic plugins (far from complete). You can see " +"informations about your installed plugins in the System Info page. To see more details, please visit the Plugin Page." +msgstr "" +"Esta es la lista de los plugins problemáticos (lejos de ser exhaustiva). " +"Puede ver información sobre sus plugins instalados en la página Información del sistema. Para ver más detalles, por " +"favor, visite la página del plugin." + +#: documentation.php:118 +msgid "Plugins Name" +msgstr "Nombre de los plugins" + +#: documentation.php:119 +msgid "Compatibility" +msgstr "Compatibilidad" + +#: documentation.php:120 +msgid "Reasons" +msgstr "Razones" + +#: patch.php:67 +msgid "Patch command is not found" +msgstr "El comando de parche o no fue encontrado" + +#: patch.php:70 +msgid "Patch command is not executable" +msgstr "El comando de parche o no es ejecutable" + +#: patch.php:87 +msgid "Patch file name is invalid" +msgstr "El nombre del fichero del parche no es válido" + +#: patch.php:91 +msgid "Patch file version does not match with that of your plugin." +msgstr "La versión del fichero del parche no coincide con la del plugin." + +#: patch.php:100 +msgid "Error! Plugin directory is not accessible." +msgstr "Error. El directorio del plugin no es accesible." + +#: patch.php:103 +msgid "is patched successfully." +msgstr "fue parchado con éxito." + +#: patch.php:108 +#, php-format +msgid "Error! Messages: %s" +msgstr "Error. Mensajes: %s" + +#: patch.php:136 +#, php-format +msgid "File %s is deleted." +msgstr "El fichero %s está eliminado." + +#: patch.php:138 +#, php-format +msgid "Error! File %s is not deleted." +msgstr "Error. El fichero %s no fue eliminado." + +#: patch.php:142 +msgid "Error!: patches directory is not accessible." +msgstr "Error. El directorio de parches no es accesible." + +#: patch.php:163 +msgid "Unable to create a patch directory." +msgstr "No es posible crear un directorio de parches." + +#: patch.php:171 +msgid "Unable to create a .htaccess file." +msgstr "No es posible crear un fichero .htaccess." + +#: patch.php:179 +msgid "Invalid operation." +msgstr "Operación no válida." + +#: patch.php:185 +msgid "File is too large to upload." +msgstr "El fichero es demasiado grande para subirlo." + +#: patch.php:189 +msgid "File upload is not complete." +msgstr "La subida del fichero no está completada." + +#: patch.php:193 +msgid "File is not uploaded." +msgstr "El fichero no está subido." + +#: patch.php:197 +msgid "Temporary directory is not writable." +msgstr "El directorio temporal no se puede escribir." + +#: patch.php:201 +msgid "File cannot be written on the disk." +msgstr "El fichero no puede ser escrito en el disco." + +#: patch.php:205 +msgid "Unknown error." +msgstr "Error desconocido." + +#: patch.php:213 +msgid "File is successfully uploaded." +msgstr "Fichero subido con éxito." + +#: patch.php:217 +msgid "File upload failed. Possible file upload attack." +msgstr "La subida del fichero falló. Posible ataque a la subida." + +#: patch.php:222 +msgid "File is not selected" +msgstr "El fichero no está seleccionado" + +#: patch.php:249 patch.php:271 +msgid "Please select patch file(s)" +msgstr "Por favor, seleccione fichero(s) de parche" + +#: patch.php:258 +msgid "None of the patches is applied!" +msgstr "Ninguno de los parches está aplicado." + +#: patch.php:280 +msgid "Error! Please remove files manually" +msgstr "Error. Por favor, elimine los ficheros manualmente" + +#: patch.php:304 +msgid "Patch Files Upload and Apply" +msgstr "Subida y aplicación de parches" + +#: patch.php:305 +msgid "What you can do in this page" +msgstr "Qué puede hacer en esta página" + +#: patch.php:307 +msgid "" +"I made patch files for some plugins that are incompatible with SQLite " +"Integration and need rewriting. And I wrote in the Plugin Page about how to apply a " +"patch file to the plugin. But the command line interface sometimes " +"embarrasses some people, especially newbies." +msgstr "" +"Hemos preparado parches para varios plugins que son incompatibles con SQLite " +"Integration y necesitan reescritura. En la página del plugin encontrará " +"documentación sobre cómo aplicar un parche a los plugin, aunque la interfaz " +"de línea de comandos a veces desconcierta a algunas personas, especialmente " +"novatas." + +#: patch.php:310 +msgid "" +"In this page, you can upload patch files and apply them automatically. But " +"there are some requirements." +msgstr "" +"En esta página puede subir parches y aplicarlos automáticamente. Pero hay " +"algunos requisitos." + +#: patch.php:313 +msgid "" +"Think before you leap. Is the plugin to which you are going to apply patch " +"really necessary for your site? Did you search in the Plugin Directory for the substitutes?" +msgstr "" +"Piense antes de actuar. ¿Es realmente necesario para su sitio el plugin al " +"que va a aplicar el parche? ¿Ha buscado en el directorio de plugins un sustituto?" + +#: patch.php:314 +msgid "" +"Your PHP script has the permission to create a directory and write a file in " +"it." +msgstr "" +"Su script PHP debe tener permisos para crear un directorio y escribir " +"ficheros en él." + +#: patch.php:315 +msgid "Your PHP scripts can execute exec() function on the server." +msgstr "Sus scripts PHP deben poder ejecutar la función exec() en el servidor." + +#: patch.php:316 +msgid "" +"Your PHP script can execute "patch" shell command.(Script will " +"check if it is executable or not.)" +msgstr "" +"Su script PHP debe poder ejecutar el comando shell "patch". " +"(Script revisará si es ejecutable o no.)" + +#: patch.php:319 +msgid "" +"If uploading fails, it' very likely that application will fail. When you try " +"uploading with FTP client, the patch files must be put into the directory wp-" +"content/uploads/patches/. When constant UPLOADS is defined, script follows " +"it." +msgstr "" +"Si la subida falla, es muy probable que la aplicación falle. Cuando trate de " +"subir los parches con un cliente FTP, debe hacerlo al directorio wp-content/" +"uploads/patches/. Cuando la constante UPLOADS está establecida, el script " +"irá ahí." + +#: patch.php:322 +msgid "" +"You can create your patch file yourself. When you create one, please test it " +"on your local server first and check if it works fine without PHP error or " +"notice ( set error_reporting(E_ALL) ). If you use this utility, name your " +"patch file as follows:" +msgstr "" +"Puede crear sus propios parches. Cuando cree uno, por favor, compruébelo " +"primero en su servidor local y revise si funciona bien sin errores PHP o " +"avisos (establezca error_reporting(E_ALL). Si usa esta utilidad, asigne " +"nombres a sus ficheros de parcheo como los siguientes:" + +#: patch.php:325 +msgid "Use the file name beginning with the plugin directory name." +msgstr "Utilice el nombre de fichero nombre del directorio del plugin." + +#: patch.php:326 +msgid "Use the plugin version number after the directory name with underscore." +msgstr "" +"Ponga el número de la versión del plugin después del nombre del directorio." + +#: patch.php:327 +msgid "Use the suffix .patch." +msgstr "Utilice el sufijo .patch." + +#: patch.php:328 +msgid "Use diff command options "-Naur"." +msgstr "Utilice las opciones de comando diff "-Naur"." + +#: patch.php:331 +msgid "" +"For example, the patch file for the plugin "Debug Bar" is "" +"debug-bar_0.8.patch". Script interprets "debug-bar" as the " +"target directory and "0.8" as the target version. If the version " +"number doesn't match with the target, script shows the error message and " +"skip applying the patch file. And script will reject any other file name." +msgstr "" +"Por ejemplo, el parche para el plugin "Debug Bar" es "debug-" +"bar_0.8.patch". El script interpreta "debug-bar" como el " +"nombre del directorio y "0.8" como la versión. Si la versión no " +"coincide con la instalada, se mostrará un mensaje de error y no se aplicará " +"el parche. El script rechazará cualquier otro nombre de fichero." + +#: patch.php:334 +msgid "How to install, patch and activate plugins" +msgstr "Como instalar, parchear y activar plugins" + +#: patch.php:336 +msgid "Install the plugin (not yet activate it)" +msgstr "Instale el plugin (no lo active aún)." + +#: patch.php:337 +msgid "Upload the patch file (if any) to the server and ppply it in this page" +msgstr "Suba el parche al servidor y aplíquelo en esta página." + +#: patch.php:338 +msgid "Back to the installed plugin page and activate it" +msgstr "Active el plugin" + +#: patch.php:340 +msgid "How to upgrade plugins" +msgstr "Cómo actualizar plugins" + +#: patch.php:342 +msgid "When upgrading the plugin, it will be safer to follow next steps." +msgstr "Cuando actualice el plugin, será más seguro seguir estos pasos:" + +#: patch.php:345 +msgid "Deactivate the plugin" +msgstr "Desactive el plugin" + +#: patch.php:346 +msgid "Upgrade the plugin" +msgstr "Actualice el plugin." + +#: patch.php:347 +msgid "Upload the patch file (if any) and apply it" +msgstr "Suba el parche y aplíquelo." + +#: patch.php:348 +msgid "Reactivate the plugin" +msgstr "Reactive el plugin" + +#: patch.php:350 +msgid "" +"If there isn't a patch file to match with the newest version of the plugin, " +"it won't work properly. Please wait for somebody to make one or rewrite the " +"codes checking the patch file for the previous version (it's not so " +"difficult a matter, I guess, for almost all the cases, you'll have only to " +"replace the MySQL functions with the WordPress built-in functions)." +msgstr "" +"Si no hay un parche que coincida con la versión más reciente del plugin, no " +"funcionará correctamente. Por favor, espere a que lo cree o reescriba los " +"códigos revisando el parche de la versión anterior (no es algo complicado en " +"la mayoría de los casos, sólo hay que sustituir las funciones MySQL con las " +"funciones incorporadas en WordPress)." + +#: patch.php:351 +msgid "Upload and Apply" +msgstr "Subir y aplicar" + +#: patch.php:355 +msgid "File Select" +msgstr "Seleccione el fichero" + +#: patch.php:363 +msgid "" +"Select file from your computer. If the file name is the same as existent " +"file, this operation will override it. You can't upload the file whose size " +"is over 500kB." +msgstr "" +"Seleccione el fichero en su equipo. Si el nombre del fichero es el mismo que " +"alguno existente, esta operación lo sobreescribirá. No puede subir ficheros " +"cuyo tamaño sobrepase 500KB." + +#: patch.php:365 +msgid "Upload" +msgstr "Subir" + +#: patch.php:370 +msgid "Patch files uploaded" +msgstr "Parches subidos" + +#: patch.php:377 +msgid "" +"Select the file(s) you want to apply to the plugin(s) or you want to delete. " +"You can select multiple files." +msgstr "" +"Seleccione los parches que desea aplicar o eliminar. Puede seleccionar " +"varios." + +#: patch.php:381 +msgid "Apply/Hold" +msgstr "Aplicar/detener" + +#: patch.php:382 +msgid "Patch files to apply" +msgstr "Parches para aplicar" + +#: patch.php:398 +msgid "Apply patch" +msgstr "Aplicar parches" + +#: patch.php:398 +msgid "" +"Are you sure to apply patch files?\\n\\nClick [Cancel] to stop,[OK] to " +"continue." +msgstr "" +"¿Seguro que desea aplicar los parches?\\n\\nHaga clic en [Cancelar] para " +"detener, o en [OK] para continuar." + +#: patch.php:399 +msgid "" +"Are you sure to delete patch files?\\n\\nClick [Cancel] to stop,[OK] to " +"continue." +msgstr "" +"¿Seguro que desea eliminar los parches?\\n\\nHaga clic en [Cancelar] para " +"detener, o en [OK] para continuar." + +#: patch.php:410 +msgid "Caution about your patch file(s)" +msgstr "Advertencia sobre sus parches" + +#: patch.php:414 +msgid "" +"If you don't know where it comes from or who created it, I strongly " +"recommend that you should see and check the contents of the file. If a " +"person who created it secretly inserted a malicious codes, it will be " +"executed by the plugin and may damage your site or your server, for which " +"damage I don't incur any liability. If you don't understand well, you'd " +"better use the substitute plugins. Take your own risk, please." +msgstr "" +"Si no sabe de dónde provienen o quién los creó, recomendamos encarecidamente " +"que revise los contenidos de los parches. Si la persona que los creó " +"introdujo código malicioso, será ejecutado por el plugin y podrá dañar su " +"sitio o su servidor, ante lo que no nos responsabilizamos. Si no tiene total " +"certeza, utilice mejor un plugin sustituto." diff --git a/languages/sqlite-integration-ja.mo b/languages/sqlite-integration-ja.mo index a5db75e298886f9d8b242f19357071ea49ef7cc3..d64b2d508edb809b39ed95433b487cefe8b51072 100644 GIT binary patch delta 14741 zcmbuE34E00o%r8ygB(UkxCGxoAY7SndLRV36jW{m0R@I+fPrKt%uEPK>trT?A%Gl@ z+_xYg$f2VYK|!~>x>Z|s*Q)Kd)$K3=+G<HI;g|3GyvK9=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d1lI7%tUi8~60*(IL6< z?aiAm8{fw6Z2mUM8x+MJ`z)Qe&)cB`qHn_|84`?*>l$Q{tyaI)oPQXyTnrG8y_uvGu#fG@S{;Hpk!?J4x}AG-X|fRuIY zfG3Y1dnl}?0HpZAC!KuBWS6V@^6|_4zbVx9rW51yZq8qcy>7j?HsuU!zWPGzt1KO- z{d%g{u9q(z@t?k*`s&0MPhYkWXw+;OoNePJeWKy6y{EdRo;&?Umm%WcH|-CywS_9w zuQ2loH>xB*BL33;hkyy@lIrk6>3{vgsENE6$2Xi0eww|Y0HL3O5}O!KNWzBUR@<)4)RSyJcQTOqm}oa5&or6em9D*W+U!`icNnSQ p;$w477ABO4BU$XtzdD&>A~(#Mu*2CK$unlpe{=rU&t9DO{{b{S?4SSu diff --git a/languages/sqlite-integration-ja.po b/languages/sqlite-integration-ja.po index 2c6c093..6bb5dad 100644 --- a/languages/sqlite-integration-ja.po +++ b/languages/sqlite-integration-ja.po @@ -1,197 +1,141 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) 2013 THE PACKAGE'S COPYRIGHT HOLDER +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# Kojima Toshiyasu , 2013. +# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-05-21 13:11+0900\n" -"PO-Revision-Date: 2013-05-21 13:11+0900\n" +"POT-Creation-Date: 2013-09-03 14:31+0900\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Kojima Toshiyasu \n" "Language-Team: LANGUAGE \n" "Language: Japanese\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: db.php:46 -msgid "PHP version on this server is too old." -msgstr "お使いのPHPが古すぎます。" - -#: db.php:46 -#, php-format -msgid "" -"Your server is running PHP version %d but this version of WordPress requires " -"at least 5.2.4" -msgstr "" -"PHP%dをお使いになっていますが、WordPressには5.2.4以上が必要です。" - -#: db.php:50 -msgid "PHP PDO Extension is not loaded." -msgstr "PHPのPDOエクステンションがロードされていません。" - -#: db.php:50 -msgid "" -"Your PHP installation appears to be missing the PDO extension which is " -"required for this version of WordPress." -msgstr "" -"このWordPressで必要とされるPHPのPDOエクステンションが欠けているようです。" - -#: db.php:54 -msgid "PDO Driver for SQLite is missing." -msgstr "PDOのSQLite用ドライバがありません。" - -#: db.php:54 -msgid "" -"Your PHP installtion appears not to have the right PDO drivers loaded. These " -"are required for this version of WordPress and the type of database you have " -"specified." -msgstr "" -"お使いのPHPでは、必要なPDOドライバがロードされていないようです。これは、WordPressとデータベースを運用するのに" -"必要です。" - -#: install.php:42 +#: install.php:40 msgid "" "Note that password carefully! It is a random password that was generated just for you." -msgstr "" -"注意してパスワードを控えてください! これはランダムに" -"作成されたものです。" +msgstr "注意してこのパスワードを扱ってください。これはランダムに生成された" +"パスワードです。" -#: install.php:47 +#: install.php:45 msgid "Your chosen password." -msgstr "あなたが決めたパスワード。" +msgstr "あなたが入力したパスワード。" -#: install.php:58 +#: install.php:56 msgid "The password you chose during the install." -msgstr "インストールのときにあなたが決めたパスワード。" +msgstr "インストールのときにあなたが入力したパスワード。" #: pdodb.class.php:96 #, php-format msgid "WordPress database error %1$s for query %2$s made by %3$s" -msgstr "WordPressデータベースエラー%1$s。クエリは%2$s。%3$sが作成しました。" +msgstr "データベース・エラーです。メッセージ: %1$s, クエリ: %2$s, 呼び出し: %3$s" #: pdodb.class.php:98 #, php-format msgid "WordPress database error %1$s for query %2$s" -msgstr "WordPressデータベースエラー%1$s。クエリは%2$s。" +msgstr "データベース・エラーです。メッセージ: %1$s, クエリ: %2$s" -#: pdodb.class.php:134 +#: pdodb.class.php:136 #, php-format msgid "" "

Error establlishing a database connection

We have been unable to " "connect to the specified database.
The error message received was %s" msgstr "" -"

データベース接続エラー

データベースに接続できませんでした。
エラーメッセージは、%sです。" +"

データベース接続エラー

データベースに接続できません。
エラーメッセージは、%s" -#: pdoengine.class.php:80 pdoengine.class.php:96 schema.php:26 +#: pdoengine.class.php:82 pdoengine.class.php:98 msgid "Database connection error!
" msgstr "データベース接続エラー!
" -#: pdoengine.class.php:81 pdoengine.class.php:97 schema.php:27 schema.php:81 +#: pdoengine.class.php:83 pdoengine.class.php:99 +#, php-format msgid "Error message is: %s" -msgstr "エラーメッセージは: " +msgstr "エラーメッセージ: %s" -#: pdoengine.class.php:115 -msgid "" -"Unable to create the required directory! Please check your server settings." -msgstr "" -"必要なディレクトリが作成できませんでした。サーバ設定を確認してください。" - -#: pdoengine.class.php:120 pdoengine.class.php:126 -msgid "" -"Unable to create a file in the directory! Please check your server settings." -msgstr "" -"ディレクトリにファイルを作成できませんでした。サーバ設定を確認してください。" - -#: pdoengine.class.php:148 +#: pdoengine.class.php:156 #, php-format msgid "" "

Unknown query type

Sorry, we cannot determine the type of query " "that is requested.

The query is %s

" msgstr "" -"

未知のクエリ

申し訳ありません、要求されたクエリのタイプを決定できません。

クエリは%s" -"です。

" +"

不明のクエリ

申し訳ありません。要求されたクエリのタイプを判別できませんでした。

" +"

クエリ: %s

" -#: pdoengine.class.php:294 +#: pdoengine.class.php:315 #, php-format msgid "Problem preparing the PDO SQL Statement. Error was: %s" -msgstr "SQLステートメントの準備中に問題。エラーは: %s" +msgstr "PDO SQLステートメントを準備中に問題がありました。エラー: %s" -#: pdoengine.class.php:327 +#: pdoengine.class.php:372 #, php-format msgid "Error while executing query! Error message was: %s" -msgstr "クエリの実行中にエラー! エラーメッセージは: %s" +msgstr "クエリを実行中にエラーが発生しました。エラーメッセージ: %s" -#: pdoengine.class.php:381 +#: pdoengine.class.php:426 msgid "The query is too big to parse properly" -msgstr "クエリが長すぎて解析できません" +msgstr "クエリが長すぎてちゃんと解析できません" -#: pdoengine.class.php:583 +#: pdoengine.class.php:635 #, php-format msgid "Problem in creating table or index. Error was: %s" -msgstr "テーブルまたはインデックスを作成中に問題発生。エラーは: %s" +msgstr "テーブルかインデックスを作るときに問題がありました。エラー: %s" -#: pdoengine.class.php:626 +#: pdoengine.class.php:678 #, php-format msgid "Problem in executing alter query. Error was: %s" -msgstr "ALTERクエリを実行中に問題発生。エラーは: %s" - -#: schema.php:80 -#, php-format -msgid "" -"Error occured while creating tables or indexes...
Query was: %s
" -msgstr "" -"テーブルまたはインデックスを作成中にエラー発生。
クエリは: %s
" +msgstr "ALTERクエリを実行中に問題がありました。エラー: %s" #: sqlite-integration.php:158 sqlite-integration.php:181 msgid "SQLite Integration" msgstr "" -#: utilities/documentation.php:17 utilities/documentation.php:19 -#: utilities/patch.php:157 utilities/patch.php:159 utilities/utility.php:382 -#: utilities/utility.php:384 utilities/utility.php:555 -#: utilities/utility.php:557 +#: utilities/documentation.php:16 utilities/documentation.php:18 +#: utilities/patch.php:161 utilities/patch.php:163 +#: utilities/utility.php:450 utilities/utility.php:452 +#: utilities/utility.php:636 utilities/utility.php:638 msgid "You are not allowed to access this page!" msgstr "このページにアクセスする権限がありません!" -#: utilities/documentation.php:24 utilities/documentation.php:31 -#: utilities/patch.php:217 utilities/utility.php:354 utilities/utility.php:389 -#: utilities/utility.php:601 +#: utilities/documentation.php:23 utilities/documentation.php:30 +#: utilities/patch.php:221 utilities/utility.php:422 +#: utilities/utility.php:457 utilities/utility.php:711 msgid "Documentation" msgstr "ドキュメント" -#: utilities/documentation.php:25 utilities/patch.php:218 -#: utilities/utility.php:358 utilities/utility.php:390 -#: utilities/utility.php:602 +#: utilities/documentation.php:24 utilities/patch.php:222 +#: utilities/utility.php:426 utilities/utility.php:458 +#: utilities/utility.php:712 msgid "System Info" msgstr "システム情報" -#: utilities/documentation.php:26 utilities/patch.php:219 -#: utilities/utility.php:362 utilities/utility.php:391 -#: utilities/utility.php:603 +#: utilities/documentation.php:25 utilities/patch.php:223 +#: utilities/utility.php:430 utilities/utility.php:459 +#: utilities/utility.php:713 msgid "Miscellaneous" -msgstr "いろいろなもの" +msgstr "いろいろ" -#: utilities/documentation.php:27 utilities/patch.php:220 -#: utilities/utility.php:366 utilities/utility.php:392 -#: utilities/utility.php:604 +#: utilities/documentation.php:26 utilities/patch.php:224 +#: utilities/utility.php:434 utilities/utility.php:460 +#: utilities/utility.php:714 msgid "Patch Utility" -msgstr "パッチをあてる" +msgstr "パッチ" -#: utilities/documentation.php:33 +#: utilities/documentation.php:32 msgid "" -"This is a brief documentation about this plugin. For more details, see also " -"the Plugin " -"Page." +"This is a brief documentation about this plugin. For more details, see also the " +"SQLite Integration page." msgstr "" "このプラグインについての短いドキュメントです。詳しくは、プラグインのページをご覧ください。" +"sqlite-integration/\">SQLite Integration のページをご覧ください。" -#: utilities/documentation.php:36 +#: utilities/documentation.php:35 msgid "" "Please don't forget: WordPress DOES NOT OFFICIALLY SUPPORT any database " "other than MySQL. So if you ask about this plugin in the Forum, it's not " @@ -200,26 +144,26 @@ msgstr "" "忘れないでください。WordPressが正式にサポートしているのはMySQLだけです。だから、フォーラムで質問しても、" "回答が得られることは少ないでしょう。" -#: utilities/documentation.php:39 +#: utilities/documentation.php:38 msgid "Features" msgstr "機能" -#: utilities/documentation.php:41 +#: utilities/documentation.php:40 msgid "" "This plugin is a successor to PDO for WordPress, which enabled WordPress to use " "SQLite for its database. But PDO for WordPress doesn't seem to be maintained " -"any more only to be outdated. SQLite Integration makes use of the basic ideas " -"and framework of PDO for WordPress, adds some new features and updates it to " -"be able to work with the newest version of WordPress(3.5.1 and 3.6 beta)." +"any more only to be outdated. SQLite Integration makes use of the basic " +"ideas and framework of PDO for WordPress, adds some new features and updates " +"it to be able to work with the newest version of WordPress(3.8.1)." msgstr "" "このプラグインは" "PDO for WordPressの後継です。PDO for WordPressはWordPressでSQLiteを使えるようにする" "ものでしたが、もうメンテナンスされていないようで、古くなってしまいました。SQLite Integrationは、その基本的な" -"考えと枠組みを使って、新たな機能を追加し、最新のWordPress(3.5.1および3.6ベータ)で動作するように" +"考えと枠組みを使って、新たな機能を追加し、最新のWordPress(3.8.1)で動作するように" "したものです。" -#: utilities/documentation.php:44 +#: utilities/documentation.php:43 msgid "" "SQLite Web Page says — SQLite " "is a "software library that implements selfcontained, serverless, zero-" @@ -232,7 +176,7 @@ msgstr "" "のライブラリです"。"小規模・中規模のウェブサイトによく合います"。小さくてポータブル、" "データベース・サーバなしでも使えるデータベースです。" -#: utilities/documentation.php:47 +#: utilities/documentation.php:46 msgid "" "Unfortunately enough, WordPress only supports MySQL. Consequently it doesn't " "provide any APIs for SQLite. So if you want to create a website using " @@ -243,53 +187,53 @@ msgstr "" "存在しません。だから、データベース・サーバなしでWordPressを使い、ウェブサイトを作ろうと思ったら、ある種の" "ラッパ・プログラムを書かなければなりません。これが、SQLite Integrationです。" -#: utilities/documentation.php:50 +#: utilities/documentation.php:49 msgid "SQLite Integration does the work as follows:" msgstr "SQLite Integrationは次のように動作します:" -#: utilities/documentation.php:53 +#: utilities/documentation.php:52 msgid "Intercepts SQL statement for MySQL from WordPress" msgstr "WordPressからMySQLに発行されるSQLステートメントをインターセプトします" -#: utilities/documentation.php:54 +#: utilities/documentation.php:53 msgid "Rewrites it as SQLite can execute" msgstr "SQLiteが実行できる形に書き換えます" -#: utilities/documentation.php:55 +#: utilities/documentation.php:54 msgid "Gives it to SQLite" msgstr "SQLiteに実行させます" -#: utilities/documentation.php:56 +#: utilities/documentation.php:55 msgid "Gets the results from SQLite" msgstr "SQLiteから結果を受け取ります" -#: utilities/documentation.php:57 +#: utilities/documentation.php:56 msgid "Format the results as MySQL returns, if necessary" msgstr "必要があれば、その結果をMySQLが返す形に整形します" -#: utilities/documentation.php:58 +#: utilities/documentation.php:57 msgid "Gives back the results to WordPress" msgstr "WordPressに結果を返します" -#: utilities/documentation.php:61 +#: utilities/documentation.php:60 msgid "" "WordPress doesn't know what has happened in the background and will be happy " "with it." msgstr "" "WordPressは背後で何が起こっているかを知らず、普通通り動作を続けます。" -#: utilities/documentation.php:64 +#: utilities/documentation.php:63 msgid "Limitations" msgstr "できないこと" -#: utilities/documentation.php:66 +#: utilities/documentation.php:65 msgid "" "SQLite Integration uses SQLite, so the limitations of SQLite is, as it is, " "those of SQLite Integration. MySQL is far from a simple SQL engine and has " "many extended features and functionalities. WordPress uses some of them. " "Among those are some SQLite doesn't implement. For those features that " -"WordPress uses, I made them work with SQLite Integration. But for others that " -"some plugins are using, SQLite Integration can't manipulate. So..." +"WordPress uses, I made them work with SQLite Integration. But for others " +"that some plugins are using, SQLite Integration can't manipulate. So..." msgstr "" "SQLite IntegrationはSQLiteを使います。だから、SQLiteの限界がそのまま、SQLite Integrationの" "限界になります。MySQLは単純なSQLエンジンなどというものではなくて、たくさんの拡張機能があります。" @@ -297,11 +241,11 @@ msgstr "" "SQLite Integrationが動作するようにしました。でも、他のプラグインが使っているようなもので、SQLite Integration" "が扱えないものもあります。だから..." -#: utilities/documentation.php:69 -msgid "There are some plugins that you can't use in any way.
" +#: utilities/documentation.php:68 +msgid "There are some plugins that you can't use. No way around.
" msgstr "どうしても使えないプラグインがあります。" -#: utilities/documentation.php:70 +#: utilities/documentation.php:69 msgid "" "Some plugins can't be activated or work properly. See the "Plugin " "Compatibility/Incompatibility" section." @@ -309,26 +253,26 @@ msgstr "" "プラグインの中には、有効化できなかったり、うまく動作しなかったりするものがあります。「プラグインの互換性」" "セクションをご覧ください。" -#: utilities/documentation.php:71 +#: utilities/documentation.php:70 msgid "" "There are some plugins that you can't use without rewriting some codes in " "them.
" msgstr "" "中のコードを書き換えなければ動作しないプラグインがあります。
" -#: utilities/documentation.php:72 +#: utilities/documentation.php:71 #, php-format msgid "" "Some plugins do work fine if you rewrite MySQL functions. I made some patch " "files and Patch Utility. See also the Plugin Page for " -"more details." +"\"http://dogwood.skr.jp/wordpress/sqlite-integration/#plugin-compat\">SQLite Integration" +" Page for more details." msgstr "" "MySQLの関数を書き換えると動作するプラグインがあります。いくつかはパッチファイルと、" -"パッチをあてるページを作りました。" -"プラグインのページもご覧ください。" +"パッチをあてるページを作りました。" +"SQLite Integration のページもご覧ください。" -#: utilities/documentation.php:75 +#: utilities/documentation.php:74 msgid "" "And there may be other problems I overlooked. If you find malfunctionality, " "please let me know at the サポートフォーラムでお知らせください。" -#: utilities/documentation.php:77 +#: utilities/documentation.php:76 msgid "User Defined Functions" msgstr "ユーザ定義関数" -#: utilities/documentation.php:79 +#: utilities/documentation.php:78 msgid "" "SQLite Integration replaces some functions of MySQL with the user defined " "functions built in PHP PDO library. But some of the functions are " @@ -353,60 +297,58 @@ msgstr "" "書き換えます。でも、SQLiteでは意味のない関数もあります。たとえば、get_lock()やrelease_lock()" "などです。SQLite Integrationは、これらの関数がエラーを出さないようにする以外のことをしていません。" -#: utilities/documentation.php:82 +#: utilities/documentation.php:81 msgid "" "If you want SQLite Integration to execute more functions, you can add the " -"definition in the file sqlite-integration/functions.php (functions-5-2.php is " -"for PHP 5.2 or lesser)." +"definition in the file sqlite-integration/functions.php (functions-5-2.php " +"is for PHP 5.2 or lesser)." msgstr "" "SQLite Integrationにもっとさくさんの関数を実行させたいときには、sqlite-integration/functions.php" "(functions-5-2.phpはPHP5.2以前用です)に定義を追加することができます。" -#: utilities/documentation.php:85 +#: utilities/documentation.php:84 msgid "Database Administration and Maintenance" msgstr "データベース管理・メンテナンス" -#: utilities/documentation.php:87 +#: utilities/documentation.php:86 msgid "" -"SQLite Integration doesn't contain database maintenace functionality, because " -"there are some other free or proprietary softwares that give you such " -"functionalities. For example, these are among free softwares:" +"SQLite Integration doesn't contain database maintenace functionality, " +"because there are some other free or proprietary softwares that give you " +"such functionalities. For example, these are among free softwares:" msgstr "" "SQLite Integrationはメンテナンスの機能を持っていません。というのは、他に同じ機能を提供することができる、" "フリーや独占ソフトウェアがあるからです。フリー・ソフトウェアには、次のようなものがあります。" -#: utilities/documentation.php:90 +#: utilities/documentation.php:89 msgid "my recommendation" msgstr "お勧めです" -#: utilities/documentation.php:91 +#: utilities/documentation.php:90 msgid "unfortunately seems not to maintained..." msgstr "残念なことにあまり活発に開発されていないようです..." -#: utilities/documentation.php:94 +#: utilities/documentation.php:93 msgid "" "I'm not sure if future release may have some of the database maintenance " "functionality." msgstr "" "将来のリリースでデータベースのメンテナンス機構を組み込むかどうかはわかりません。" -#: utilities/documentation.php:100 +#: utilities/documentation.php:99 msgid "Plugin Compatibility/Incompatibility" msgstr "プラグインの互換性/非互換性" -#: utilities/documentation.php:102 +#: utilities/documentation.php:101 msgid "" "WordPress without its plugins is a king without people. Of course, you need " "plugins, I know." msgstr "" "プラグインなしのWordPressは、国民のいない王様です。プラグインが使えなければなりません。" -#: utilities/documentation.php:105 +#: utilities/documentation.php:104 #, php-format msgid "" -"Most of the plugins will work fine with this plugin. But there are some that " -"you need to rewrite some codes in them, and there are others that you can't " -"use with this plugin. This is the list of the problematic plugins (far from " +"This is the list of the problematic plugins (far from " "complete). You can see informations about your installed plugins in the System Info page. To see more details, please " "visit the プラグインのページ" "をご覧ください。" -#: utilities/documentation.php:111 +#: utilities/documentation.php:110 msgid "Plugins Name" msgstr "プラグイン名" -#: utilities/documentation.php:112 +#: utilities/documentation.php:111 msgid "Compatibility" msgstr "互換性" -#: utilities/documentation.php:113 +#: utilities/documentation.php:112 msgid "Reasons" msgstr "理由" -#: utilities/documentation.php:127 utilities/utility.php:239 +#: utilities/documentation.php:126 utilities/utility.php:239 #: utilities/utility.php:241 msgid "Needs Patch" msgstr "パッチが必要" -#: utilities/documentation.php:129 utilities/utility.php:245 +#: utilities/documentation.php:128 utilities/utility.php:245 msgid "Probably No" msgstr "たぶん不可" -#: utilities/documentation.php:131 utilities/utility.php:251 +#: utilities/documentation.php:130 utilities/utility.php:251 msgid "No" msgstr "不可" -#: utilities/documentation.php:141 -msgid "Caching Plugins" -msgstr "キャッシュ用プラグイン" - -#: utilities/documentation.php:143 -msgid "" -"Some plugins that give you cache functinality might cause problems. It is " -"because they try to create the db.php file in wp-content directory, which " -"file SQLite Integration is using." -msgstr "" -"キャッシュの機能を提供するプラグインの中には問題になるものがあります。wp-contentディレクトリにdb.php" -"ファイルを作ろうとするのですが、SQLite Integrationがすでにそれを使ってしまっているからです。" - -#: utilities/documentation.php:146 -msgid "" -"If those plugins overwrite the db.php file, SQLite Integration doesn't work. " -"My recommendation is not to use caching plugins. " -"Even so, if you want a caching plugin, you could try WP Super Cache, which " -"doesn't use db.php file. But no warranty, try at your own risk." -msgstr "" -"これらのプラグインがdb.phpファイルを上書きすると、SQLite Integrationは動作しなくなります。" -"私のお勧めは、キャッシュ・プラグインを使わないというものです。" -"それでも、どうしても使いたいということであれば、WP Super Cacheのようなものなら試せるかもしれません。db.phpを使わない" -"からです。でも、保証はありません。ご自分の責任でお試しください。" - -#: utilities/documentation.php:149 -msgid "I have not tested none of those caching plugins." -msgstr "私はこれらのキャッシュ・プラグインをテストしていません。" - -#: utilities/documentation.php:151 -msgid "MySQL specific functions" -msgstr "MySQL用の関数" - -#: utilities/documentation.php:153 -msgid "" -"Some plugins don't use WordPress database functions such as dbDelta(), and " -"use PHP native MySQL functions when they create and manage tables in the " -"database. But PHP doesn't permit redefining of the native functions (at " -"least, under ordinary server setting). So SQLite Integration can't intercept " -"and rewrite those functions." -msgstr "" -"プラグインの中にはデータベースにアクセスするのに、WordPressが提供するdbDelta()のような関数を使わず、" -"PHPのmysqlドライバの提供する関数を使って、テーブルを作ったり、操作したりするものがあります。PHPは組み込み" -"の関数を再定義することを許しません(少なくとも通常のサーバ設定では)。だから、SQLite Integrationは" -"それらをインターセプトして、書き換えることができません。" - -#: utilities/documentation.php:156 -msgid "For example, you can see these codes in Google XML Sitemaps." -msgstr "たとえば、Google XML Sitemapsにはこのようなコードがあります。" - -#: utilities/documentation.php:162 -msgid "or in Camera Slideshow" -msgstr "あるいは、Camera Slideshowには、こんな部分があります。" - -#: utilities/documentation.php:168 -msgid "" -"Such functions as mysql_get_server_info() or mysql_query() are from the " -"MySQL driver of PHP. Not only some plugins but WordPress uses them, but " -"SQLite Integration has no way to rewrite or redefine them. If the plugin you " -"want to use has those functions in it, it won't work or give the error " -"messages." -msgstr "" -"mysql_get_server_info()やmysql_query()といった関数は、PHPのドライバが提供するものです。" -"でも、SQLite Integrationはこれらを書き換えたり、再定義したりすることができません。もし、あなたが" -"使いたいプラグインがこれらの関数を使っていたら、うまく動かないか、エラー・メッセージが出るでしょう。" - -#: utilities/documentation.php:171 -msgid "" -"So, you have to rewrite them for SQLite Integration can execute. The two " -"example above can be rewritten like this:" -msgstr "" -"だから、これらの関数は手動で書き換えなければ、SQLite Integrationで実行できません。上の2つの" -"例は、次のように書き換えればうまくいきます。" - -#: utilities/documentation.php:180 -msgid "" -"As for those functions in WordPress, I overrode the WordPress functions " -"themselves that contains such MySQL functions as mysql_query() or " -"mysql_real_escape_string()." -msgstr "" -"WordPressで使われているこれらの関数については、mysql_query()やmysql_real_escape_string()" -"といった関数を含むWordPress関数をオーバーライドしています。" - -#: utilities/documentation.php:182 -msgid "FULLTEXT index" -msgstr "FULLTEXTインデックス" - -#: utilities/documentation.php:184 -msgid "" -"Some plugins use FULLTEXT index of MySQL. Of course SQLite does have the " -"functionality named "full-text search". But it is not correlated " -"with that of MySQL. In fact it is not an "index" and requires " -"another new table for that. And it has a different syntax. So you can't use " -"the plugins which uses FULLTEXT index" -msgstr "" -"プラグインの中には、MySQLのFULLTEXTインデックスを使うものがあります。もちろん、SQLiteにも、"" -"full-text search"という機能があります。でも、これはMySQLのものとは違います。、実際は" -"インデックスではなく、新たなテーブルを作らなければならないものです。構文も異なります。だから、FULLTEXT" -"インデックスを使うプラグインは使うことができません。" - -#: utilities/documentation.php:187 -msgid "" -"If your language is not written by separating words with spaces, e.g. " -"Japanese, Chinese or Thai, neither FULLTEXT index nor full-text search work " -"effectively. Even if your language is space-separating-words one, you don't " -"have to be disappointed. Whatever languages you use, you can use WordPress Related Posts or Related Posts or others. They are working fine " -"with SQLite Integration!" -msgstr "" -"あなたの言語が、日本語や中国語やタイ語のように、スペースで単語を区切らない言語の場合、FULLTEXT" -"インデックスもfull-text searchも有効に働きません。あなたの言語が分かち書きをするものだとしても、" -"がっかりする必要はありません。WordPress Related PostsRelated Postsのうようなプラグインを" -"使うことができます。これらは、SQLite Integrationでちゃんと動作します。" - -#: utilities/patch.php:53 +#: utilities/patch.php:55 msgid "Patch command is not found" msgstr "パッチコマンドがありません" -#: utilities/patch.php:56 +#: utilities/patch.php:58 msgid "Patch command is not executable" msgstr "パッチコマンドが実行可能ではありません" -#: utilities/patch.php:73 +#: utilities/patch.php:75 msgid "Patch file name is invalid" msgstr "パッチファイルが不正です" -#: utilities/patch.php:77 +#: utilities/patch.php:79 msgid "Patch file version does not match with that of your plugin." msgstr "パッチファイルのバージョンがプラグインのものと一致しません。" -#: utilities/patch.php:86 +#: utilities/patch.php:88 msgid "Error! Plugin directory is not accessible." msgstr "エラーです。プラグインのディレクトリにアクセスできません。" -#: utilities/patch.php:89 +#: utilities/patch.php:91 msgid "is patched successfully." msgstr "パッチを適用しました。" -#: utilities/patch.php:94 utilities/patch.php:121 +#: utilities/patch.php:96 #, php-format msgid "Error! Messages: %s" -msgstr "エラー。メッセージは: %s" +msgstr "エラー! メッセージ: %s" -#: utilities/patch.php:118 -msgid "Error!: patches directory is not accessible." -msgstr "エラー。パッチディレクトリにアクセスできません。" - -#: utilities/patch.php:123 +#: utilities/patch.php:120 #, php-format msgid "File %s is deleted." msgstr "ファイル%sは削除されました。" -#: utilities/patch.php:138 -msgid "File is uploaded" -msgstr "ファイルをアップロードしました" +#: utilities/patch.php:122 +#, php-format +msgid "Error! File %s is not deleted." +msgstr "エラー! ファイル%sは削除されていません。" + +#: utilities/patch.php:126 +msgid "Error!: patches directory is not accessible." +msgstr "エラー! パッチ・ディレクトリにアクセスできません。" + +msgid "Unable to create a patch directory." +msgstr "パッチ・ディレクトリを作成できませんでした。" + +msgid "Unable to create a .htaccess file." +msgstr ".htaccess ファイルを作成できませんでした。" + +msgid "Invalid operation." +msgstr "不正な操作です。" + +msgid "File is too large to upload." +msgstr "ファイルサイズが制限を越えています。" + +msgid "File upload is not complete." +msgstr "ファイルアップロードは完了しませんでした。" + +msgid "File is not uploaded." +msgstr "ファイルはアップロードされませんでした。" + +msgid "Temporary directory is not writable." +msgstr "テンポラリ・ディレクトリに書込みできません。" + +msgid "File cannot be written on the disk." +msgstr "ファイルをディスクに書き込めません。" + +msgid "Unknown error." +msgstr "不明なエラーです。" #: utilities/patch.php:142 -msgid "File is not uploaded" -msgstr "ファイルのアップロードができませんでした" +msgid "File is successfully uploaded." +msgstr "ファイルをアップロードしました" #: utilities/patch.php:146 +msgid "File upload failed. Possible file upload attack." +msgstr "アップロードに失敗しました。不正なファイルです。" + +#: utilities/patch.php:150 msgid "File is not selected" msgstr "ファイルが選択されていません" -#: utilities/patch.php:164 utilities/patch.php:166 utilities/patch.php:186 -#: utilities/patch.php:188 utilities/patch.php:208 utilities/patch.php:210 +#: utilities/patch.php:168 utilities/patch.php:170 +#: utilities/patch.php:190 utilities/patch.php:192 +#: utilities/patch.php:212 utilities/patch.php:214 msgid "You are not allowed to do this operation!" -msgstr "この操作をする権限がありません" +msgstr "この操作をする権限がありません!" -#: utilities/patch.php:170 utilities/patch.php:192 +#: utilities/patch.php:174 utilities/patch.php:196 msgid "Please select patch file(s)" msgstr "パッチファイルを選択してください" -#: utilities/patch.php:179 +#: utilities/patch.php:183 msgid "None of the patches is applied!" -msgstr "パッチは適用されませんでした。" +msgstr "パッチは適用されませんでした!" -#: utilities/patch.php:201 +#: utilities/patch.php:205 msgid "Error! Please remove files manually" -msgstr "エラー。ファイルを手動で削除してください。" +msgstr "エラー! ファイルを手動で削除してください" -#: utilities/patch.php:224 +#: utilities/patch.php:228 msgid "Patch Files Upload and Apply" msgstr "パッチファイルのアップロードと適用" -#: utilities/patch.php:225 +#: utilities/patch.php:229 msgid "What you can do in this page" msgstr "このページでできること" -#: utilities/patch.php:227 +#: utilities/patch.php:231 msgid "" "I made patch files for some plugins that are incompatible with SQLite " "Integration and need rewriting. And I wrote in the プラグイン・ページで適用の仕方を書きましたが、コマンドライン" "での操作が苦手な人もいます。初心者は特にそうでしょう。" -#: utilities/patch.php:230 +#: utilities/patch.php:234 msgid "" "In this page, you can upload patch files and apply them automatically. But " "there are some requirements." @@ -658,7 +513,7 @@ msgstr "" "このページでは、パッチファイルをアップロードして、自動的にそれを適用することができます。でも、いくつかの必要" "要件があります。" -#: utilities/patch.php:233 +#: utilities/patch.php:237 msgid "" "Think before you leap. Is the plugin to which you are going to apply patch " "really necessary for your site? Did you search in the Plugin Directory" "で代わりになるプラグインを探してみましたか?" -#: utilities/patch.php:234 +#: utilities/patch.php:238 msgid "" "Your PHP script has the permission to create a directory and write a file in " "it." msgstr "" "PHPスクリプトがディレクトリやファイルを作成する権限を持っていなければなりません。" -#: utilities/patch.php:235 +#: utilities/patch.php:239 msgid "Your PHP scripts can execute exec() function on the server." msgstr "PHPスクリプトがサーバ上で、exec()関数を実行できること。" -#: utilities/patch.php:236 +#: utilities/patch.php:240 msgid "" "Your PHP script can execute "patch" shell command.(Script will " "check if it is executable or not.)" @@ -687,17 +542,18 @@ msgstr "" "PHPスクリプトが"patch"シェルコマンドを実行できること(実行可能かどうかはスクリプトが" "チェックします)。" -#: utilities/patch.php:239 +#: utilities/patch.php:243 msgid "" "If uploading fails, it' very likely that application will fail. When you try " "uploading with FTP client, the patch files must be put into the directory wp-" -"content/uploads/patches/. When constant UPLOADS is defined, script follows it." +"content/uploads/patches/. When constant UPLOADS is defined, script follows " +"it." msgstr "" "ファイルのアップロードが失敗する場合は、パッチの適用も失敗する可能性があります。FTPクライアントでアップロード" "するときは、wp-content/uploads/patchesディレクトリに入るようにしてください。UPLOADS定数が定義されている" "場合はそれに従います。" -#: utilities/patch.php:242 +#: utilities/patch.php:246 msgid "" "You can create your patch file yourself. When you create one, please test it " "on your local server first and check if it works fine without PHP error or " @@ -708,23 +564,23 @@ msgstr "" "出ていないことを確認してください(error_reposting(E_ALL)をセットするとよい)。このページで使いたい" "場合は、次のように名前をつけてください。" -#: utilities/patch.php:245 +#: utilities/patch.php:249 msgid "Use the file name beginning with the plugin directory name." msgstr "プラグインのディレクトリ名で始まる名前にする。" -#: utilities/patch.php:246 +#: utilities/patch.php:250 msgid "Use the plugin version number after the directory name with underscore." msgstr "ディレクトリ名の後にアンダースコアとバージョン番号を使う。" -#: utilities/patch.php:247 +#: utilities/patch.php:251 msgid "Use the suffix .patch." msgstr ".patchを拡張子にする。" -#: utilities/patch.php:248 +#: utilities/patch.php:252 msgid "Use diff command options "-Naur"." msgstr "diffコマンドには"-Naur"オプションを使う。" -#: utilities/patch.php:251 +#: utilities/patch.php:255 msgid "" "For example, the patch file for the plugin "Debug Bar" is "" "debug-bar_0.8.patch". Script interprets "debug-bar" as the " @@ -737,47 +593,47 @@ msgstr "" "を対象のバージョンとして解釈します。バージョン番号が対象のものと一致しない場合は、スクリプトはエラー・メッセージ" "を出力して、実行を中断します。他のファイル名の場合は実行しません。" -#: utilities/patch.php:254 +#: utilities/patch.php:258 msgid "How to install, patch and activate plugins" msgstr "プラグインのインストール、パッチ、有効化のしかた" -#: utilities/patch.php:256 +#: utilities/patch.php:260 msgid "Install the plugin (not yet activate it)" msgstr "プラグインをインストールします(まだ有効化しないでください)" -#: utilities/patch.php:257 +#: utilities/patch.php:261 msgid "Upload the patch file (if any) to the server and ppply it in this page" msgstr "パッチファイルがあれば、アップロードし、適用します" -#: utilities/patch.php:258 +#: utilities/patch.php:262 msgid "Back to the installed plugin page and activate it" msgstr "インストール済みプラグインのページに戻り、有効化します" -#: utilities/patch.php:260 +#: utilities/patch.php:264 msgid "How to upgrade plugins" msgstr "プラグインのアップグレードのしかた" -#: utilities/patch.php:262 +#: utilities/patch.php:266 msgid "When upgrading the plugin, it will be safer to follow next steps." msgstr "プラグインをアップグレードするときは、安全のために次のステップに従ってください。" -#: utilities/patch.php:265 +#: utilities/patch.php:269 msgid "Deactivate the plugin" msgstr "プラグインを無効化します" -#: utilities/patch.php:266 +#: utilities/patch.php:270 msgid "Upgrade the plugin" msgstr "プラグインをアップグレードします" -#: utilities/patch.php:267 +#: utilities/patch.php:271 msgid "Upload the patch file (if any) and apply it" msgstr "パッチファイルがあればそれをアップロードして適用します" -#: utilities/patch.php:268 +#: utilities/patch.php:272 msgid "Reactivate the plugin" msgstr "再び有効化します" -#: utilities/patch.php:270 +#: utilities/patch.php:274 msgid "" "If there isn't a patch file to match with the newest version of the plugin, " "it won't work properly. Please wait for somebody to make one or rewrite the " @@ -789,78 +645,80 @@ msgstr "" "だれかがパッチを作るのを待つか、前バージョンのパッチを参考に自分で書き換えをしてください(それほど難しい" "作業ではありません。多くの場合、MySQLの関数をWordPressの関数に置き換えるだけです)。" -#: utilities/patch.php:271 +#: utilities/patch.php:275 msgid "Upload and Apply" msgstr "アップロードと適用" -#: utilities/patch.php:275 +#: utilities/patch.php:279 msgid "File Select" msgstr "ファイルを選択" -#: utilities/patch.php:282 +#: utilities/patch.php:286 msgid "" "Select file from your computer. If the file name is the same as existent " -"file, this operation will override it." +"file, this operation will override it. You can't upload the file whose " +"size is over 500kB." msgstr "" "あなたのコンピュータにあるファイルを選択します。ファイル名がすでに存在する場合は、それを上書きします。" +"500kB を越えるサイズのファイルはアップロードできません。" -#: utilities/patch.php:284 +#: utilities/patch.php:288 msgid "Upload" msgstr "アップロード" -#: utilities/patch.php:289 +#: utilities/patch.php:293 msgid "Patch files uploaded" msgstr "アップロードしたパッチファイル" -#: utilities/patch.php:296 +#: utilities/patch.php:300 msgid "" "Select the file(s) you want to apply to the plugin(s) or you want to delete. " "You can select multiple files." msgstr "" "プラグインに適用したいパッチファイル、または削除したいパッチファイルを選択してください。複数選択できます。" -#: utilities/patch.php:300 +#: utilities/patch.php:304 msgid "Apply/Hold" msgstr "適用/保留" -#: utilities/patch.php:301 +#: utilities/patch.php:305 msgid "Patch files to apply" msgstr "適用するパッチ" -#: utilities/patch.php:317 +#: utilities/patch.php:321 msgid "Apply patch" msgstr "パッチを適用" -#: utilities/patch.php:317 +#: utilities/patch.php:321 msgid "" "Are you sure to apply patch files?\\n\\nClick [Cancel] to stop,[OK] to " "continue." msgstr "" "本当にパッチを適用してもよろしいですか?\\n\\nやめるなら[キャンセル]をクリック、続けるなら[OK]をクリック。" -#: utilities/patch.php:318 +#: utilities/patch.php:322 utilities/utility.php:765 msgid "Delete file" msgstr "ファイルを削除" -#: utilities/patch.php:318 +#: utilities/patch.php:322 msgid "" "Are you sure to delete patch files?\\n\\nClick [Cancel] to stop,[OK] to " "continue." msgstr "" "本当に削除してもよろしいですか?\\n\\nやめるなら[キャンセル]をクリック、続けるなら[OK]をクリック。" -#: utilities/patch.php:329 +#: utilities/patch.php:333 msgid "Caution about your patch file(s)" msgstr "パッチファイルについての注意" -#: utilities/patch.php:333 +#: utilities/patch.php:337 msgid "" "If you don't know where it comes from or who created it, I strongly " "recommend that you should see and check the contents of the file. If a " "person who created it secretly inserted a malicious codes, it will be " "executed by the plugin and may damage your site or your server, for which " -"damage I don't incur any liability. If you don't understand well, you'd better use " -"the substitute plugins. Take your own risk, please." +"damage I don't incur any liability. If you don't understand well, you'd " +"better use the substitute plugins. Take your own risk, please." msgstr "" "素性のあやしいパッチファイルがあったら、ファイルの内容を確認することを強くお勧めします。作成者がひそかに" "悪意のあるコードを仕込んでいると、プラグインがそれを実行してしまいます。あなたのサイトやサーバが被害を受ける" @@ -869,12 +727,22 @@ msgstr "" #: utilities/utility.php:248 msgid "Probably Yes" -msgstr "たぶん不可" +msgstr "たぶん可" #: utilities/utility.php:254 msgid "Checked" msgstr "チェック済" +msgid "Checked*" +msgstr "チェック済*" + +msgid "" +"\"Checked*\" with an asterisk is from the users' information. " +"I didn't check myself yet. If you found any malfunctioning, please let me know." +msgstr "" +"「チェック済*」のようにアステリスクのついたものは、ユーザからの情報にもとづいたものです。" +"私自身はチェックしていません。もし、不具合があるようでしたら、お知らせください。" + #: utilities/utility.php:257 utilities/utility.php:263 msgid "Not Checked" msgstr "未確認" @@ -891,24 +759,41 @@ msgstr "有効" msgid "Inactive" msgstr "無効" -#: utilities/utility.php:336 +#: utilities/utility.php:368 +msgid " was created." +msgstr "が作成されました。" + +#: utilities/utility.php:370 +msgid " was not created." +msgstr "は作成できませんでした。" + +#: utilities/utility.php:391 +#, php-format +msgid "File %s was deleted." +msgstr "ファイル%sは削除されました。" + +#: utilities/utility.php:393 +msgid "Error! File was not deleted." +msgstr "エラー! ファイルは削除されていません。" + +#: utilities/utility.php:404 msgid "Welcome to SQLite Integration" msgstr "SQLite Integrationにようこそ" -#: utilities/utility.php:338 +#: utilities/utility.php:406 msgid "Thank you for using SQLite Integration plugin!" -msgstr "SQLite Integrationをお使いいただき、ありがとうぐざいます。" +msgstr "SQLite Integrationをお使いいただき、ありがとうございます。" -#: utilities/utility.php:341 +#: utilities/utility.php:409 msgid "" "You read this message, which means you have succeeded in installing " -"WordPress with this plugin SQLite Integration. Congratulations and enjoy your " -"Blogging!" +"WordPress with this plugin SQLite Integration. Congratulations and enjoy " +"your Blogging!" msgstr "" "このメッセージを読んでいるということは、インストールの成功したことを意味します。おめでとうございます。ブログをお楽しみ" "ください。" -#: utilities/utility.php:344 +#: utilities/utility.php:412 msgid "" "You don't have to set any special settings. In fact there are no other " "settings. You can write articles or pages and customize you WordPress in an " @@ -920,129 +805,129 @@ msgstr "" "WordPressをカスタマイズしたりできます。プラグインをインストールしたいですか? そうしましょう。でも、中には" "使えないものもあります。プラグインやSQLiteデータベースについての情報をお読みください。" -#: utilities/utility.php:346 +#: utilities/utility.php:414 msgid "" "Deactivation makes this documents and utilities disappear from the " -"dashboard, but it doesn't affect the functionality of the SQLite Integration. " -"when uninstalled, it will remove wp-content/uploads/patches directory (if " -"exists) and wp-content/db.php file altogether." +"dashboard, but it doesn't affect the functionality of the SQLite " +"Integration. when uninstalled, it will remove wp-content/uploads/patches " +"directory (if exists) and wp-content/db.php file altogether." msgstr "" "無効化すると、ダッシュボードからこのドキュメントとユーティリティを消すことができます。でも、SQLite Integration" "の機能には影響ありません。削除のときは、もしあれば、wp-content/uploads/patchesディレクトリと、" "wp-content/db.phpファイルを削除します。" -#: utilities/utility.php:349 +#: utilities/utility.php:417 msgid "Title" msgstr "タイトル" -#: utilities/utility.php:350 +#: utilities/utility.php:418 msgid "Contents" msgstr "コンテンツ" -#: utilities/utility.php:355 +#: utilities/utility.php:423 msgid "You can read documentation about this plugin and plugin compatibility." msgstr "このプラグインについてのドキュメントとプラグインの互換性について読むことができます。" -#: utilities/utility.php:359 +#: utilities/utility.php:427 msgid "You can see database and system information." msgstr "データベースとシステムの情報を見ることができます。" -#: utilities/utility.php:363 +#: utilities/utility.php:431 msgid "" "You can see the error log and edit db.php file (if necessary) and optimize " "your database." msgstr "" "エラー・ログを見たり、必要なら、db.phpを編集したり、データベースの最適化をしたりできます。" -#: utilities/utility.php:367 +#: utilities/utility.php:435 msgid "You can upload patch files and apply them to the incompatible plugins." msgstr "パッチファイルをアップロードし、プラグインに適用できます。" -#: utilities/utility.php:396 +#: utilities/utility.php:464 msgid "System Information" msgstr "システム情報" -#: utilities/utility.php:397 +#: utilities/utility.php:465 msgid "PHP Informations" msgstr "PHP情報" -#: utilities/utility.php:402 utilities/utility.php:438 +#: utilities/utility.php:470 utilities/utility.php:506 msgid "Items" msgstr "項目" -#: utilities/utility.php:403 +#: utilities/utility.php:471 msgid "Description" msgstr "説明" -#: utilities/utility.php:408 +#: utilities/utility.php:476 msgid "WordPress Version" -msgstr "WordPressのバージョン" +msgstr "WordPressバージョン" -#: utilities/utility.php:412 +#: utilities/utility.php:480 msgid "PHP Version" -msgstr "PHPのバージョン" +msgstr "PHPバージョン" -#: utilities/utility.php:416 +#: utilities/utility.php:484 msgid "PDO Support" msgstr "PDOサポート" -#: utilities/utility.php:420 +#: utilities/utility.php:488 msgid "PDO Drivers" msgstr "PDOドライバ" -#: utilities/utility.php:424 +#: utilities/utility.php:492 msgid "PDO Driver for SQLite 3.x" msgstr "SQLite 3.x用PDOドライバ" -#: utilities/utility.php:428 +#: utilities/utility.php:496 msgid "SQLite Library Version" msgstr "SQLiteライブラリのバージョン" -#: utilities/utility.php:434 +#: utilities/utility.php:502 msgid "Your Database Status" msgstr "データベースの状態" -#: utilities/utility.php:439 +#: utilities/utility.php:507 msgid "Status" msgstr "状態" -#: utilities/utility.php:445 +#: utilities/utility.php:513 msgid "Database Size" -msgstr "データベースのサイズ" +msgstr "データベース・サイズ" -#: utilities/utility.php:449 +#: utilities/utility.php:517 msgid "Page Size" -msgstr "ページサイズ" +msgstr "ページ・サイズ" -#: utilities/utility.php:453 +#: utilities/utility.php:521 msgid "Total Number of Pages" msgstr "合計のページ数" -#: utilities/utility.php:457 +#: utilities/utility.php:525 msgid "Unused Page" msgstr "未使用ページ" -#: utilities/utility.php:461 +#: utilities/utility.php:529 msgid "Integrity Check" msgstr "整合性チェック" -#: utilities/utility.php:465 +#: utilities/utility.php:533 msgid "Encoding" msgstr "エンコーディング" -#: utilities/utility.php:469 +#: utilities/utility.php:537 msgid "Collations" msgstr "照合順序" -#: utilities/utility.php:481 +#: utilities/utility.php:549 msgid "Compile Options" -msgstr "コンパイルオプション" +msgstr "コンパイル・オプション" -#: utilities/utility.php:495 +#: utilities/utility.php:563 msgid "Database Tables and Indexes" msgstr "データベースのテーブルとインデックス" -#: utilities/utility.php:497 +#: utilities/utility.php:565 msgid "" "Table names in brown are required by WordPress, and those in blue are " "created by some plugins. The table sqlite_sequence is not a WordPress table " @@ -1056,74 +941,92 @@ msgstr "" "格納されています。この値は、テーブル名の隣に括弧つきで表示されます。テーブルやインデックスをここで操作" "することはできません。SQLiteManagerのようなユーティリティをお使いください。" -#: utilities/utility.php:502 +#: utilities/utility.php:570 msgid "Table Name" msgstr "テーブル名" -#: utilities/utility.php:503 +#: utilities/utility.php:571 msgid "System/User" msgstr "システム/ユーザ" -#: utilities/utility.php:504 +#: utilities/utility.php:572 msgid "Index ( Column )" -msgstr "インデックス ( カラム名 )" +msgstr "インデックス(カラム名)" -#: utilities/utility.php:529 +#: utilities/utility.php:610 msgid "Plugin Info" msgstr "プラグイン情報" -#: utilities/utility.php:531 +#: utilities/utility.php:612 msgid "This table shows plugins you have installed and their compatibility." msgstr "この表は、インストール済みのプラグインについて、互換性を表示します。" -#: utilities/utility.php:536 +#: utilities/utility.php:617 msgid "Installed Plugins" msgstr "インストール済み" -#: utilities/utility.php:537 +#: utilities/utility.php:618 msgid "Active/Inactive" msgstr "有効/無効" -#: utilities/utility.php:538 +#: utilities/utility.php:619 msgid "Compatible" msgstr "互換性" -#: utilities/utility.php:562 +#: utilities/utility.php:643 msgid "Log cleared" msgstr "ログをクリアしました" -#: utilities/utility.php:565 +#: utilities/utility.php:646 msgid "Log not cleared" msgstr "ログがクリアされませんでした" -#: utilities/utility.php:577 +#: utilities/utility.php:658 msgid "db.php was saved" msgstr "db.phpを保存しました" -#: utilities/utility.php:580 +#: utilities/utility.php:661 msgid "Error! db.php couldn't be saved" msgstr "エラー。db.phpを保存できませんでした" -#: utilities/utility.php:591 +#: utilities/utility.php:672 #, php-format msgid "" "Optimization finished. Before optimization: %1$s, After optimization: %2$s." msgstr "" "最適化が終了しました。最適化前のサイズ: %1$s、最適化後のサイズ: %2$s。" -#: utilities/utility.php:594 +#: utilities/utility.php:675 msgid "Optimization failed" msgstr "最適化に失敗しました" -#: utilities/utility.php:608 -msgid "Database Optimization, Error Log, Init File" +#: utilities/utility.php:683 +msgid "Couldn't find your database file." msgstr "データベースの最適化、エラーログ、初期化ファイル" -#: utilities/utility.php:609 +#: utilities/utility.php:695 +msgid "Please select backup file(s)." +msgstr "バックアップファイルを選択してください。" + +#: utilities/utility.php:704 +msgid "Error! Please remove file(s) manyally." +msgstr "エラー! 手動でファイルを削除してください。" + +msgid "Please select backup file." +msgstr "バックアップファイルを選択してください。" + +msgid "Please select one file at a time." +msgstr "複数ファイルは選択できません。" + +#: utilities/utility.php:718 +msgid "Database Optimization, Error Log, Init File" +msgstr "データベース最適化、エラー・ログ、初期化ファイル" + +#: utilities/utility.php:719 msgid "Optimize You Database" msgstr "データベースを最適化する" -#: utilities/utility.php:611 +#: utilities/utility.php:721 msgid "" "This button sends "vacuum" command to your SQLite database. That " "command reclaims space after data has been deleted." @@ -1131,49 +1034,111 @@ msgstr "" "このボタンは"vaccum"コマンドをSQLiteデータベースに発行します。このコマンドは、" "データの削除後に空いたスペースを回収します。" -#: utilities/utility.php:619 +#: utilities/utility.php:729 msgid "Optimize" msgstr "最適化" -#: utilities/utility.php:619 +#: utilities/utility.php:729 msgid "" "Are you sure to optimize your database?\\n\\nClick [Cancel] to stop, [OK] to " "continue." msgstr "" "本当にデータベースを最適化しますか?\\n\\nやめるときは[キャンセル]を、続けるなら[OK]をクリック。" -#: utilities/utility.php:622 +#: utilities/utility.php:732 +msgid "Create or Delete backup file(s)" +msgstr "データベースのバックアップを作る・削除する" + +#: utilities/utility.php:734 +msgid "" +"Click the backup button below if you want to create a current snapshot of " +"your database file. The backup file is named ‘DB_FILE_NAME.yyyymmdd." +"zip’ if PHP zip extension is loaded or ‘DB_FILE_NAME.yyyymmdd." +"back’ if not loaded, and is put in the same directory that the database " +"is in." +msgstr "" +"現在のデータベースのコピーを作りたいときには、下のバックアップボタンをクリックしてください。バックアップファイルは、" +"PHPのzipエクステンションがロードされている場合は、‘データベース名.yyyymmdd.zip’という名前で、" +"ロードされていない場合は、‘データベース名.yyyymmdd.back’という名前で、データベースと同じディレクトリ" +"につくられます。" + +#: utilities/utility.php:737 +msgid "" +"If you want to delete the file(s), check the file name and click the Delete " +"button. You can check multiple files." +msgstr "" +"バックアップファイルを削除したい場合は、ファイルをチェックして削除ボタンをクリックしてください。複数ファイルを選択できます。" + +msgid "" +"If you want to download a file, check the file name and click the Download button." +" Please check one file at a time." +msgstr "" +"バックアップファイルをダウンロードしたい場合は、ファイルをチェックしてダウンロードボタンをクリックしてください。" +"1ファイルのみ選択できます。" + +#: utilities/utility.php:748 +msgid "Delete/Download" +msgstr "削除/ダウンロード" + +#: utilities/utility.php:749 +msgid "Backup Files" +msgstr "バックアップファイル" + +#: utilities/utility.php:764 +msgid "Backup" +msgstr "バックアップ" + +#: utilities/utility.php:764 +msgid "" +"Are you sure to make a backup file?\\n\\nClick [Cancel] to stop, [OK] to " +"continue." +msgstr "" +"バックアップファイルを作ります。\\n\\n中止する場合は[Cancel]を、続ける場合は[OK]をクリックしてください。" + +#: utilities/utility.php:765 +msgid "" +"Are you sure to delete backup file(s)?\\n\\nClick [Cancel] to stop, [OK] to " +"continue." +msgstr "" +"バックアップファイルを削除します。\\n\\n中止する場合は[Cancel]を、続ける場合は[OK]をクリックしてください。" + +msgid "" +"Are you sure to download backup file?\\n\\nClick [Cancel] to stop, [OK] to continue." +msgstr "" +"バックアップファイルをダウンロードします。\\n\\n中止する場合は[Cancel]を、続ける場合は[OK]をクリックしてください。" + +#: utilities/utility.php:768 msgid "SQLite Integration Error Log" msgstr "SQLite Integrationのエラーログ" -#: utilities/utility.php:624 +#: utilities/utility.php:770 msgid "" -"This is the contents of SQLite Integration error log file(default: wp-content/" -"database/debug.txt). If you want to clear this file, click the Clear Log " -"button." +"This is the contents of SQLite Integration error log file(default: wp-" +"content/database/debug.txt). If you want to clear this file, click the Clear " +"Log button." msgstr "" "SQLite Integrationが使うエラーログ・ファイルの内容です(デフォルトでは、wp-content/database/debug.txt)。" "このファイルの内容をクリアするには、ログをクリアのボタンをクリックしてください。" -#: utilities/utility.php:634 +#: utilities/utility.php:780 msgid "No error messages are found" msgstr "エラーメッセージはありません" -#: utilities/utility.php:642 +#: utilities/utility.php:788 msgid "Clear Log" msgstr "ログをクリア" -#: utilities/utility.php:642 +#: utilities/utility.php:788 msgid "" "Are you sure to clear Log?\\n\\nClick [Cancel] to stop, [OK] to continue." msgstr "" "本当にログをクリアしてもいいですか?\\n\\nやめるなら[キャンセル]を。続けるなら[OK]をクリック。" -#: utilities/utility.php:646 +#: utilities/utility.php:792 msgid "Edit Initial File (wp-content/db.php)" msgstr "初期化ファイル(wp-content/db.php)を編集" -#: utilities/utility.php:648 +#: utilities/utility.php:794 msgid "" "When you go "Plugins » Edit Plugin" page, you can edit " "plugin source file. But you can't see this file there because it is not in " @@ -1186,13 +1151,193 @@ msgstr "" "することができます。この設定は問題を起こすことがあります。よくわからない場合は" "このファイルを変更しないでください。" -#: utilities/utility.php:658 +#: utilities/utility.php:804 msgid "Save" msgstr "保存" -#: utilities/utility.php:658 +#: utilities/utility.php:804 msgid "" "Are you sure to save this file?\\n\\nClick [Cancel] to stop, [OK] to " "continue." msgstr "" "この内容を保存してもよろしいですか?\\n\\nやめるなら[キャンセル]を、続けるなら[OK]をクリック。" + +#: database_maintenance.php:314 +msgid "Can't create backup file." +msgstr "バックアップファイルを作れません。" + +#: database_maintenance.php:334 +msgid "Failed: " +msgstr "失敗: " + +#: database_maintenance.php:395 +msgid "Maintenance" +msgstr "メンテナンス" + +#: database_maintenance.php:399 +msgid "Database Maintenace" +msgstr "データベース・メンテナンス" + +#: database_maintenance.php:400 +msgid "Important Notice" +msgstr "重要なお知らせ" + +#: database_maintenance.php:402 +msgid "" +"When you installed WordPress 3.5.x with SQLite Integration and upgraded to " +"3.6, your database might not function as expected." +msgstr "" +"WordPress 3.5.x を SQLite Integrationを使ってインストールし、3.6 にアップグレードした場合、" +"データベースが意図したとおりに動作しないかもしれません。" + +#: database_maintenance.php:403 +msgid "" +"This page provide you the database sanity check utility and the restore " +"utility." +msgstr "" +"このページでは、データベースが正常かどうかをチェックするユーティリティと、回復ユーティリティを提供します。" + +#: database_maintenance.php:406 +msgid "" +"Click \"Sanity Check\" button first, and see if you need to fix database or " +"not. If needed, click \"Fix Database\" button. Afterward you may go to " +"Miscellaneous page and optimize database (this is not required)." +msgstr "" +"「正常チェック」ボタンを最初にクリックして、データベースが修復を必要とするかどうかを見てください。必要なら、" +"「修復」ボタンをクリックしてください。「いろいろ」ページに移動して、最適化をすることもできます(必須ではありません)。" + +#: database_maintenance.php:409 +msgid "" +"Fix Database procedure will create a database backup file each time the " +"button clicked. The backup file is named with \"maintenance-backup\", so you " +"can remove it if you don't need it. Please go to Miscellaneous page and " +"check if there is one." +msgstr "" +"データベースの修復は、ボタンがクリックされるたびにバックアップファイルを作成します。ファイル名には、" +"\"maintenance-backup\"とついていますので、必要なければ削除してかまいません。" +"「いろいろ」ページに移動して、バックアップファイルが作成されているかどうかご覧ください。" + +#: database_maintenance.php:412 +msgid "" +"If you installed WordPress 3.6 (not upgraded), you don't have to restore the " +"database." +msgstr "" +"アップグレードではなくて、WordPress 3.6 を最初からインストールした場合は、データベースの修復は" +"必要ありません。" + +#: database_maintenance.php:421 +msgid "Sanity Check" +msgstr "正常チェック" + +#: database_maintenance.php:421 +msgid "" +"Are you sure to check the database? This will take some time.\\n\\nClick " +"[Cancel] to stop, [OK] to continue." +msgstr "" +"データベースのチェックをします。この操作は少し時間がかかるかもしれません。\\n\\nやめるなら[キャンセル]を、" +"続けるなら[OK]をクリックしてください。" + +#: database_maintenance.php:422 +msgid "Fix database" +msgstr "修復" + +#: database_maintenance.php:422 +msgid "" +"Are you sure to do fix the database? This will take some time.\\n\\nClick " +"[Cancel] to stop, [OK] to continue." +msgstr "" +"データベースの修復をします。この操作は少し時間がかかるかもしれません。\\n\\nやめるなら[キャンセル]を、" +"続けるなら[OK]をクリックしてください。" + +#: database_maintenance.php:436 database_maintenance.php:446 +msgid "Results" +msgstr "結果" + +#: database_maintenance.php:447 +msgid "Your database restoration is successfully finished!" +msgstr "データベースの修復が成功しました。" + +#: database_maintenance.php:463 database_maintenance.php:474 +msgid "Checked Results" +msgstr "チェックの結果" + +#: database_maintenance.php:468 +msgid " needs restoring." +msgstr "修復が必要です。" + +#: database_maintenance.php:475 +msgid "Your database is OK. You don't have to restore it." +msgstr "あなたのデータベースは正常です。修復の必要はありません。" + +msgid "You can check your database and fix it if needed." +msgstr "データベースのチェックと修復をすることができます。" + +msgid "Table name is not selected." +msgstr "テーブル名が選択されていません。" + +msgid "There's no such table." +msgstr "テーブルが存在しません。" + +msgid "Columns Information" +msgstr "カラム情報" + +msgid "" +"Select a table name and click \"Display Columns\" button, and you'll see " +"the column property of that table. This information is for debug use." +msgstr "" +"テーブル名を選択して「カラムを表示」ボタンをクリックしてください。そのテーブルのカラム属性を表示します。" +"この情報はデバッグのために利用されます。" + +msgid "" +"Display columns in the selected table.\\n\\nClick [Cancel] to stop, [OK] to continue." +msgstr "" +"選択したテーブルのカラムを表示します。\\n\\nやめるなら、[キャンセル]を、続けるんら、[OK]をクリックしてください。" + +msgid "Columns In %s" +msgstr "%sのカラム" + +msgid "Columns Info" +msgstr "カラム情報" + +msgid "Table Name: " +msgstr "テーブル名" + +msgid "Column" +msgstr "カラム" + +msgid "Type" +msgstr "タイプ" + +msgid "Null" +msgstr "ヌル" + +msgid "Default" +msgstr "デフォルト" + +msgid "" +"Upgrading Notice: To finish upgrading, please activate SQLite Integration " +"and go Setting >> SQLite Integration >> Miscellaneous, and click the button "update" at" +" the bottom of the page. Or else replace wp-content/db.php with the one in sqlite-integration " +"directory manually." +msgstr "" +"注意: アップグレードを完了するには、SQLite Integration を有効化して、設定 >> SQLite Integration >> いろいろ " +"ページに移り、ページの最下段にある「更新」ボタンをクリックしてください。あるいは、wp-content/db.php を sqlite-integration " +"ディレクトリにある db.php で上書きしてください。" + +msgid "Update db.php" +msgstr "db.php のアップデート" + +msgid "Replace the old db.php with the new one." +msgstr "古い db.php を新しいファイルと入れ替えます。" + +msgid "Update" +msgstr "更新" + +msgid "Are you sure to update this file?\n\nClick [Cancel] to stop, [OK] to continue." +msgstr "このファイルを更新してもいいですか。\n\nやめるなら [Cancel] を、続けるなら [OK] をクリックしてください。" + +msgid "Your db.php is updated." +msgstr "db.php がアップデートされました。" + +msgid "Couldn"t update db.php file. Please replace it manually." +msgstr "db.php ファイルをアップデートできませんでした。手動で置き換えてください。" diff --git a/languages/sqlite-integration.pot b/languages/sqlite-integration.pot index c736014..3345b1c 100644 --- a/languages/sqlite-integration.pot +++ b/languages/sqlite-integration.pot @@ -8,789 +8,130 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-05-21 13:11+0900\n" +"POT-Creation-Date: 2014-02-06 01:39+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: db.php:46 -msgid "PHP version on this server is too old." +#: sqlite-integration.php:205 sqlite-integration.php:235 +msgid "SQLite Integration" msgstr "" -#: db.php:46 -#, php-format -msgid "" -"Your server is running PHP version %d but this version of WordPress requires " -"at least 5.2.4" -msgstr "" - -#: db.php:50 -msgid "PHP PDO Extension is not loaded." -msgstr "" - -#: db.php:50 -msgid "" -"Your PHP installation appears to be missing the PDO extension which is " -"required for this version of WordPress." -msgstr "" - -#: db.php:54 -msgid "PDO Driver for SQLite is missing." -msgstr "" - -#: db.php:54 -msgid "" -"Your PHP installtion appears not to have the right PDO drivers loaded. These " -"are required for this version of WordPress and the type of database you have " -"specified." -msgstr "" - -#: install.php:42 +#: install.php:47 msgid "" "Note that password carefully! It is a random password that was generated just for you." msgstr "" -#: install.php:47 +#: install.php:52 msgid "Your chosen password." msgstr "" -#: install.php:58 +#: install.php:63 msgid "The password you chose during the install." msgstr "" -#: pdodb.class.php:96 +#: pdodb.class.php:127 #, php-format msgid "WordPress database error %1$s for query %2$s made by %3$s" msgstr "" -#: pdodb.class.php:98 +#: pdodb.class.php:129 #, php-format msgid "WordPress database error %1$s for query %2$s" msgstr "" -#: pdodb.class.php:134 +#: pdodb.class.php:185 #, php-format msgid "" "

Error establlishing a database connection

We have been unable to " "connect to the specified database.
The error message received was %s" msgstr "" -#: pdoengine.class.php:80 pdoengine.class.php:96 schema.php:26 -msgid "Database connection error!
" -msgstr "" - -#: pdoengine.class.php:81 pdoengine.class.php:97 schema.php:27 schema.php:81 -msgid "Error message is: %s" -msgstr "" - -#: pdoengine.class.php:115 -msgid "" -"Unable to create the required directory! Please check your server settings." -msgstr "" - -#: pdoengine.class.php:120 pdoengine.class.php:126 -msgid "" -"Unable to create a file in the directory! Please check your server settings." -msgstr "" - -#: pdoengine.class.php:148 +#: pdoengine.class.php:291 #, php-format msgid "" "

Unknown query type

Sorry, we cannot determine the type of query " "that is requested.

The query is %s

" msgstr "" -#: pdoengine.class.php:294 -#, php-format -msgid "Problem preparing the PDO SQL Statement. Error was: %s" -msgstr "" - -#: pdoengine.class.php:327 -#, php-format -msgid "Error while executing query! Error message was: %s" -msgstr "" - -#: pdoengine.class.php:381 -msgid "The query is too big to parse properly" -msgstr "" - -#: pdoengine.class.php:583 -#, php-format -msgid "Problem in creating table or index. Error was: %s" -msgstr "" - -#: pdoengine.class.php:626 -#, php-format -msgid "Problem in executing alter query. Error was: %s" -msgstr "" - -#: schema.php:80 -#, php-format -msgid "" -"Error occured while creating tables or indexes...
Query was: %s
" -msgstr "" - -#: sqlite-integration.php:158 sqlite-integration.php:181 -msgid "SQLite DB" -msgstr "" - -#: utilities/documentation.php:17 utilities/documentation.php:19 -#: utilities/patch.php:157 utilities/patch.php:159 utilities/utility.php:382 -#: utilities/utility.php:384 utilities/utility.php:555 -#: utilities/utility.php:557 -msgid "You are not allowed to access this page!" -msgstr "" - -#: utilities/documentation.php:24 utilities/documentation.php:31 -#: utilities/patch.php:217 utilities/utility.php:354 utilities/utility.php:389 -#: utilities/utility.php:601 -msgid "Documentation" -msgstr "" - -#: utilities/documentation.php:25 utilities/patch.php:218 -#: utilities/utility.php:358 utilities/utility.php:390 -#: utilities/utility.php:602 -msgid "System Info" -msgstr "" - -#: utilities/documentation.php:26 utilities/patch.php:219 -#: utilities/utility.php:362 utilities/utility.php:391 -#: utilities/utility.php:603 -msgid "Miscellaneous" -msgstr "" - -#: utilities/documentation.php:27 utilities/patch.php:220 -#: utilities/utility.php:366 utilities/utility.php:392 -#: utilities/utility.php:604 -msgid "Patch Utility" -msgstr "" - -#: utilities/documentation.php:33 -msgid "" -"This is a brief documentation about this plugin. For more details, see also " -"the Plugin " -"Page." -msgstr "" - -#: utilities/documentation.php:36 -msgid "" -"Please don't forget: WordPress DOES NOT OFFICIALLY SUPPORT any database " -"other than MySQL. So if you ask about this plugin in the Codex, it's not " -"unlikely that you won't get no answers at all." -msgstr "" - -#: utilities/documentation.php:39 -msgid "Features" -msgstr "" - -#: utilities/documentation.php:41 -msgid "" -"This plugin is a successor to PDO for WordPress, which enabled WordPress to use " -"SQLite for its database. But PDO for WordPress doesn't seem to be maintained " -"any more only to be outdated. SQLite Integration makes use of the basic ideas " -"and framework of PDO for WordPress, adds some new features and updates it to " -"be able to work with the newest version of WordPress(3.5.1 and 3.6 beta)." -msgstr "" - -#: utilities/documentation.php:44 -msgid "" -"SQLite Web Page says — SQLite " -"is a "software library that implements selfcontained, serverless, zero-" -"configuration, transactional SQL database engine". It is "a good " -"choice for small to medium size websites". It's small and portable, and " -"you don't need any database server system." -msgstr "" - -#: utilities/documentation.php:47 -msgid "" -"Unfortunately enough, WordPress only supports MySQL. Consequently it doesn't " -"provide any APIs for SQLite. So if you want to create a website using " -"WordPress without a database server, you've got to write a kind of wrapper " -"program yourself to use SQLite. This is the way SQLite Integration goes." -msgstr "" - -#: utilities/documentation.php:50 -msgid "SQLite Integration does the work as follows:" -msgstr "" - -#: utilities/documentation.php:53 -msgid "Intercepts SQL statement for MySQL from WordPress" -msgstr "" - -#: utilities/documentation.php:54 -msgid "Rewrites it as SQLite can execute" -msgstr "" - -#: utilities/documentation.php:55 -msgid "Gives it to SQLite" -msgstr "" - -#: utilities/documentation.php:56 -msgid "Gets the results from SQLite" -msgstr "" - -#: utilities/documentation.php:57 -msgid "Format the results as MySQL returns, if necessary" -msgstr "" - -#: utilities/documentation.php:58 -msgid "Gives back the results to WordPress" -msgstr "" - -#: utilities/documentation.php:61 -msgid "" -"WordPress doesn't know what has happened in the background and will be happy " -"with it." -msgstr "" - -#: utilities/documentation.php:64 -msgid "Limitations" -msgstr "" - -#: utilities/documentation.php:66 -msgid "" -"SQLite Integration uses SQLite, so the limitations of SQLite is, as it is, " -"those of SQLite Integration. MySQL is far from a simple SQL engine and has " -"many extended features and functionalities. WordPress uses some of them. " -"Among those are some SQLite doesn't implement. For those features that " -"WordPress uses, I made them work with SQLite Integration. But for others that " -"some plugins are using, SQLite Integration can't manipulate. So..." -msgstr "" - -#: utilities/documentation.php:69 -msgid "There are some plugins that you can't use in any way.
" -msgstr "" - -#: utilities/documentation.php:70 -msgid "" -"Some plugins can't be activated or work properly. See the "Plugin " -"Compatibility/Incompatibility" section." -msgstr "" - -#: utilities/documentation.php:71 -msgid "" -"There are some plugins that you can't use without rewriting some codes in " -"them.
" -msgstr "" - -#: utilities/documentation.php:72 -#, php-format -msgid "" -"Some plugins do work fine if you rewrite MySQL functions. I made some patch " -"files and Patch Utility. See also the Plugin Page for " -"more details." -msgstr "" - -#: utilities/documentation.php:75 -msgid "" -"And there may be other problems I overlooked. If you find malfunctionality, " -"please let me know at the Support Forum." -msgstr "" - -#: utilities/documentation.php:77 -msgid "User Defined Functions" -msgstr "" - -#: utilities/documentation.php:79 -msgid "" -"SQLite Integration replaces some functions of MySQL with the user defined " -"functions built in PHP PDO library. But some of the functions are " -"meaningless in SQLite database: e.g. get_lock() or release_lock(). When " -"SQLite Integration meets those functions, it does nothing but prevent the " -"error." -msgstr "" - -#: utilities/documentation.php:82 -msgid "" -"If you want SQLite Integration to execute more functions, you can add the " -"definition in the file sqlite-integration/functions.php (functions-5-2.php is " -"for PHP 5.2 or lesser)." -msgstr "" - -#: utilities/documentation.php:85 -msgid "Database Administration and Maintenance" -msgstr "" - -#: utilities/documentation.php:87 -msgid "" -"SQLite Integration doesn't contain database maintenace functionality, because " -"there are some other free or proprietary softwares that give you such " -"functionalities. For example, these are among free softwares:" -msgstr "" - -#: utilities/documentation.php:90 -msgid "my recommendation" -msgstr "" - -#: utilities/documentation.php:91 -msgid "unfortunately seems not to maintained..." -msgstr "" - -#: utilities/documentation.php:94 -msgid "" -"I'm not sure if future release may have some of the database maintenance " -"functionality." -msgstr "" - -#: utilities/documentation.php:100 -msgid "Plugin Compatibility/Incompatibility" -msgstr "" - -#: utilities/documentation.php:102 -msgid "" -"WordPress without its plugins is a king without people. Of course, you need " -"plugins, I know." -msgstr "" - -#: utilities/documentation.php:105 -#, php-format -msgid "" -"Most of the plugins will work fine with this plugin. But there are some that " -"you need to rewrite some codes in them, and there are others that you can't " -"use with this plugin. This is the list of the problematic plugins (far from " -"complete). You can see informations about your installed plugins in the System Info page. To see more details, please " -"visit the Plugin Page." -msgstr "" - -#: utilities/documentation.php:111 -msgid "Plugins Name" -msgstr "" - -#: utilities/documentation.php:112 -msgid "Compatibility" -msgstr "" - -#: utilities/documentation.php:113 -msgid "Reasons" -msgstr "" - -#: utilities/documentation.php:127 utilities/utility.php:239 -#: utilities/utility.php:241 +#: utility.php:294 utility.php:296 documentation.php:134 msgid "Needs Patch" msgstr "" -#: utilities/documentation.php:129 utilities/utility.php:245 +#: utility.php:300 documentation.php:136 msgid "Probably No" msgstr "" -#: utilities/documentation.php:131 utilities/utility.php:251 -msgid "No" -msgstr "" - -#: utilities/documentation.php:141 -msgid "Caching Plugins" -msgstr "" - -#: utilities/documentation.php:143 -msgid "" -"Some plugins that give you cache functinality might cause problems. It is " -"because they try to create the db.php file in wp-content directory, which " -"file SQLite Integration is using." -msgstr "" - -#: utilities/documentation.php:146 -msgid "" -"If those plugins overwrite the db.php file, SQLite Integration doesn't work. " -"My recommendation is not to use caching plugins. " -"Even so, if you want a caching plugin, you could try WP Super Cache, which " -"doesn't use db.php file. But no warranty, try at your own risk." -msgstr "" - -#: utilities/documentation.php:149 -msgid "I have not tested none of those caching plugins." -msgstr "" - -#: utilities/documentation.php:151 -msgid "MySQL specific functions" -msgstr "" - -#: utilities/documentation.php:153 -msgid "" -"Some plugins don't use WordPress database functions such as dbDelta(), and " -"use PHP native MySQL functions when they create and manage tables in the " -"database. But PHP doesn't permit redefining of the native functions (at " -"least, under ordinary server setting). So SQLite Integration can't intercept " -"and rewrite those functions." -msgstr "" - -#: utilities/documentation.php:156 -msgid "For example, you can see these codes in Google XML Sitemaps." -msgstr "" - -#: utilities/documentation.php:162 -msgid "or in Camera Slideshow" -msgstr "" - -#: utilities/documentation.php:168 -msgid "" -"Such functions as mysql_get_server_info() or mysql_query() are from the " -"MySQL driver of PHP. Not only some plugins but WordPress uses them, but " -"SQLite Integration has no way to rewrite or redefine them. If the plugin you " -"want to use has those functions in it, it won't work or give the error " -"messages." -msgstr "" - -#: utilities/documentation.php:171 -msgid "" -"So, you have to rewrite them for SQLite Integration can execute. The two " -"example above can be rewritten like this:" -msgstr "" - -#: utilities/documentation.php:180 -msgid "" -"As for those functions in WordPress, I overrode the WordPress functions " -"themselves that contains such MySQL functions as mysql_query() or " -"mysql_real_escape_string()." -msgstr "" - -#: utilities/documentation.php:182 -msgid "FULLTEXT index" -msgstr "" - -#: utilities/documentation.php:184 -msgid "" -"Some plugins use FULLTEXT index of MySQL. Of course SQLite does have the " -"functionality named "full-text search". But it is not correlated " -"with that of MySQL. In fact it is not an "index" and requires " -"another new table for that. And it has a different syntax. So you can't use " -"the plugins which uses FULLTEXT index" -msgstr "" - -#: utilities/documentation.php:187 -msgid "" -"If your language is not written by separating words with spaces, e.g. " -"Japanese, Chinese or Thai, neither FULLTEXT index nor full-text search work " -"effectively. Even if your language is space-separating-words one, you don't " -"have to be disappointed. Whatever languages you use, you can use WordPress Related Posts or Related Posts or others. They are working fine " -"with SQLite Integration!" -msgstr "" - -#: utilities/patch.php:53 -msgid "Patch command is not found" -msgstr "" - -#: utilities/patch.php:56 -msgid "Patch command is not executable" -msgstr "" - -#: utilities/patch.php:73 -msgid "Patch file name is invalid" -msgstr "" - -#: utilities/patch.php:77 -msgid "Patch file version does not match with that of your plugin." -msgstr "" - -#: utilities/patch.php:86 -msgid "Error! Plugin directory is not accessible." -msgstr "" - -#: utilities/patch.php:89 -msgid "is patched successfully." -msgstr "" - -#: utilities/patch.php:94 utilities/patch.php:121 -#, php-format -msgid "Error! Messages: %s" -msgstr "" - -#: utilities/patch.php:118 -msgid "Error!: patches directory is not accessible." -msgstr "" - -#: utilities/patch.php:123 -#, php-format -msgid "File %s is deleted." -msgstr "" - -#: utilities/patch.php:138 -msgid "File is uploaded" -msgstr "" - -#: utilities/patch.php:142 -msgid "File is not uploaded" -msgstr "" - -#: utilities/patch.php:146 -msgid "File is not selected" -msgstr "" - -#: utilities/patch.php:164 utilities/patch.php:166 utilities/patch.php:186 -#: utilities/patch.php:188 utilities/patch.php:208 utilities/patch.php:210 -msgid "You are not allowed to do this operation!" -msgstr "" - -#: utilities/patch.php:170 utilities/patch.php:192 -msgid "Please select patch file(s)" -msgstr "" - -#: utilities/patch.php:179 -msgid "None of the patches is applied!" -msgstr "" - -#: utilities/patch.php:201 -msgid "Error! Please remove files manually" -msgstr "" - -#: utilities/patch.php:224 -msgid "Patch Files Upload and Apply" -msgstr "" - -#: utilities/patch.php:225 -msgid "What you can do in this page" -msgstr "" - -#: utilities/patch.php:227 -msgid "" -"I made patch files for some plugins that are incompatible with SQLite " -"Integration and need rewriting. And I wrote in the Plugin Page about how to apply a " -"patch file to the plugin. But the command line interface sometimes " -"embarrasses some people, especially newbies." -msgstr "" - -#: utilities/patch.php:230 -msgid "" -"In this page, you can upload patch files and apply them automatically. But " -"there are some requirements." -msgstr "" - -#: utilities/patch.php:233 -msgid "" -"Think before you leap. Is the plugin to which you are going to apply patch " -"really necessary for your site? Did you search in the Plugin Directory for the substitutes?" -msgstr "" - -#: utilities/patch.php:234 -msgid "" -"Your PHP script has the permission to create a directory and write a file in " -"it." -msgstr "" - -#: utilities/patch.php:235 -msgid "Your PHP scripts can execute exec() function on the server." -msgstr "" - -#: utilities/patch.php:236 -msgid "" -"Your PHP script can execute "patch" shell command.(Script will " -"check if it is executable or not.)" -msgstr "" - -#: utilities/patch.php:239 -msgid "" -"If uploading fails, it' very likely that application will fail. When you try " -"uploading with FTP client, the patch files must be put into the directory wp-" -"content/uploads/patches/." -msgstr "" - -#: utilities/patch.php:242 -msgid "" -"You can create your patch file yourself. When you create one, please test it " -"on your local server first and check if it works fine without PHP error or " -"notice ( set error_reporting(E_ALL) ). If you use this utility, name your " -"patch file as follows:" -msgstr "" - -#: utilities/patch.php:245 -msgid "Use the file name beginning with the plugin directory name." -msgstr "" - -#: utilities/patch.php:246 -msgid "Use the plugin version number after the directory name with underscore." -msgstr "" - -#: utilities/patch.php:247 -msgid "Use the suffix .patch." -msgstr "" - -#: utilities/patch.php:248 -msgid "Use diff command options "-Naur"." -msgstr "" - -#: utilities/patch.php:251 -msgid "" -"For example, the patch file for the plugin "Debug Bar" is "" -"debug-bar_0.8.patch". Script interprets "debug-bar" as the " -"target directory and "0.8" as the target version. If the version " -"number doesn't match with the target, script shows the error message and " -"skip applying the patch file. And script will reject any other file name." -msgstr "" - -#: utilities/patch.php:254 -msgid "How to install, patch and activate plugins" -msgstr "" - -#: utilities/patch.php:256 -msgid "Install the plugin (not yet activate it)" -msgstr "" - -#: utilities/patch.php:257 -msgid "Upload the patch file (if any) to the server and ppply it in this page" -msgstr "" - -#: utilities/patch.php:258 -msgid "Back to the installed plugin page and activate it" -msgstr "" - -#: utilities/patch.php:260 -msgid "How to upgrade plugins" -msgstr "" - -#: utilities/patch.php:262 -msgid "When upgrading the plugin, it will be safer to follow next steps." -msgstr "" - -#: utilities/patch.php:265 -msgid "Deactivate the plugin" -msgstr "" - -#: utilities/patch.php:266 -msgid "Upgrade the plugin" -msgstr "" - -#: utilities/patch.php:267 -msgid "Upload the patch file (if any) and apply it" -msgstr "" - -#: utilities/patch.php:268 -msgid "Reactivate the plugin" -msgstr "" - -#: utilities/patch.php:270 -msgid "" -"If there isn't a patch file to match with the newest version of the plugin, " -"it won't work properly. Please wait for somebody to make one or rewrite the " -"codes checking the patch file for the previous version (it's not so " -"difficult a matter, I guess, for almost all the cases, you'll have only to " -"replace the MySQL functions with the WordPress built-in functions)." -msgstr "" - -#: utilities/patch.php:271 -msgid "Upload and Apply" -msgstr "" - -#: utilities/patch.php:275 -msgid "File Select" -msgstr "" - -#: utilities/patch.php:282 -msgid "" -"Select file from your computer. If the file name is the same as existent " -"file, this operation will override it." -msgstr "" - -#: utilities/patch.php:284 -msgid "Upload" -msgstr "" - -#: utilities/patch.php:289 -msgid "Patch files uploaded" -msgstr "" - -#: utilities/patch.php:296 -msgid "" -"Select the file(s) you want to apply to the plugin(s) or you want to delete. " -"You can select multiple files." -msgstr "" - -#: utilities/patch.php:300 -msgid "Apply/Hold" -msgstr "" - -#: utilities/patch.php:301 -msgid "Patch files to apply" -msgstr "" - -#: utilities/patch.php:317 -msgid "Apply patch" -msgstr "" - -#: utilities/patch.php:317 -msgid "" -"Are you sure to apply patch files?\\n\\nClick [Cancel] to stop,[OK] to " -"continue." -msgstr "" - -#: utilities/patch.php:318 -msgid "Delete file" -msgstr "" - -#: utilities/patch.php:318 -msgid "" -"Are you sure to delete patch files?\\n\\nClick [Cancel] to stop,[OK] to " -"continue." -msgstr "" - -#: utilities/patch.php:329 -msgid "Caution about your patch file(s)" -msgstr "" - -#: utilities/patch.php:333 -msgid "" -"If you don't know where it comes from or who created it, I strongly " -"recommend that you should see and check the contents of the file. If a " -"person who created it secretly inserted a malicious codes, it will be " -"executed by the plugin and may damage your site or your server, for which " -"damage I incur any liability. If you don't understand well, you'd better use " -"the substitute plugins. Take your own risk, please." -msgstr "" - -#: utilities/utility.php:248 +#: utility.php:303 msgid "Probably Yes" msgstr "" -#: utilities/utility.php:254 +#: utility.php:306 documentation.php:138 +msgid "No" +msgstr "" + +#: utility.php:310 +msgid "Checked*" +msgstr "" + +#: utility.php:312 msgid "Checked" msgstr "" -#: utilities/utility.php:257 utilities/utility.php:263 +#: utility.php:316 utility.php:322 msgid "Not Checked" msgstr "" -#: utilities/utility.php:268 +#: utility.php:327 msgid "Sitewide Active" msgstr "" -#: utilities/utility.php:271 +#: utility.php:330 msgid "Active" msgstr "" -#: utilities/utility.php:274 +#: utility.php:333 msgid "Inactive" msgstr "" -#: utilities/utility.php:336 +#: utility.php:434 utility.php:444 +msgid " was created." +msgstr "" + +#: utility.php:436 utility.php:446 +msgid " was not created." +msgstr "" + +#: utility.php:472 +#, php-format +msgid "File %s was deleted." +msgstr "" + +#: utility.php:474 +msgid "Error! File was not deleted." +msgstr "" + +#: utility.php:534 msgid "Welcome to SQLite Integration" msgstr "" -#: utilities/utility.php:338 +#: utility.php:536 msgid "Thank you for using SQLite Integration plugin!" msgstr "" -#: utilities/utility.php:341 +#: utility.php:539 msgid "" "You read this message, which means you have succeeded in installing " -"WordPress with this plugin SQLite Integration. Congratulations and enjoy your " -"Blogging!" +"WordPress with this plugin SQLite Integration. Congratulations and enjoy " +"your Blogging!" msgstr "" -#: utilities/utility.php:344 +#: utility.php:542 msgid "" "You don't have to set any special settings. In fact there are no other " "settings. You can write articles or pages and customize you WordPress in an " @@ -799,125 +140,161 @@ msgid "" "about this plugin and your SQLite database below." msgstr "" -#: utilities/utility.php:346 +#: utility.php:544 msgid "" "Deactivation makes this documents and utilities disappear from the " -"dashboard, but it doesn't affect the functionality of the SQLite Integration. " -"when uninstalled, it will remove wp-content/uploads/patches directory (if " -"exists) and wp-content/db.php file altogether." +"dashboard, but it doesn't affect the functionality of the SQLite " +"Integration. when uninstalled, it will remove wp-content/uploads/patches " +"directory (if exists) and wp-content/db.php file altogether." msgstr "" -#: utilities/utility.php:349 +#: utility.php:547 msgid "Title" msgstr "" -#: utilities/utility.php:350 +#: utility.php:548 msgid "Contents" msgstr "" -#: utilities/utility.php:355 +#: utility.php:552 utility.php:590 utility.php:867 +#: database_maintenance.php:453 documentation.php:30 documentation.php:38 +#: patch.php:296 +msgid "Documentation" +msgstr "" + +#: utility.php:553 msgid "You can read documentation about this plugin and plugin compatibility." msgstr "" -#: utilities/utility.php:359 +#: utility.php:556 utility.php:591 utility.php:868 +#: database_maintenance.php:454 documentation.php:31 patch.php:297 +msgid "System Info" +msgstr "" + +#: utility.php:557 msgid "You can see database and system information." msgstr "" -#: utilities/utility.php:363 +#: utility.php:560 utility.php:592 utility.php:869 +#: database_maintenance.php:455 documentation.php:32 patch.php:298 +msgid "Miscellaneous" +msgstr "" + +#: utility.php:561 msgid "" "You can see the error log and edit db.php file (if necessary) and optimize " "your database." msgstr "" -#: utilities/utility.php:367 +#: utility.php:564 utility.php:593 utility.php:870 +#: database_maintenance.php:456 documentation.php:33 patch.php:299 +msgid "Patch Utility" +msgstr "" + +#: utility.php:565 msgid "You can upload patch files and apply them to the incompatible plugins." msgstr "" -#: utilities/utility.php:396 +#: utility.php:568 utility.php:594 utility.php:871 +#: database_maintenance.php:457 documentation.php:34 patch.php:300 +msgid "Maintenance" +msgstr "" + +#: utility.php:569 +msgid "You can check your database and fix it if needed." +msgstr "" + +#: utility.php:583 utility.php:585 utility.php:774 utility.php:776 +#: database_maintenance.php:446 database_maintenance.php:448 +#: documentation.php:23 documentation.php:25 patch.php:236 patch.php:238 +msgid "You are not allowed to access this page!" +msgstr "" + +#: utility.php:598 msgid "System Information" msgstr "" -#: utilities/utility.php:397 +#: utility.php:599 msgid "PHP Informations" msgstr "" -#: utilities/utility.php:402 utilities/utility.php:438 +#: utility.php:604 utility.php:640 msgid "Items" msgstr "" -#: utilities/utility.php:403 +#: utility.php:605 msgid "Description" msgstr "" -#: utilities/utility.php:408 +#: utility.php:610 msgid "WordPress Version" msgstr "" -#: utilities/utility.php:412 +#: utility.php:614 msgid "PHP Version" msgstr "" -#: utilities/utility.php:416 +#: utility.php:618 msgid "PDO Support" msgstr "" -#: utilities/utility.php:420 +#: utility.php:622 msgid "PDO Drivers" msgstr "" -#: utilities/utility.php:424 +#: utility.php:626 msgid "PDO Driver for SQLite 3.x" msgstr "" -#: utilities/utility.php:428 +#: utility.php:630 msgid "SQLite Library Version" msgstr "" -#: utilities/utility.php:434 +#: utility.php:636 msgid "Your Database Status" msgstr "" -#: utilities/utility.php:439 +#: utility.php:641 msgid "Status" msgstr "" -#: utilities/utility.php:445 +#: utility.php:647 msgid "Database Size" msgstr "" -#: utilities/utility.php:449 +#: utility.php:651 msgid "Page Size" msgstr "" -#: utilities/utility.php:453 +#: utility.php:655 msgid "Total Number of Pages" msgstr "" -#: utilities/utility.php:457 +#: utility.php:659 msgid "Unused Page" msgstr "" -#: utilities/utility.php:461 +#: utility.php:663 msgid "Integrity Check" msgstr "" -#: utilities/utility.php:465 +#: utility.php:667 msgid "Encoding" msgstr "" -#: utilities/utility.php:469 +#: utility.php:671 msgid "Collations" msgstr "" -#: utilities/utility.php:481 +#: utility.php:683 msgid "Compile Options" msgstr "" -#: utilities/utility.php:495 +#: utility.php:697 msgid "Database Tables and Indexes" msgstr "" -#: utilities/utility.php:497 +#: utility.php:699 msgid "" "Table names in brown are required by WordPress, and those in blue are " "created by some plugins. The table sqlite_sequence is not a WordPress table " @@ -927,117 +304,206 @@ msgid "" "g. SQLiteManager)." msgstr "" -#: utilities/utility.php:502 +#: utility.php:704 msgid "Table Name" msgstr "" -#: utilities/utility.php:503 +#: utility.php:705 msgid "System/User" msgstr "" -#: utilities/utility.php:504 +#: utility.php:706 msgid "Index ( Column )" msgstr "" -#: utilities/utility.php:529 +#: utility.php:744 msgid "Plugin Info" msgstr "" -#: utilities/utility.php:531 +#: utility.php:746 msgid "This table shows plugins you have installed and their compatibility." msgstr "" -#: utilities/utility.php:536 +#: utility.php:751 msgid "Installed Plugins" msgstr "" -#: utilities/utility.php:537 +#: utility.php:752 msgid "Active/Inactive" msgstr "" -#: utilities/utility.php:538 +#: utility.php:753 msgid "Compatible" msgstr "" -#: utilities/utility.php:562 +#: utility.php:761 +msgid "" +"\"Checked*\" with an asterisk is from the users' information. I didn't check " +"myself yet. If you found any malfunctioning, please let me know." +msgstr "" + +#: utility.php:781 msgid "Log cleared" msgstr "" -#: utilities/utility.php:565 +#: utility.php:784 msgid "Log not cleared" msgstr "" -#: utilities/utility.php:577 +#: utility.php:796 msgid "db.php was saved" msgstr "" -#: utilities/utility.php:580 +#: utility.php:799 msgid "Error! db.php couldn't be saved" msgstr "" -#: utilities/utility.php:591 +#: utility.php:810 #, php-format msgid "" "Optimization finished. Before optimization: %1$s, After optimization: %2$s." msgstr "" -#: utilities/utility.php:594 +#: utility.php:813 msgid "Optimization failed" msgstr "" -#: utilities/utility.php:608 +#: utility.php:821 +msgid "Couldn't find your database file." +msgstr "" + +#: utility.php:833 +msgid "Please select backup file(s)." +msgstr "" + +#: utility.php:842 +msgid "Error! Please remove file(s) manyally." +msgstr "" + +#: utility.php:853 +msgid "Please select backup file." +msgstr "" + +#: utility.php:856 +msgid "Please select one file at a time." +msgstr "" + +#: utility.php:875 msgid "Database Optimization, Error Log, Init File" msgstr "" -#: utilities/utility.php:609 +#: utility.php:876 msgid "Optimize You Database" msgstr "" -#: utilities/utility.php:611 +#: utility.php:878 msgid "" "This button sends "vacuum" command to your SQLite database. That " "command reclaims space after data has been deleted." msgstr "" -#: utilities/utility.php:619 +#: utility.php:886 msgid "Optimize" msgstr "" -#: utilities/utility.php:619 +#: utility.php:886 msgid "" "Are you sure to optimize your database?\\n\\nClick [Cancel] to stop, [OK] to " "continue." msgstr "" -#: utilities/utility.php:622 +#: utility.php:889 +msgid "Create or Delete backup file(s)" +msgstr "" + +#: utility.php:891 +msgid "" +"Click the backup button below if you want to create a current snapshot of " +"your database file. The backup file is named ‘DB_FILE_NAME.yyyymmdd." +"zip’ if PHP zip extension is loaded or ‘DB_FILE_NAME.yyyymmdd." +"back’ if not loaded, and is put in the same directory that the " +"database is in." +msgstr "" + +#: utility.php:894 +msgid "" +"If you want to delete the file(s), check the file name and click the Delete " +"button. You can check multiple files." +msgstr "" + +#: utility.php:897 +msgid "" +"If you want to download a file, check the file name and click the Download " +"button. Please check one file at a time." +msgstr "" + +#: utility.php:908 +msgid "Delete/Download" +msgstr "" + +#: utility.php:909 +msgid "Backup Files" +msgstr "" + +#: utility.php:924 +msgid "Backup" +msgstr "" + +#: utility.php:924 +msgid "" +"Are you sure to make a backup file?\\n\\nClick [Cancel] to stop, [OK] to " +"continue." +msgstr "" + +#: utility.php:925 patch.php:399 +msgid "Delete file" +msgstr "" + +#: utility.php:925 +msgid "" +"Are you sure to delete backup file(s)?\\n\\nClick [Cancel] to stop, [OK] to " +"continue." +msgstr "" + +#: utility.php:926 +msgid "Download" +msgstr "" + +#: utility.php:926 +msgid "" +"Are you sure to download backup file?\\n\\nClick [Cancel] to stop, [OK] to " +"continue." +msgstr "" + +#: utility.php:929 msgid "SQLite Integration Error Log" msgstr "" -#: utilities/utility.php:624 +#: utility.php:931 msgid "" -"This is the contents of SQLite Integration error log file(default: wp-content/" -"database/debug.txt). If you want to clear this file, click the Clear Log " -"button." +"This is the contents of SQLite Integration error log file(default: wp-" +"content/database/debug.txt). If you want to clear this file, click the Clear " +"Log button." msgstr "" -#: utilities/utility.php:634 +#: utility.php:941 msgid "No error messages are found" msgstr "" -#: utilities/utility.php:642 +#: utility.php:949 msgid "Clear Log" msgstr "" -#: utilities/utility.php:642 +#: utility.php:949 msgid "" "Are you sure to clear Log?\\n\\nClick [Cancel] to stop, [OK] to continue." msgstr "" -#: utilities/utility.php:646 +#: utility.php:953 msgid "Edit Initial File (wp-content/db.php)" msgstr "" -#: utilities/utility.php:648 +#: utility.php:955 msgid "" "When you go "Plugins » Edit Plugin" page, you can edit " "plugin source file. But you can't see this file there because it is not in " @@ -1046,12 +512,672 @@ msgid "" "well, please don't edit this file." msgstr "" -#: utilities/utility.php:658 +#: utility.php:965 msgid "Save" msgstr "" -#: utilities/utility.php:658 +#: utility.php:965 msgid "" "Are you sure to save this file?\\n\\nClick [Cancel] to stop, [OK] to " "continue." msgstr "" + +#: database_maintenance.php:344 +msgid "Can't create backup file." +msgstr "" + +#: database_maintenance.php:363 +msgid "Failed: " +msgstr "" + +#: database_maintenance.php:368 database_maintenance.php:561 +msgid "Your database is OK. You don't have to restore it." +msgstr "" + +#: database_maintenance.php:372 +msgid "Your database restoration is successfully finished!" +msgstr "" + +#: database_maintenance.php:391 +msgid "Table name is not selected." +msgstr "" + +#: database_maintenance.php:394 +msgid "There's no such table." +msgstr "" + +#: database_maintenance.php:461 +msgid "Database Maintenace" +msgstr "" + +#: database_maintenance.php:462 +msgid "Important Notice" +msgstr "" + +#: database_maintenance.php:464 +msgid "" +"When you installed WordPress 3.5.x with SQLite Integration and upgraded to " +"3.6, your database might not function as expected." +msgstr "" + +#: database_maintenance.php:465 +msgid "" +"This page provide you the database sanity check utility and the restore " +"utility." +msgstr "" + +#: database_maintenance.php:468 +msgid "" +"Click \"Sanity Check\" button first, and see if you need to fix database or " +"not. If needed, click \"Fix Database\" button. Afterward you may go to " +"Miscellaneous page and optimize database (this is not required)." +msgstr "" + +#: database_maintenance.php:471 +msgid "" +"Fix Database procedure will create a database backup file each time the " +"button clicked. The backup file is named with \"maintenance-backup\", so you " +"can remove it if you don't need it. Please go to Miscellaneous page and " +"check if there is one." +msgstr "" + +#: database_maintenance.php:474 +msgid "" +"If you installed WordPress 3.6 (not upgraded), you don't have to restore the " +"database." +msgstr "" + +#: database_maintenance.php:483 +msgid "Sanity Check" +msgstr "" + +#: database_maintenance.php:483 +msgid "" +"Are you sure to check the database? This will take some time.\\n\\nClick " +"[Cancel] to stop, [OK] to continue." +msgstr "" + +#: database_maintenance.php:484 +msgid "Fix database" +msgstr "" + +#: database_maintenance.php:484 +msgid "" +"Are you sure to do fix the database? This will take some time.\\n\\nClick " +"[Cancel] to stop, [OK] to continue." +msgstr "" + +#: database_maintenance.php:488 +msgid "Columns Information" +msgstr "" + +#: database_maintenance.php:490 +msgid "" +"Select a table name and click \"Display Columns\" button, and you'll see the " +"column property of that table. This information is for debug use." +msgstr "" + +#: database_maintenance.php:501 +msgid "Table Name: " +msgstr "" + +#: database_maintenance.php:507 +msgid "Display Columns" +msgstr "" + +#: database_maintenance.php:507 +msgid "" +"Display columns in the selected table.\\n\\nClick [Cancel] to stop, [OK] to " +"continue." +msgstr "" + +#: database_maintenance.php:517 database_maintenance.php:519 +#: database_maintenance.php:543 database_maintenance.php:545 +#: database_maintenance.php:571 database_maintenance.php:573 patch.php:243 +#: patch.php:245 patch.php:265 patch.php:267 patch.php:287 patch.php:289 +msgid "You are not allowed to do this operation!" +msgstr "" + +#: database_maintenance.php:523 database_maintenance.php:533 +msgid "Results" +msgstr "" + +#: database_maintenance.php:549 database_maintenance.php:560 +msgid "Checked Results" +msgstr "" + +#: database_maintenance.php:554 +msgid " needs restoring." +msgstr "" + +#: database_maintenance.php:577 +#, php-format +msgid "Columns In %s" +msgstr "" + +#: database_maintenance.php:578 +msgid "Column" +msgstr "" + +#: database_maintenance.php:579 +msgid "Type" +msgstr "" + +#: database_maintenance.php:580 +msgid "Null" +msgstr "" + +#: database_maintenance.php:581 +msgid "Default" +msgstr "" + +#: database_maintenance.php:598 +msgid "Columns Info" +msgstr "" + +#: documentation.php:40 +msgid "" +"This is a brief documentation about this plugin. For more details, see also " +"the SQLite " +"Integration page." +msgstr "" + +#: documentation.php:43 +msgid "" +"Please don't forget: WordPress DOES NOT OFFICIALLY SUPPORT any database " +"other than MySQL. So if you ask about this plugin in the Forum, it's not " +"unlikely that you won't get no answers at all." +msgstr "" + +#: documentation.php:46 +msgid "Features" +msgstr "" + +#: documentation.php:48 +msgid "" +"This plugin is a successor to PDO for WordPress, which enabled WordPress to use " +"SQLite for its database. But PDO for WordPress doesn't seem to be maintained " +"any more only to be outdated. SQLite Integration makes use of the basic " +"ideas and framework of PDO for WordPress, adds some new features and updates " +"it to be able to work with the newest version of WordPress(3.8.1)." +msgstr "" + +#: documentation.php:51 +msgid "" +"SQLite Web Page says — SQLite " +"is a "software library that implements selfcontained, serverless, zero-" +"configuration, transactional SQL database engine". It is "a good " +"choice for small to medium size websites". It's small and portable, and " +"you don't need any database server system." +msgstr "" + +#: documentation.php:54 +msgid "" +"Unfortunately enough, WordPress only supports MySQL. Consequently it doesn't " +"provide any APIs for SQLite. So if you want to create a website using " +"WordPress without a database server, you've got to write a kind of wrapper " +"program yourself to use SQLite. This is the way SQLite Integration goes." +msgstr "" + +#: documentation.php:57 +msgid "SQLite Integration does the work as follows:" +msgstr "" + +#: documentation.php:60 +msgid "Intercepts SQL statement for MySQL from WordPress" +msgstr "" + +#: documentation.php:61 +msgid "Rewrites it as SQLite can execute" +msgstr "" + +#: documentation.php:62 +msgid "Gives it to SQLite" +msgstr "" + +#: documentation.php:63 +msgid "Gets the results from SQLite" +msgstr "" + +#: documentation.php:64 +msgid "Format the results as MySQL returns, if necessary" +msgstr "" + +#: documentation.php:65 +msgid "Gives back the results to WordPress" +msgstr "" + +#: documentation.php:68 +msgid "" +"WordPress doesn't know what has happened in the background and will be happy " +"with it." +msgstr "" + +#: documentation.php:71 +msgid "Limitations" +msgstr "" + +#: documentation.php:73 +msgid "" +"SQLite Integration uses SQLite, so the limitations of SQLite is, as it is, " +"those of SQLite Integration. MySQL is far from a simple SQL engine and has " +"many extended features and functionalities. WordPress uses some of them. " +"Among those are some SQLite doesn't implement. For those features that " +"WordPress uses, I made them work with SQLite Integration. But for others " +"that some plugins are using, SQLite Integration can't manipulate. So..." +msgstr "" + +#: documentation.php:76 +msgid "There are some plugins that you can't use. No way around.
" +msgstr "" + +#: documentation.php:77 +msgid "" +"Some plugins can't be activated or work properly. See the "Plugin " +"Compatibility/Incompatibility" section." +msgstr "" + +#: documentation.php:78 +msgid "" +"There are some plugins that you can't use without rewriting some codes in " +"them.
" +msgstr "" + +#: documentation.php:79 +#, php-format +msgid "" +"Some plugins do work fine if you rewrite MySQL functions. I made some patch " +"files and Patch Utility. See also the SQLite " +"Integration Page for more details." +msgstr "" + +#: documentation.php:82 +msgid "" +"And there may be other problems I overlooked. If you find malfunctionality, " +"please let me know at the Support Forum." +msgstr "" + +#: documentation.php:84 +msgid "User Defined Functions" +msgstr "" + +#: documentation.php:86 +msgid "" +"SQLite Integration replaces some functions of MySQL with the user defined " +"functions built in PHP PDO library. But some of the functions are " +"meaningless in SQLite database: e.g. get_lock() or release_lock(). When " +"SQLite Integration meets those functions, it does nothing but prevent the " +"error." +msgstr "" + +#: documentation.php:89 +msgid "" +"If you want SQLite Integration to execute more functions, you can add the " +"definition in the file sqlite-integration/functions.php (functions-5-2.php " +"is for PHP 5.2 or lesser)." +msgstr "" + +#: documentation.php:92 +msgid "Database Administration and Maintenance" +msgstr "" + +#: documentation.php:94 +msgid "" +"SQLite Integration doesn't contain database maintenace functionality, " +"because there are some other free or proprietary softwares that give you " +"such functionalities. For example, these are among free softwares:" +msgstr "" + +#: documentation.php:97 +msgid "my recommendation" +msgstr "" + +#: documentation.php:98 +msgid "unfortunately seems not to maintained..." +msgstr "" + +#: documentation.php:101 +msgid "" +"I'm not sure if future release may have some of the database maintenance " +"functionality." +msgstr "" + +#: documentation.php:107 +msgid "Plugin Compatibility/Incompatibility" +msgstr "" + +#: documentation.php:109 +msgid "" +"WordPress without its plugins is a king without people. Of course, you need " +"plugins, I know." +msgstr "" + +#: documentation.php:112 +#, php-format +msgid "" +"This is the list of the problematic plugins (far from complete). You can see " +"informations about your installed plugins in the System Info page. To see more details, please visit the Plugin Page." +msgstr "" + +#: documentation.php:118 +msgid "Plugins Name" +msgstr "" + +#: documentation.php:119 +msgid "Compatibility" +msgstr "" + +#: documentation.php:120 +msgid "Reasons" +msgstr "" + +#: patch.php:67 +msgid "Patch command is not found" +msgstr "" + +#: patch.php:70 +msgid "Patch command is not executable" +msgstr "" + +#: patch.php:87 +msgid "Patch file name is invalid" +msgstr "" + +#: patch.php:91 +msgid "Patch file version does not match with that of your plugin." +msgstr "" + +#: patch.php:100 +msgid "Error! Plugin directory is not accessible." +msgstr "" + +#: patch.php:103 +msgid "is patched successfully." +msgstr "" + +#: patch.php:108 +#, php-format +msgid "Error! Messages: %s" +msgstr "" + +#: patch.php:136 +#, php-format +msgid "File %s is deleted." +msgstr "" + +#: patch.php:138 +#, php-format +msgid "Error! File %s is not deleted." +msgstr "" + +#: patch.php:142 +msgid "Error!: patches directory is not accessible." +msgstr "" + +#: patch.php:163 +msgid "Unable to create a patch directory." +msgstr "" + +#: patch.php:171 +msgid "Unable to create a .htaccess file." +msgstr "" + +#: patch.php:179 +msgid "Invalid operation." +msgstr "" + +#: patch.php:185 +msgid "File is too large to upload." +msgstr "" + +#: patch.php:189 +msgid "File upload is not complete." +msgstr "" + +#: patch.php:193 +msgid "File is not uploaded." +msgstr "" + +#: patch.php:197 +msgid "Temporary directory is not writable." +msgstr "" + +#: patch.php:201 +msgid "File cannot be written on the disk." +msgstr "" + +#: patch.php:205 +msgid "Unknown error." +msgstr "" + +#: patch.php:213 +msgid "File is successfully uploaded." +msgstr "" + +#: patch.php:217 +msgid "File upload failed. Possible file upload attack." +msgstr "" + +#: patch.php:222 +msgid "File is not selected" +msgstr "" + +#: patch.php:249 patch.php:271 +msgid "Please select patch file(s)" +msgstr "" + +#: patch.php:258 +msgid "None of the patches is applied!" +msgstr "" + +#: patch.php:280 +msgid "Error! Please remove files manually" +msgstr "" + +#: patch.php:304 +msgid "Patch Files Upload and Apply" +msgstr "" + +#: patch.php:305 +msgid "What you can do in this page" +msgstr "" + +#: patch.php:307 +msgid "" +"I made patch files for some plugins that are incompatible with SQLite " +"Integration and need rewriting. And I wrote in the Plugin Page about how to apply a " +"patch file to the plugin. But the command line interface sometimes " +"embarrasses some people, especially newbies." +msgstr "" + +#: patch.php:310 +msgid "" +"In this page, you can upload patch files and apply them automatically. But " +"there are some requirements." +msgstr "" + +#: patch.php:313 +msgid "" +"Think before you leap. Is the plugin to which you are going to apply patch " +"really necessary for your site? Did you search in the Plugin Directory for the substitutes?" +msgstr "" + +#: patch.php:314 +msgid "" +"Your PHP script has the permission to create a directory and write a file in " +"it." +msgstr "" + +#: patch.php:315 +msgid "Your PHP scripts can execute exec() function on the server." +msgstr "" + +#: patch.php:316 +msgid "" +"Your PHP script can execute "patch" shell command.(Script will " +"check if it is executable or not.)" +msgstr "" + +#: patch.php:319 +msgid "" +"If uploading fails, it' very likely that application will fail. When you try " +"uploading with FTP client, the patch files must be put into the directory wp-" +"content/uploads/patches/. When constant UPLOADS is defined, script follows " +"it." +msgstr "" + +#: patch.php:322 +msgid "" +"You can create your patch file yourself. When you create one, please test it " +"on your local server first and check if it works fine without PHP error or " +"notice ( set error_reporting(E_ALL) ). If you use this utility, name your " +"patch file as follows:" +msgstr "" + +#: patch.php:325 +msgid "Use the file name beginning with the plugin directory name." +msgstr "" + +#: patch.php:326 +msgid "Use the plugin version number after the directory name with underscore." +msgstr "" + +#: patch.php:327 +msgid "Use the suffix .patch." +msgstr "" + +#: patch.php:328 +msgid "Use diff command options "-Naur"." +msgstr "" + +#: patch.php:331 +msgid "" +"For example, the patch file for the plugin "Debug Bar" is "" +"debug-bar_0.8.patch". Script interprets "debug-bar" as the " +"target directory and "0.8" as the target version. If the version " +"number doesn't match with the target, script shows the error message and " +"skip applying the patch file. And script will reject any other file name." +msgstr "" + +#: patch.php:334 +msgid "How to install, patch and activate plugins" +msgstr "" + +#: patch.php:336 +msgid "Install the plugin (not yet activate it)" +msgstr "" + +#: patch.php:337 +msgid "Upload the patch file (if any) to the server and ppply it in this page" +msgstr "" + +#: patch.php:338 +msgid "Back to the installed plugin page and activate it" +msgstr "" + +#: patch.php:340 +msgid "How to upgrade plugins" +msgstr "" + +#: patch.php:342 +msgid "When upgrading the plugin, it will be safer to follow next steps." +msgstr "" + +#: patch.php:345 +msgid "Deactivate the plugin" +msgstr "" + +#: patch.php:346 +msgid "Upgrade the plugin" +msgstr "" + +#: patch.php:347 +msgid "Upload the patch file (if any) and apply it" +msgstr "" + +#: patch.php:348 +msgid "Reactivate the plugin" +msgstr "" + +#: patch.php:350 +msgid "" +"If there isn't a patch file to match with the newest version of the plugin, " +"it won't work properly. Please wait for somebody to make one or rewrite the " +"codes checking the patch file for the previous version (it's not so " +"difficult a matter, I guess, for almost all the cases, you'll have only to " +"replace the MySQL functions with the WordPress built-in functions)." +msgstr "" + +#: patch.php:351 +msgid "Upload and Apply" +msgstr "" + +#: patch.php:355 +msgid "File Select" +msgstr "" + +#: patch.php:363 +msgid "" +"Select file from your computer. If the file name is the same as existent " +"file, this operation will override it. You can't upload the file whose size " +"is over 500kB." +msgstr "" + +#: patch.php:365 +msgid "Upload" +msgstr "" + +#: patch.php:370 +msgid "Patch files uploaded" +msgstr "" + +#: patch.php:377 +msgid "" +"Select the file(s) you want to apply to the plugin(s) or you want to delete. " +"You can select multiple files." +msgstr "" + +#: patch.php:381 +msgid "Apply/Hold" +msgstr "" + +#: patch.php:382 +msgid "Patch files to apply" +msgstr "" + +#: patch.php:398 +msgid "Apply patch" +msgstr "" + +#: patch.php:398 +msgid "" +"Are you sure to apply patch files?\\n\\nClick [Cancel] to stop,[OK] to " +"continue." +msgstr "" + +#: patch.php:399 +msgid "" +"Are you sure to delete patch files?\\n\\nClick [Cancel] to stop,[OK] to " +"continue." +msgstr "" + +#: patch.php:410 +msgid "Caution about your patch file(s)" +msgstr "" + +#: patch.php:414 +msgid "" +"If you don't know where it comes from or who created it, I strongly " +"recommend that you should see and check the contents of the file. If a " +"person who created it secretly inserted a malicious codes, it will be " +"executed by the plugin and may damage your site or your server, for which " +"damage I don't incur any liability. If you don't understand well, you'd " +"better use the substitute plugins. Take your own risk, please." +msgstr "" diff --git a/pdodb.class.php b/pdodb.class.php index 7f0816f..b7df54c 100644 --- a/pdodb.class.php +++ b/pdodb.class.php @@ -1,11 +1,16 @@ db_connect(); } - + /** + * Desctructor + * + * This overrides wpdb::__destruct(), but does nothing but return true. + * + * @see wpdb::__destruct() + */ function __destruct() { return true; } /** - * dummy out the MySQL function + * Method to set character set for the database. + * + * This overrides wpdb::set_charset(), only to dummy out the MySQL function. + * + * @see wpdb::set_charset() + */ + function set_charset($dbh, $charset = null, $collate = null) { + if ( ! isset( $charset ) ) + $charset = $this->charset; + if ( ! isset( $collate ) ) + $collate = $this->collate; + } + /** + * Method to dummy out wpdb::set_sql_mode() + * + * @see wpdb::set_sql_mode() + */ + function set_sql_mode($modes = array()) { + unset($modes); + return; + } + /** + * Method to select the database connection. + * + * This overrides wpdb::select(), only to dummy out the MySQL function. + * * @see wpdb::select() */ function select($db, $dbh = null) { @@ -56,20 +99,29 @@ class PDODB extends wpdb { $this->ready = true; return; } - /** - * overrides wpdb::_real_escape(), which uses mysql_real_escape_string(). + * Method to dummy out wpdb::_weak_escape() + * + */ + function _weak_escape($string) { + return addslashes($string); + } + /** + * Method to escape characters. + * + * This overrides wpdb::_real_escape() to avoid using mysql_real_escape_string(). + * * @see wpdb::_real_escape() */ function _real_escape($string) { - if ($this->dbh && $this->real_escape) - return $this->dbh->quote($string); - else - return addslashes($string); + return addslashes($string); } /** - * overrides wpdb::print_error() + * Method to put out the error message. + * + * This overrides wpdb::print_error(), for we can't use the parent class method. + * * @see wpdb::print_error() */ function print_error($str = '') { @@ -77,7 +129,7 @@ class PDODB extends wpdb { if (!$str) { $err = $this->dbh->get_error_message() ? $this->dbh->get_error_message() : ''; - $str = $err[2]; + if (!empty($err)) $str = $err[2]; else $str = ''; } $EZSQL_ERROR[] = array('query' => $this->last_query, 'error_str' => $str); @@ -103,7 +155,7 @@ class PDODB extends wpdb { if (defined('DIEONDBERROR')) wp_die($msg); } else { - $str = htmlspecialchars($str, ENT_QUOTES); + $str = htmlspecialchars($str, ENT_QUOTES); $query = htmlspecialchars($this->last_query, ENT_QUOTES); print "
@@ -112,12 +164,30 @@ class PDODB extends wpdb {
"; } } - + /** + * Method to flush cached data. + * + * This overrides wpdb::flush(). This is not necessarily overridden, because + * $result will never be resource. + * + * @see wpdb::flush + */ + function flush() { + $this->last_result = array(); + $this->col_info = null; + $this->last_query = null; + $this->rows_affected = $this->num_rows = 0; + $this->last_error = ''; + $this->result = null; + } /** - * overrides wpdb::db_connect() + * Method to do the database connection. + * + * This overrides wpdb::db_connect() to avoid using MySQL function. + * * @see wpdb::db_connect() */ - function db_connect() { + function db_connect($allow_bail=true) { if (WP_DEBUG) { $this->dbh = new PDOEngine(); } else { @@ -130,11 +200,23 @@ class PDODB extends wpdb { $this->bail(sprintf(__("

Error establlishing a database connection

We have been unable to connect to the specified database.
The error message received was %s"), $this->dbh->errorInfo())); return; } + $is_enabled_foreign_keys = @$this->get_var('PRAGMA foreign_keys'); + if ($is_enabled_foreign_keys == '0') @$this->query('PRAGMA foreign_keys = ON'); $this->ready = true; } - /** - * overrides wpdb::query() + * Method to dummy out wpdb::check_connection() + * + */ + function check_connection($allow_bail=true) { + return true; + } + /** + * Method to execute the query. + * + * This overrides wpdb::query(). In fact, this method does all the database + * access jobs. + * * @see wpdb::query() */ function query($query) { @@ -179,25 +261,44 @@ class PDODB extends wpdb { $return_val = $this->rows_affected; } else { $this->last_result = $this->dbh->get_query_results(); - $this->num_rows = $this->dbh->get_num_rows(); - $return_val = $this->num_rows; + $this->num_rows = $this->dbh->get_num_rows(); + $return_val = $this->num_rows; } return $return_val; } - /** - * overrides wpdb::load_col_info(), which uses a mysql function. - * @see wpdb::load_col_info() + * */ - function load_col_info() { + private function _do_query($query) { + if (defined('SAVEQUERIES') && SAVEQUERIES) { + $this->timer_start(); + } + $this->result = $this->dbh->query($query); + $this->num_queries++; + if (defined('SAVEQUERIES') && SAVEQUERIES) { + $this->queries[] = array($query, $this->timer_stop(), $this->get_caller()); + } + } + /** + * Method to set the class variable $col_info. + * + * This overrides wpdb::load_col_info(), which uses a mysql function. + * + * @see wpdb::load_col_info() + * @access protected + */ + protected function load_col_info() { if ($this->col_info) return; $this->col_info = $this->dbh->get_columns(); } /** - * overrides wpdb::has_cap() - * We don't support collation, group_concat, set_charset + * Method to return what the database can do. + * + * This overrides wpdb::has_cap() to avoid using MySQL functions. + * SQLite supports subqueries, but not support collation, group_concat and set_charset. + * * @see wpdb::has_cap() */ function has_cap($db_cap) { @@ -213,17 +314,22 @@ class PDODB extends wpdb { } } /** - * overrides wpdb::db_version() - * Returns mysql version number but it means nothing for SQLite. + * Method to return database version number. + * + * This overrides wpdb::db_version() to avoid using MySQL function. + * It returns mysql version number, but it means nothing for SQLite. + * So it return the newest mysql version. + * * @see wpdb::db_version() */ function db_version() { - global $required_mysql_version; - return $required_mysql_version; +// global $required_mysql_version; +// return $required_mysql_version; + return '5.5'; } } -/** +/* * Initialize $wpdb with PDODB class */ if (!isset($wpdb)) { diff --git a/pdoengine.class.php b/pdoengine.class.php index 6064e2f..5caa6da 100644 --- a/pdoengine.class.php +++ b/pdoengine.class.php @@ -1,58 +1,184 @@ init(); } + /** + * Destructor + * + * @return boolean + */ function __destruct() { $this->pdo = null; return true; } /** - * Function to initialize database - * checks if there's a database directory and database file, creates the tables, - * and binds the user defined function to the pdo object + * Method to initialize database, executed in the contructor. + * + * It checks if there's a database directory and database file, creates the tables, + * and binds the user defined function to the pdo object. + * * @return boolean */ private function init() { - $dsn = 'sqlite:' . FQDB; + $dsn = 'sqlite:' . FQDB; $result = $this->prepare_directory(); if (!$result) return false; if (is_file(FQDB)) { @@ -67,9 +193,9 @@ class PDOEngine extends PDO { array( // PDO options PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION )); - $statement = $this->pdo->query("SELECT COUNT(*) FROM sqlite_master WHERE type='table'"); + $statement = $this->pdo->query("SELECT COUNT(*) FROM sqlite_master WHERE type='table'"); $number_of_tables = $statement->fetchColumn(0); - $statement = null; + $statement = null; if ($number_of_tables == 0) { $this->make_sqlite_tables(); } @@ -80,8 +206,8 @@ class PDOEngine extends PDO { if ($status == 5 || $status == 6) { $locked = true; } else { - $message = __("Database connection error!
", 'sqlite-integration'); - $message .= sprintf(__("Error message is: %s", 'sqlite-integration'), $err->getMessage()); + $message = 'Database connection error!
'; + $message .= sprintf("Error message is: %s", $err->getMessage()); $this->set_error(__LINE__, __FUNCTION__, $message); return false; } @@ -96,8 +222,8 @@ class PDOEngine extends PDO { try { $this->pdo = new PDO($dsn, null, null, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); } catch (PDOException $err) { - $message = __("Database connection error!
", 'sqlite-integration'); - $message .= sprintf(__("Error message is: %s", 'sqlite-integration'), $err->getMessage()); + $message = 'Database initialization error!
'; + $message .= sprintf("Error message is: %s", $err->getMessage()); $this->set_error(__LINE__, __FUNCTION__, $message); return false; } @@ -106,62 +232,108 @@ class PDOEngine extends PDO { } /** - * Make database direcotry and .htaccess file - * executed once while installation process + * This method makes database direcotry and .htaccess file. + * + * It is executed only once when the installation begins. */ private function prepare_directory() { global $wpdb; $u = umask(0000); if (!is_dir(FQDBDIR)) { - if (!@mkdir(FQDBDIR, 0777, true)) { + if (!@mkdir(FQDBDIR, 0707, true)) { umask($u); - $message = __('Unable to create the required directory! Please check your server settings.', 'sqlite-integration'); - echo $message; - return false; + $message = 'Unable to create the required directory! Please check your server settings.'; + wp_die($message, 'Error!'); } } if (!is_writable(FQDBDIR)) { umask($u); - $message = __('Unable to create a file in the directory! Please check your server settings.', 'sqlite-integration'); - echo $message; - return false; + $message = 'Unable to create a file in the directory! Please check your server settings.'; + wp_die($message, 'Error!'); } if (!is_file(FQDBDIR . '.htaccess')) { $fh = fopen(FQDBDIR . '.htaccess', "w"); if (!$fh) { umask($u); - $message = __('Unable to create a file in the directory! Please check your server settings.', 'sqlite-integration'); + $message = 'Unable to create a file in the directory! Please check your server settings.'; echo $message; return false; } - fwrite($fh, "DENY FROM ALL"); + fwrite($fh, 'DENY FROM ALL'); fclose($fh); } + if (!is_file(FQDBDIR . 'index.php')) { + $fh = fopen(FQDBDIR . 'index.php', "w"); + if (!$fh) { + umask($u); + $message = 'Unable to create a file in the directory! Please check your server settings.'; + echo $message; + return false; + } + fwrite($fh, ''); + fclose($fh); + } umask($u); return true; } /** - * Make database file itself and WordPress tables - * executed once while installation process + * Method to call install() function which overrides WordPress install(). + * + * This function is executed only once during the installation process. */ private function make_sqlite_tables() { - require_once PDODIR . "install.php"; + require_once PDODIR . 'install.php'; } - + /** + * Method to execute query(). + * + * Divide the query types into seven different ones. That is to say: + * + * 1. SELECT SQL_CALC_FOUND_ROWS + * 2. INSERT + * 3. CREATE TABLE(INDEX) + * 4. ALTER TABLE + * 5. SHOW VARIABLES + * 6. DROP INDEX + * 7. THE OTHERS + * + * #1 is just a tricky play. See the private function handle_sql_count() in query.class.php. + * From #2 through #5 call different functions respectively. + * #6 call the ALTER TABLE query. + * #7 is a normal process: sequentially call prepare_query() and execute_query(). + * + * #1 process has been changed since version 1.5.1. + * + * @param $query full SQL statement string + * @return mixed according to the query type + * @see PDO::query() + */ public function query($query) { $this->flush(); - $this->queries[] = "Raw query:\t$query"; + $this->queries[] = "Raw query:\n$query"; $res = $this->determine_query_type($query); - if (!$res) { + if (!$res && defined(PDO_DEBUG) && PDO_DEBUG) { $bailoutString = sprintf(__("

Unknown query type

Sorry, we cannot determine the type of query that is requested.

The query is %s

", 'sqlite-integration'), $query); $this->set_error(__LINE__, __FUNCTION__, $bailoutString); } switch (strtolower($this->query_type)) { + case 'set': + $this->return_value = false; + break; case 'foundrows': - $this->results = $this->found_rows_result; - $this->num_rows = count($this->results); - $this->found_rows_result = null; + $_column = array('FOUND_ROWS()' => ''); + $column = array(); + if (!is_null($this->found_rows_result)) { + $this->num_rows = $this->found_rows_result; + $_column['FOUND_ROWS()'] = $this->num_rows; +// foreach ($this->found_rows_result[0] as $key => $value) { +// $_column['FOUND_ROWS()'] = $value; +// } + $column[] = new ObjectArray($_column); + $this->results = $column; + $this->found_rows_result = null; + } break; case 'insert': if ($this->can_insert_multiple_rows) { @@ -181,12 +353,15 @@ class PDOEngine extends PDO { case 'show_variables': $result = $this->show_variables_workaround($query); break; + case 'showstatus': + $result = $this->show_status_workaround($query); + break; case 'drop_index': $pattern = '/^\\s*(DROP\\s*INDEX\\s*.*?)\\s*ON\\s*(.*)/im'; if (preg_match($pattern, $query, $match)) { - $drop_query = 'ALTER TABLE ' . trim($match[2]) . ' ' . trim($match[1]); - $this->query_type = 'alter'; - $result = $this->execute_alter_query($drop_query); + $drop_query = 'ALTER TABLE ' . trim($match[2]) . ' ' . trim($match[1]); + $this->query_type = 'alter'; + $result = $this->execute_alter_query($drop_query); $this->return_value = $result; } else { $this->return_value = false; @@ -195,7 +370,7 @@ class PDOEngine extends PDO { default: $engine = $this->prepare_engine($this->query_type); $this->rewritten_query = $engine->rewrite_query($query, $this->query_type); - $this->queries[] = "Rewritten: $this->rewritten_query"; + $this->queries[] = "Rewritten:\n$this->rewritten_query"; $this->extract_variables(); $statement = $this->prepare_query(); $this->execute_query($statement); @@ -207,33 +382,114 @@ class PDOEngine extends PDO { break; } if (defined('PDO_DEBUG') && PDO_DEBUG === true) { - file_put_contents(FQDBDIR . 'debug.txt', $this->get_debug_info(), FLIE_APPEND); + file_put_contents(FQDBDIR . 'debug.txt', $this->get_debug_info(), FILE_APPEND); } return $this->return_value; } - + /** + * Method to return inserted row id. + * + * @return unsigned integer + */ public function get_insert_id() { return $this->last_insert_id; } + /** + * Method to return the number of rows affected. + * + * @return unsigned integer + */ public function get_affected_rows() { return $this->affected_rows; } + /** + * Method to return the queried column names. + * + * These data are meaningless for SQLite. So they are dummy emulating + * MySQL columns data. + * + * @return array of the object + */ public function get_columns() { - return $this->column_names; + if (!empty($this->results)) { + $primary_key = array( + 'meta_id', 'comment_ID', 'link_ID', 'option_id', + 'blog_id', 'option_name', 'ID', 'term_id', 'object_id', + 'term_taxonomy_id', 'umeta_id', 'id'); + $unique_key = array('term_id', 'taxonomy', 'slug'); + $data = array( + 'name' => '', // column name + 'table' => '', // table name + 'max_length' => 0, // max length of the column + 'not_null' => 1, // 1 if not null + 'primary_key' => 0, // 1 if column has primary key + 'unique_key' => 0, // 1 if column has unique key + 'multiple_key' => 0, // 1 if column doesn't have unique key + 'numeric' => 0, // 1 if column has numeric value + 'blob' => 0, // 1 if column is blob + 'type' => '', // type of the column + 'unsigned' => 0, // 1 if column is unsigned integer + 'zerofill' => 0 // 1 if column is zero-filled + ); + if (preg_match("/\s*FROM\s*(.*)?\s*/i", $this->rewritten_query, $match)) { + $table_name = trim($match[1]); + } else { + $table_name = ''; + } + foreach ($this->results[0] as $key => $value) { + $data['name'] = $key; + $data['table'] = $table_name; + if (in_array($key, $primary_key)) { + $data['primary_key'] = 1; + } elseif (in_array($key, $unique_key)) { + $data['unique_key'] = 1; + } else { + $data['multiple_key'] = 1; + } + $this->column_data[] = new ObjectArray($data); + $data['name'] = ''; + $data['table'] = ''; + $data['primary_key'] = 0; + $data['unique_key'] = 0; + $data['multiple_key'] = 0; + } + return $this->column_data; + } else { + return null; + } } + /** + * Method to return the queried result data. + * + * @return mixed + */ public function get_query_results() { return $this->results; } + /** + * Method to return the number of rows from the queried result. + * + * @return unsigned integer + */ public function get_num_rows() { return $this->num_rows; } + /** + * Method to return the queried results according to the query types. + * + * @return mixed + */ public function get_return_value() { return $this->return_value; } - + /** + * Method to return error messages. + * + * @return string + */ public function get_error_message(){ if (count($this->error_messages) === 0){ - $this->is_error = false; + $this->is_error = false; $this->error_messages = array(); return ''; } @@ -253,20 +509,26 @@ class PDOEngine extends PDO { ob_start(); debug_print_backtrace(); - $output .= "
" . ob_get_contents() . "
"; + $output .= '
' . ob_get_contents() . '
'; ob_end_clean(); return $output; } - + /** + * Method to return information about query string for debugging. + * + * @return string + */ private function get_debug_info(){ $output = ''; foreach ($this->queries as $q){ - $output .= $q ."\r\n"; + $output .= $q ."\n"; } return $output; } - + /** + * Method to clear previous data. + */ private function flush(){ $this->rewritten_query = ''; $this->query_type = ''; @@ -274,7 +536,7 @@ class PDOEngine extends PDO { $this->_results = null; $this->last_insert_id = null; $this->affected_rows = null; - $this->column_names = array(); + $this->column_data = array(); $this->num_rows = null; $this->return_value = null; $this->extracted_variables = array(); @@ -283,7 +545,15 @@ class PDOEngine extends PDO { $this->queries = array(); $this->param_num = 0; } - + /** + * Method to include the apropreate class files. + * + * It is not a good habit to change the include files programatically. + * Needs to be fixed some other way. + * + * @param string $query_type + * @return object reference to apropreate driver + */ private function prepare_engine($query_type = null) { if (stripos($query_type, 'create') !== false) { require_once PDODIR . 'query_create.class.php'; @@ -297,35 +567,48 @@ class PDOEngine extends PDO { } return $engine; } - + /** + * Method to create a PDO statement object from the query string. + * + * @return PDOStatement + */ private function prepare_query(){ - $this->queries[] = "Prepare:\t". $this->prepared_query; - $reason = 0; - $message = ''; - $statement = null; + $this->queries[] = "Prepare:\n" . $this->prepared_query; + $reason = 0; + $message = ''; + $statement = null; do { try { $statement = $this->pdo->prepare($this->prepared_query); } catch (PDOException $err) { - $reason = $err->getCode(); + $reason = $err->getCode(); $message = $err->getMessage(); } } while (5 == $reason || 6 == $reason); if ($reason > 0){ - $err_message = sprintf(__("Problem preparing the PDO SQL Statement. Error was: %s", 'sqlite-integration'), $message); + $err_message = sprintf("Problem preparing the PDO SQL Statement. Error was: %s", $message); $this->set_error(__LINE__, __FUNCTION__, $err_message); } return $statement; } - + /** + * Method to execute PDO statement object. + * + * This function executes query and sets the variables to give back to WordPress. + * The variables are class fields. So if success, no return value. If failure, it + * returns void and stops. + * + * @param object $statement of PDO statement + * @return boolean + */ private function execute_query($statement) { - $reason = 0; + $reason = 0; $message = ''; if (!is_object($statement)) - return; + return false; if (count($this->extracted_variables) > 0) { - $this->queries[] = "Executing: ". var_export($this->extracted_variables, true); + $this->queries[] = "Executing:\n" . var_export($this->extracted_variables, true); do { if ($this->query_type == 'update' || $this->query_type == 'replace') { try { @@ -333,7 +616,7 @@ class PDOEngine extends PDO { $statement->execute($this->extracted_variables); $this->commit(); } catch (PDOException $err) { - $reason = $err->getCode(); + $reason = $err->getCode(); $message = $err->getMessage(); $this->rollBack(); } @@ -341,13 +624,13 @@ class PDOEngine extends PDO { try { $statement->execute($this->extracted_variables); } catch (PDOException $err) { - $reason = $err->getCode(); + $reason = $err->getCode(); $message = $err->getMessage(); } } } while (5 == $reason || 6 == $reason); } else { - $this->queries[] = "Executing: (no parameters)\t "; + $this->queries[] = 'Executing: (no parameters)'; do{ if ($this->query_type == 'update' || $this->query_type == 'replace') { try { @@ -355,7 +638,7 @@ class PDOEngine extends PDO { $statement->execute(); $this->commit(); } catch (PDOException $err) { - $reason = $err->getCode(); + $reason = $err->getCode(); $message = $err->getMessage(); $this->rollBack(); } @@ -363,14 +646,14 @@ class PDOEngine extends PDO { try { $statement->execute(); } catch (PDOException $err) { - $reason = $err->getCode(); + $reason = $err->getCode(); $message = $err->getMessage(); } } } while (5 == $reason || 6 == $reason); } if ($reason > 0) { - $err_message = sprintf(__("Error while executing query! Error message was: %s", 'sqlite-integration'), $message); + $err_message = sprintf("Error while executing query! Error message was: %s", $message); $this->set_error(__LINE__, __FUNCTION__, $err_message); return false; } else { @@ -378,32 +661,34 @@ class PDOEngine extends PDO { } //generate the results that $wpdb will want to see switch ($this->query_type) { - case "insert": - case "update": - case "replace": + case 'insert': + case 'update': + case 'replace': $this->last_insert_id = $this->pdo->lastInsertId(); - $this->affected_rows = $statement->rowCount(); - $this->return_value = $this->affected_rows; + $this->affected_rows = $statement->rowCount(); + $this->return_value = $this->affected_rows; break; - case "select": - case "show": - case "showcolumns": - case "showindex": - case "describe": - case "desc": + case 'select': + case 'show': + case 'showcolumns': + case 'showindex': + case 'describe': + case 'desc': + case 'check': + case 'analyze': // case "foundrows": - $this->num_rows = count($this->_results); + $this->num_rows = count($this->_results); $this->return_value = $this->num_rows; break; - case "delete": + case 'delete': $this->affected_rows = $statement->rowCount(); - $this->return_value = $this->affected_rows; + $this->return_value = $this->affected_rows; break; - case "alter": - case "drop": - case "create": - case "optimize": - case "truncate": + case 'alter': + case 'drop': + case 'create': + case 'optimize': + case 'truncate': if ($this->is_error) { $this->return_value = false; } else { @@ -412,19 +697,26 @@ class PDOEngine extends PDO { break; } } - + /** + * Method to extract field data to an array and prepare the query statement. + * + * If original SQL statement is CREATE query, this function do nothing and return + * true. This returned value is not used. + * + * @return boolean + */ private function extract_variables() { if ($this->query_type == 'create') { $this->prepared_query = $this->rewritten_query; - return; + return true; } //long queries can really kill this $pattern = '/(? 10000000) { - $message = __("The query is too big to parse properly", 'sqlite-integration'); + $message = 'The query is too big to parse properly'; $this->set_error(__LINE__, __FUNCTION__, $message); break; //no point in continuing execution, would get into a loop } else { @@ -436,10 +728,15 @@ class PDOEngine extends PDO { //reset the pcre.backtrack_limist ini_set('pcre.backtrack_limit', $_limit); - $this->queries[]= "With Placeholders: $query "; + $this->queries[] = "With Placeholders:\n" . $query; $this->prepared_query = $query; } - + /** + * Call back function to replace field data with PDO parameter. + * + * @param string $matches + * @return string + */ private function replace_variables_with_placeholders($matches) { //remove the wordpress escaping mechanism $param = stripslashes($matches[0]); @@ -463,13 +760,16 @@ class PDOEngine extends PDO { } /** - * takes the query string ,determines the type and returns the type string - * if the query is the type PDO for Wordpress can't executes, returns false + * Method to determine which query type the argument is. + * + * It takes the query string ,determines the type and returns the type string. + * If the query is the type that SQLite Integration can't executes, returns false. + * * @param string $query * @return boolean|string */ private function determine_query_type($query) { - $result = preg_match('/^\\s*(EXPLAIN|PRAGMA|SELECT\\s*FOUND_ROWS|SELECT|INSERT|UPDATE|REPLACE|DELETE|ALTER|CREATE|DROP\\s*INDEX|DROP|SHOW\\s*\\w+\\s*\\w+\\s*|DESCRIBE|DESC|TRUNCATE|OPTIMIZE)/i', $query, $match); + $result = preg_match('/^\\s*(SET|EXPLAIN|PRAGMA|SELECT\\s*FOUND_ROWS|SELECT|INSERT|UPDATE|REPLACE|DELETE|ALTER|CREATE|DROP\\s*INDEX|DROP|SHOW\\s*\\w+\\s*\\w+\\s*|DESCRIBE|DESC|TRUNCATE|OPTIMIZE|CHECK|ANALYZE)/i', $query, $match); if (!$result) { return false; @@ -479,9 +779,11 @@ class PDOEngine extends PDO { $this->query_type = 'foundrows'; } if (stripos($this->query_type, 'show') !== false) { - if (stripos($this->query_type, 'show tables') !== false) { + if (stripos($this->query_type, 'show table status') !== false) { + $this->query_type = 'showstatus'; + } elseif (stripos($this->query_type, 'show tables') !== false || stripos($this->query_type, 'show full tables') !== false) { $this->query_type = 'show'; - } elseif (stripos($this->query_type, 'show columns') !== false || stripos($this->query_type, 'show fields') !== false) { + } elseif (stripos($this->query_type, 'show columns') !== false || stripos($this->query_type, 'show fields') !== false || stripos($this->query_type, 'show full columns') !== false) { $this->query_type = 'showcolumns'; } elseif (stripos($this->query_type, 'show index') !== false || stripos($this->query_type, 'show indexes') !== false || stripos($this->query_type, 'show keys') !== false) { $this->query_type = 'showindex'; @@ -498,30 +800,37 @@ class PDOEngine extends PDO { } /** - * SQLite version 3.7.11 began support multiple rows insert with values + * Method to execute INSERT query for SQLite version 3.7.11 or later. + * + * SQLite version 3.7.11 began to support multiple rows insert with values * clause. This is for that version or later. + * * @param string $query */ private function execute_insert_query_new($query) { - $engine = $this->prepare_engine($this->query_type); + $engine = $this->prepare_engine($this->query_type); $this->rewritten_query = $engine->rewrite_query($query, $this->query_type); - $this->queries[] = "Rewritten: $this->rewritten_query"; + $this->queries[] = "Rewritten:\n" . $this->rewritten_query; $this->extract_variables(); - $statement = $this->prepare_query(); + $statement = $this->prepare_query(); $this->execute_query($statement); } /** - * executes the INSERT query for SQLite version 3.7.10 or lesser + * Method to execute INSERT query for SQLite version 3.7.10 or lesser. + * + * It executes the INSERT query for SQLite version 3.7.10 or lesser. It is + * necessary to rewrite multiple row values. + * * @param string $query */ private function execute_insert_query($query) { global $wpdb; $multi_insert = false; - $statement = null; - $engine = $this->prepare_engine($this->query_type); + $statement = null; + $engine = $this->prepare_engine($this->query_type); if (preg_match('/(INSERT.*?VALUES\\s*)(\(.*\))/imsx', $query, $matched)) { $query_prefix = $matched[1]; - $values_data = $matched[2]; + $values_data = $matched[2]; if (stripos($values_data, 'ON DUPLICATE KEY') !== false) { $exploded_parts = $values_data; } elseif (stripos($query_prefix, "INSERT INTO $wpdb->comments") !== false) { @@ -542,9 +851,9 @@ class PDOEngine extends PDO { } else { $suffix = ')'; } - $query_string = $query_prefix . ' ' . $value . $suffix; - $this->rewritten_query = $engine->rewrite_query($query_string, $this->query_type); - $this->queries[] = "Rewritten: $this->rewritten_query"; + $query_string = $query_prefix . ' ' . $value . $suffix; + $this->rewritten_query = $engine->rewrite_query($query_string, $this->query_type); + $this->queries[] = "Rewritten:\n" . $this->rewritten_query; $this->extracted_variables = array(); $this->extract_variables(); if ($first) { @@ -557,7 +866,7 @@ class PDOEngine extends PDO { } } else { $this->rewritten_query = $engine->rewrite_query($query, $this->query_type); - $this->queries[] = "Rewritten: $this->rewritten_query"; + $this->queries[] = "Rewritten:\n" . $this->rewritten_query; $this->extract_variables(); $statement = $this->prepare_query(); $this->execute_query($statement); @@ -565,7 +874,10 @@ class PDOEngine extends PDO { } /** - * helper function for execute_insert_query() + * Method to help rewriting multiple row values insert query. + * + * It splits the values clause into an array to execute separately. + * * @param string $values * @return array */ @@ -604,27 +916,28 @@ class PDOEngine extends PDO { } /** - * function to execute CREATE query + * Method to execute CREATE query. + * * @param string * @return boolean */ private function execute_create_query($query) { - $engine = $this->prepare_engine($this->query_type); + $engine = $this->prepare_engine($this->query_type); $rewritten_query = $engine->rewrite_query($query); - $reason = 0; - $message = ''; + $reason = 0; + $message = ''; // $queries = explode(";", $this->rewritten_query); try { $this->beginTransaction(); foreach ($rewritten_query as $single_query) { - $this->queries[] = "Executing:\t" . $single_query; - $single_query = trim($single_query); + $this->queries[] = "Executing:\n" . $single_query; + $single_query = trim($single_query); if (empty($single_query)) continue; $this->pdo->exec($single_query); } $this->commit(); } catch (PDOException $err) { - $reason = $err->getCode(); + $reason = $err->getCode(); $message = $err->getMessage(); if (5 == $reason || 6 == $reason) { $this->commit(); @@ -633,40 +946,45 @@ class PDOEngine extends PDO { } } if ($reason > 0) { - $err_message = sprintf(__("Problem in creating table or index. Error was: %s", 'sqlite-integration'), $message); + $err_message = sprintf("Problem in creating table or index. Error was: %s", $message); $this->set_error(__LINE__, __FUNCTION__, $err_message); return false; } return true; } - /** - * function to execute ALTER TABLE query + * Method to execute ALTER TABLE query. + * * @param string * @return boolean */ private function execute_alter_query($query) { - $engine = $this->prepare_engine($this->query_type); - $reason = 0; - $message = ''; + $engine = $this->prepare_engine($this->query_type); + $reason = 0; + $message = ''; + $re_query = ''; $rewritten_query = $engine->rewrite_query($query, $this->query_type); + if (is_array($rewritten_query) && array_key_exists('recursion', $rewritten_query)) { + $re_query = $rewritten_query['recursion']; + unset($rewritten_query['recursion']); + } try { $this->beginTransaction(); if (is_array($rewritten_query)) { foreach ($rewritten_query as $single_query) { - $this->queries[] = "Executing:\t" . $single_query; - $single_query = trim($single_query); + $this->queries[] = "Executing:\n" . $single_query; + $single_query = trim($single_query); if (empty($single_query)) continue; $this->pdo->exec($single_query); } } else { - $this->queries[] = "Executing:\t" . $rewritten_query; + $this->queries[] = "Executing:\n" . $rewritten_query; $rewritten_query = trim($rewritten_query); $this->pdo->exec($rewritten_query); } $this->commit(); } catch (PDOException $err) { - $reason = $err->getCode(); + $reason = $err->getCode(); $message = $err->getMessage(); if (5 == $reason || 6 == $reason) { $this->commit(); @@ -675,8 +993,11 @@ class PDOEngine extends PDO { $this->rollBack(); } } + if ($re_query != '') { + $this->query($re_query); + } if ($reason > 0) { - $err_message = sprintf(__("Problem in executing alter query. Error was: %s", 'sqlite-integration'), $message); + $err_message = sprintf("Problem in executing alter query. Error was: %s", $message); $this->set_error(__LINE__, __FUNCTION__, $err_message); return false; } @@ -684,52 +1005,105 @@ class PDOEngine extends PDO { } /** - * function to execute SHOW VARIABLES query + * Method to execute SHOW VARIABLES query * - * This query is meaningless for SQLite. This function returns null data and - * avoid the error message. + * This query is meaningless for SQLite. This function returns null data with some + * exceptions and only avoids the error message. * * @param string * @return ObjectArray */ private function show_variables_workaround($query) { $dummy_data = array('Variable_name' => '', 'Value' => null); - $pattern = '/SHOW\\s*VARIABLES\\s*LIKE\\s*(.*)?$/im'; + $pattern = '/SHOW\\s*VARIABLES\\s*LIKE\\s*(.*)?$/im'; if (preg_match($pattern, $query, $match)) { $value = str_replace("'", '', $match[1]); $dummy_data['Variable_name'] = trim($value); // this is set for Wordfence Security Plugin - if ($value == 'max_allowed_packet') $dummy_data['Value'] = 1047552; + if ($value == 'max_allowed_packet') { + $dummy_data['Value'] = 1047552; + } else { + $dummy_data['Value'] = ''; + } } - $_results[] = new ObjectArray($dummy_data); - $this->results = $_results; - $this->num_rows = count($this->results); + $_results[] = new ObjectArray($dummy_data); + $this->results = $_results; + $this->num_rows = count($this->results); $this->return_value = $this->num_rows; return true; } - + /** + * Method to execute SHOW TABLE STATUS query. + * + * This query is meaningless for SQLite. This function return dummy data. + * + * @param string + * @return ObjectArray + */ + private function show_status_workaround($query) { + $pattern = '/^SHOW\\s*TABLE\\s*STATUS\\s*LIKE\\s*(.*?)$/im'; + if (preg_match($pattern, $query, $match)) { + $table_name = str_replace("'", '', $match[1]); + } else { + $table_name = ''; + } + $dummy_data = array( + 'Name' => $table_name, 'Engine' => '', 'Version' => '', + 'Row_format' => '', 'Rows' => 0, 'Avg_row_length' => 0, + 'Data_length' => 0, 'Max_data_length' => 0, 'Index_length' => 0, + 'Data_free' => 0, 'Auto_increment' => 0, 'Create_time' => '', + 'Update_time' => '', 'Check_time' => '', 'Collation' => '', + 'Checksum' => '', 'Create_options' => '', 'Comment' => '' + ); + $_results[] = new ObjectArray($dummy_data); + $this->results = $_results; + $this->num_rows = count($this->results); + $this->return_value = $this->num_rows; + return true; + } + /** + * Method to format the queried data to that of MySQL. + * + * @param string $engine + */ private function process_results($engine) { if (in_array($this->query_type, array('describe', 'desc', 'showcolumns'))) { $this->convert_to_columns_object(); } elseif ('showindex' === $this->query_type){ $this->convert_to_index_object(); + } elseif (in_array($this->query_type, array('check', 'analyze'))) { + $this->convert_result_check_or_analyze(); } else { $this->results = $this->_results; } } - + /** + * Method to format the error messages and put out to the file. + * + * When $wpdb::suppress_errors is set to true or $wpdb::show_errors is set to false, + * the error messages are ignored. + * + * @param string $line where the error occurred. + * @param string $function to indicate the function name where the error occurred. + * @param string $message + * @return boolean + */ private function set_error ($line, $function, $message){ global $wpdb; - $this->errors[] = array("line"=>$line, "function"=>$function); + $this->errors[] = array("line"=>$line, "function"=>$function); $this->error_messages[] = $message; - $this->is_error = true; + $this->is_error = true; if ($wpdb->suppress_errors) return false; if (!$wpdb->show_errors) return false; file_put_contents (FQDBDIR .'debug.txt', "Line $line, Function: $function, Message: $message \n", FILE_APPEND); } - /** - * method that takes the associative array of query results and creates a numeric array of anonymous objects + * Method to change the queried data to PHP object format. + * + * It takes the associative array of query results and creates a numeric + * array of anonymous objects + * + * @access private */ private function convert_to_object(){ $_results = array(); @@ -742,11 +1116,13 @@ class PDOEngine extends PDO { } $this->results = $_results; } - /** - * method to rewrite pragma results to mysql compatible array + * Method to convert the SHOW COLUMNS query data to an object. + * + * It rewrites pragma results to mysql compatible array * when query_type is describe, we use sqlite pragma function. - * see pdo_sqlite_driver.php + * + * @access private */ private function convert_to_columns_object() { $_results = array(); @@ -767,13 +1143,18 @@ class PDOEngine extends PDO { $_columns['Null'] = $row->notnull ? "NO" : "YES"; $_columns['Key'] = $row->pk ? "PRI" : ""; $_columns['Default'] = $row->dflt_value; - $_results[] = new ObjectArray($_columns); + $_results[] = new ObjectArray($_columns); } } $this->results = $_results; } /** - * rewrites the result of SHOW INDEX to the Object compatible with MySQL + * Method to convert SHOW INDEX query data to PHP object. + * + * It rewrites the result of SHOW INDEX to the Object compatible with MySQL + * added the WHERE clause manipulation (ver 1.3.1) + * + * @access private */ private function convert_to_index_object() { $_results = array(); @@ -838,16 +1219,57 @@ class PDOEngine extends PDO { $_columns['Null'] = 'NO'; $_columns['Index_type'] = 'BTREE'; $_columns['Comment'] = ''; - $_results[] = new ObjectArray($_columns); + $_results[] = new ObjectArray($_columns); + } + if (stripos($this->queries[0], 'WHERE') !== false) { + preg_match('/WHERE\\s*(.*)$/im', $this->queries[0], $match); + list($key, $value) = explode('=', $match[1]); + $key = trim($key); + $value = preg_replace("/[\';]/", '', $value); + $value = trim($value); + foreach ($_results as $result) { + if (stripos($value, $result->$key) !== false) { + unset($_results); + $_results[] = $result; + break; + } + } } } $this->results = $_results; } - + /** + * Method to the CHECK query data to an object. + * + * @access private + */ + private function convert_result_check_or_analyze() { + $results = array(); + if ($this->query_type == 'check') { + $_columns = array( + 'Table' => '', + 'Op' => 'check', + 'Msg_type' => 'status', + 'Msg_text' => 'OK' + ); + } else { + $_columns = array( + 'Table' => '', + 'Op' => 'analyze', + 'Msg_type' => 'status', + 'Msg_text' => 'Table is already up to date' + ); + } + $_results[] = new ObjectArray($_columns); + $this->results = $_results; + } /** - * function to get SQLite library version - * this is used for checking if SQLite can execute multiple rows insert + * Method to check SQLite library version. + * + * This is used for checking if SQLite can execute multiple rows insert. + * * @return version number string or 0 + * @access private */ private function get_sqlite_version() { try { @@ -860,8 +1282,10 @@ class PDOEngine extends PDO { } } /** - * function call to PDO::beginTransaction() + * Method to call PDO::beginTransaction(). + * * @see PDO::beginTransaction() + * @return boolean */ public function beginTransaction() { if ($this->has_active_transaction) { @@ -872,7 +1296,8 @@ class PDOEngine extends PDO { } } /** - * function call to PDO::commit() + * Method to call PDO::commit(). + * * @see PDO::commit() */ public function commit() { @@ -880,7 +1305,8 @@ class PDOEngine extends PDO { $this->has_active_transaction = false; } /** - * function call to PDO::rollBack() + * Method to call PDO::rollBack(). + * * @see PDO::rollBack() */ public function rollBack() { @@ -889,6 +1315,11 @@ class PDOEngine extends PDO { } } +/** + * Class to change queried data to PHP object. + * + * @author kjm + */ class ObjectArray { function __construct($data = null,&$node= null) { foreach ($data as $key => $value) { diff --git a/query.class.php b/query.class.php index 0f0a396..45e58f4 100644 --- a/query.class.php +++ b/query.class.php @@ -1,22 +1,56 @@ query_type = $query_type; $this->_query = $query; + $this->parse_query(); switch ($this->query_type) { case 'truncate': - $this->_handle_truncate_query(); + $this->handle_truncate_query(); break; case 'alter': - $this->_handle_alter_query(); + $this->handle_alter_query(); break; case 'create': - $this->_handle_create_query(); + $this->handle_create_query(); break; case 'describe': case 'desc': - $this->_handle_describe_query(); + $this->handle_describe_query(); break; case 'show': - $this->_handle_show_query(); + $this->handle_show_query(); break; case 'showcolumns': - $this->_handle_show_columns_query(); + $this->handle_show_columns_query(); break; case 'showindex': - $this->_handle_show_index(); + $this->handle_show_index(); break; case 'select': - $this->_strip_backticks(); - $this->_handle_sql_count(); - $this->_rewrite_date_sub(); - $this->_delete_index_hints(); - $this->_rewrite_regexp(); - $this->_rewrite_boolean(); + //$this->strip_backticks(); + $this->handle_sql_count(); + $this->rewrite_date_sub(); + $this->delete_index_hints(); + $this->rewrite_regexp(); + //$this->rewrite_boolean(); + $this->fix_date_quoting(); + $this->rewrite_between(); break; case 'insert': - $this->_strip_backticks(); - $this->_execute_duplicate_key_update(); - $this->_rewrite_insert_ignore(); - $this->_rewrite_regexp(); + //$this->safe_strip_backticks(); + $this->execute_duplicate_key_update(); + $this->rewrite_insert_ignore(); + $this->rewrite_regexp(); + $this->fix_date_quoting(); break; case 'update': - $this->_strip_backticks(); - $this->_rewrite_update_ignore(); + //$this->safe_strip_backticks(); + $this->rewrite_update_ignore(); // $this->_rewrite_date_sub(); - $this->_rewrite_limit_usage(); - $this->_rewrite_order_by_usage(); - $this->_rewrite_regexp(); + $this->rewrite_limit_usage(); + $this->rewrite_order_by_usage(); + $this->rewrite_regexp(); + $this->rewrite_between(); break; case 'delete': - $this->_strip_backticks(); - $this->_rewrite_limit_usage(); - $this->_rewrite_order_by_usage(); - $this->_rewrite_date_sub(); - $this->_rewrite_regexp(); - $this->_delete_workaround(); + //$this->strip_backticks(); + $this->rewrite_limit_usage(); + $this->rewrite_order_by_usage(); + $this->rewrite_date_sub(); + $this->rewrite_regexp(); + $this->delete_workaround(); break; case 'replace': - $this->_strip_backticks(); - $this->_rewrite_date_sub(); - $this->_rewrite_regexp(); + //$this->safe_strip_backticks(); + $this->rewrite_date_sub(); + $this->rewrite_regexp(); break; case 'optimize': - $this->_rewrite_optimize(); + $this->rewrite_optimize(); break; + case 'pragma': + break; default: + if (defined(WP_DEBUG) && WP_DEBUG) { + break; + } else { + $this->return_true(); + break; + } } return $this->_query; } - + /** - * method to dummy the SHOW TABLES query + * Method to parse query string and determine which operation is needed. + * + * Remove backticks and change true/false values into 1/0. And determines + * if rewriting CALC_FOUND_ROWS or ON DUPLICATE KEY UPDATE etc is needed. + * + * @access private */ - private function _handle_show_query(){ + private function parse_query() { + $tokens = preg_split("/(\\\'|''|')/s", $this->_query, -1, PREG_SPLIT_DELIM_CAPTURE); + $literal = false; + $query_string = ''; + foreach ($tokens as $token) { + if ($token == "'") { + if ($literal) { + $literal = false; + } else { + $literal = true; + } + } else { + if ($literal === false) { + if (strpos($token, '`') !== false) { + $token = str_replace('`', '', $token); + } + if (preg_match('/\\bTRUE\\b/i', $token)) { + $token = str_ireplace('TRUE', '1', $token); + } + if (preg_match('/\\bFALSE\\b/i', $token)) { + $token = str_ireplace('FALSE', '0', $token); + } + if (stripos($token, 'SQL_CALC_FOUND_ROWS') !== false) { + $this->rewrite_calc_found = true; + } + if (stripos($token, 'ON DUPLICATE KEY UPDATE') !== false) { + $this->rewrite_duplicate_key = true; + } + if (stripos($token, 'USE INDEX') !== false) { + $this->rewrite_index_hint = true; + } + if (stripos($token, 'IGNORE INDEX') !== false) { + $this->rewrite_index_hint = true; + } + if (stripos($token, 'FORCE INDEX') !== false) { + $this->rewrite_index_hint = true; + } + if (stripos($token, 'BETWEEN') !== false) { + $this->rewrite_between = true; + } + } + } + $query_string .= $token; + } + $this->_query = $query_string; + } + /** + * method to handle SHOW TABLES query. + * + * @access private + */ + private function handle_show_query(){ + $this->_query = str_ireplace(' FULL', '', $this->_query); $table_name = ''; - $pattern = '/^\\s*SHOW\\s*TABLES\\s*(LIKE\\s*(.*))$/im'; + $pattern = '/^\\s*SHOW\\s*TABLES\\s*.*?(LIKE\\s*(.*))$/im'; if (preg_match($pattern, $this->_query, $matches)) { $table_name = str_replace(array("'", ';'), '', $matches[2]); } @@ -106,112 +210,166 @@ class PDOSQLiteDriver { } $this->_query = "SELECT name FROM sqlite_master WHERE type='table'" . $suffix . ' ORDER BY name DESC'; } - /** - * method to strip all column qualifiers (backticks) from a query + * Method to strip all column qualifiers (backticks) from a query. + * + * All the back quotes in the query string are removed automatically. + * So it must not be used when INSERT, UPDATE or REPLACE query is executed. + * + * Obsolite since 1.5.1 + * + * @access private */ - private function _strip_backticks(){ + private function strip_backticks(){ $this->_query = str_replace('`', '', $this->_query); } - /** - * method to emulate the SQL_CALC_FOUND_ROWS placeholder for mysql - * - * this is a kind of tricky play. - * 1. remove SQL_CALC_FOUND_ROWS option, and give it to the pdo engine - * 2. make another $wpdb instance, and execute SELECT COUNT(*) query - * 3. give the returned value to the original instance variable + * Method to strip all column qualifiers (backticks) from a query except post data. * - * when SQL statement contains GROUP BY option, SELECT COUNT query doesn't - * go well. So we remove the GROUP BY, which means the returned value may - * be a approximate one. + * All the back quotes execpt user data to be inserted are revomved automatically. + * This method must be used when INSERT, UPDATE or REPLACE query is executed. * - * this kind of statement is required for WordPress to calculate the paging. - * see also WP_Query class in wp-includes/query.php + * Obsolite since 1.5.1 + * + * @access private */ - private function _handle_sql_count(){ - if (stripos($this->_query, 'SELECT SQL_CALC_FOUND_ROWS') !== false){ - global $wpdb; - // first strip the code. this is the end of rewriting process - $this->_query = str_ireplace('SQL_CALC_FOUND_ROWS', '', $this->_query); - // we make the data for next SELECE FOUND_ROWS() statement - $unlimited_query = preg_replace('/\\bLIMIT\\s*.*/imsx', '', $this->_query); -// $unlimited_query = preg_replace('/\\bFALSE\\s*.*/imsx', '0', $unlimited_query); - $unlimited_query = preg_replace('/\\bGROUP\\s*BY\\s*.*/imsx', '', $unlimited_query); - $unlimited_query = $this->__transform_to_count($unlimited_query); - $_wpdb = new PDODB(); - $result = $_wpdb->query($unlimited_query); - $wpdb->dbh->found_rows_result = $_wpdb->last_result; + private function safe_strip_backticks() { + $query_string = ''; + $tokens = preg_split("/(''|')/s", $this->_query, -1, PREG_SPLIT_DELIM_CAPTURE); + $literal = false; + $query_string = ''; + foreach ($tokens as $token) { + if ($token == "'") { + if ($literal) { + $literal = false; + } else { + $literal = true; + } + } else { + if ($literal === false && strpos($token, '`') !== false) { + $token = str_replace('`', '', $token); + } + } + $query_string .= $token; } + $this->_query = $query_string; } - /** - * transforms a select query to a select count(*) + * Method to emulate the SQL_CALC_FOUND_ROWS placeholder for MySQL. + * + * This is a kind of tricky play. + * 1. remove SQL_CALC_FOUND_ROWS option, and give it to the pdo engine + * 2. make another $wpdb instance, and execute the rewritten query + * 3. give the returned value (integer: number of the rows) to the original instance variable without LIMIT + * + * We no longer use SELECT COUNT query, because it returns the inexact values when used with WP_Meta_Query(). + * + * This kind of statement is required for WordPress to calculate the paging information. + * see also WP_Query class in wp-includes/query.php + * + * @access private + */ + private function handle_sql_count(){ + if (!$this->rewrite_calc_found) return; + global $wpdb; + // first strip the code. this is the end of rewriting process + $this->_query = str_ireplace('SQL_CALC_FOUND_ROWS', '', $this->_query); + // we make the data for next SELECE FOUND_ROWS() statement + $unlimited_query = preg_replace('/\\bLIMIT\\s*.*/imsx', '', $this->_query); + //$unlimited_query = preg_replace('/\\bGROUP\\s*BY\\s*.*/imsx', '', $unlimited_query); + // we no longer use SELECT COUNT query + //$unlimited_query = $this->_transform_to_count($unlimited_query); + $_wpdb = new PDODB(); + $result = $_wpdb->query($unlimited_query); + $wpdb->dbh->found_rows_result = $result; + $_wpdb = null; + } + /** + * Call back method to change SELECT query to SELECT COUNT(). + * + * obsolite since version 1.5.1 * * @param string $query the query to be transformed - * @return string the transformed query + * @return string the transformed query + * @access private */ - private function __transform_to_count($query){ - $pattern = '/^\\s*SELECT\\s*(DISTINCT|)?.*?FROM\b/imsx'; + private function _transform_to_count($query){ + $pattern = '/^\\s*SELECT\\s*(DISTINCT|)?.*?FROM\b/isx'; $_query = preg_replace($pattern, 'SELECT \\1 COUNT(*) FROM ', $query); return $_query; } - /** - * rewrites the insert ignore phrase for sqlite + * Method to rewrite INSERT IGNORE to INSERT OR IGNORE. + * + * @access private */ - private function _rewrite_insert_ignore(){ + private function rewrite_insert_ignore(){ $this->_query = str_ireplace('INSERT IGNORE', 'INSERT OR IGNORE ', $this->_query); } - /** - * rewrites the update ignore phrase for sqlite + * Method to rewrite UPDATE IGNORE to UPDATE OR IGNORE. + * + * @access private */ - private function _rewrite_update_ignore(){ + private function rewrite_update_ignore(){ $this->_query = str_ireplace('UPDATE IGNORE', 'UPDATE OR IGNORE ', $this->_query); } - - /** - * rewrites the date_add function for udf to manipulate + * Method to rewrite DATE_ADD() function. + * + * DATE_ADD has a parameter PHP function can't parse, so we quote the list and + * pass it to the user defined function. + * + * @access private */ - private function _rewrite_date_add(){ + private function rewrite_date_add(){ //(date,interval expression unit) $pattern = '/\\s*date_add\\s*\(([^,]*),([^\)]*)\)/imsx'; if (preg_match($pattern, $this->_query, $matches)) { - $expression = "'".trim($matches[2])."'"; + $expression = "'".trim($matches[2])."'"; $this->_query = preg_replace($pattern, " date_add($matches[1], $expression) ", $this->_query); } } - /** - * rewrite the data_sub function for udf to manipulate + * Method to rewrite DATE_SUB() function. + * + * DATE_SUB has a parameter PHP function can't parse, so we quote the list and + * pass it to the user defined function. + * + * @access private */ - private function _rewrite_date_sub(){ + private function rewrite_date_sub(){ //(date,interval expression unit) $pattern = '/\\s*date_sub\\s*\(([^,]*),([^\)]*)\)/imsx'; if (preg_match($pattern, $this->_query, $matches)) { - $expression = "'".trim($matches[2])."'"; + $expression = "'".trim($matches[2])."'"; $this->_query = preg_replace($pattern, " date_sub($matches[1], $expression) ", $this->_query); } } - /** - * handles the create query - * this function won't be used... See PDOEngine class + * Method to handle CREATE query. + * + * If the query is CREATE query, it will be passed to the query_create.class.php. + * So this method can't be used. It's here for safety. + * + * @access private */ - private function _handle_create_query(){ - require_once PDODIR.'query_create.class.php'; + private function handle_create_query(){ + require_once PDODIR . 'query_create.class.php'; $engine = new CreateQuery(); $this->_query = $engine->rewrite_query($this->_query); $engine = null; } /** - * handles the ALTER query - * this function won't be used... See PDOEngine class + * Method to handle ALTER query. + * + * If the query is ALTER query, it will be passed ot the query_alter.class.php. + * So this method can't be used. It is here for safety. + * + * @access private */ - private function _handle_alter_query(){ + private function handle_alter_query(){ require_once PDODIR . 'query_alter.class.php'; $engine = new AlterQuery(); $this->_query = $engine->rewrite_query($this->_query, 'alter'); @@ -219,10 +377,14 @@ class PDOSQLiteDriver { } /** - * handles DESCRIBE or DESC query - * this is required in the WordPress install process + * Method to handle DESCRIBE or DESC query. + * + * DESCRIBE is required for WordPress installation process. DESC is + * an alias for DESCRIBE, but it is not used in core WordPress. + * + * @access private */ - private function _handle_describe_query(){ + private function handle_describe_query(){ // $this->_query = "select 1=1"; $pattern = '/^\\s*(DESCRIBE|DESC)\\s*(.*)/i'; if (preg_match($pattern, $this->_query, $match)) { @@ -230,42 +392,69 @@ class PDOSQLiteDriver { $this->_query = "PRAGMA table_info($tablename)"; } } - /** + * Method to remove LIMIT clause from DELETE or UPDATE query. + * * The author of the original 'PDO for WordPress' says update method of wpdb * insists on adding LIMIT. But the newest version of WordPress doesn't do that. * Nevertheless some plugins use DELETE with LIMIT, UPDATE with LIMIT. - * We need to exclude sub query's LIMIT. + * We need to exclude sub query's LIMIT. And if SQLite is compiled with + * ENABLE_UPDATE_DELETE_LIMIT option, we don't remove it. + * + * @access private */ - private function _rewrite_limit_usage(){ + private function rewrite_limit_usage(){ + $_wpdb = new PDODB(); + $options = $_wpdb->get_results('PRAGMA compile_options'); + foreach ($options as $opt) { + if (stripos($opt->compile_option, 'ENABLE_UPDATE_DELETE_LIMIT') !== false) return; + } if (stripos($this->_query, '(select') === false) { $this->_query = preg_replace('/\\s*LIMIT\\s*[0-9]$/i', '', $this->_query); } } /** + * Method to remove ORDER BY clause from DELETE or UPDATE query. + * * SQLite compiled without SQLITE_ENABLE_UPDATE_DELETE_LIMIT option can't * execute UPDATE with ORDER BY, DELETE with GROUP BY. * We need to exclude sub query's GROUP BY. + * + * @access private */ - private function _rewrite_order_by_usage() { + private function rewrite_order_by_usage() { + $_wpdb = new PDODB(); + $options = $_wpdb->get_results('PRAGMA compile_options'); + foreach ($options as $opt) { + if (stripos($opt->compile_option, 'ENABLE_UPDATE_DELETE_LIMIT') !== false) return; + } if (stripos($this->_query, '(select') === false) { $this->_query = preg_replace('/\\s*ORDER\\s*BY\\s*.*$/i', '', $this->_query); } } - - private function _handle_truncate_query(){ + /** + * Method to handle TRUNCATE query. + * + * @access private + */ + private function handle_truncate_query(){ $pattern = '/TRUNCATE TABLE (.*)/im'; $this->_query = preg_replace($pattern, 'DELETE FROM $1', $this->_query); } /** - * rewrites use of Optimize queries in mysql for sqlite. - * table name is ignored. + * Method to handle OPTIMIZE query. + * + * Original query has the table names, but they are simply ignored. + * Table names are meaningless in SQLite. + * + * @access private */ - private function _rewrite_optimize(){ + private function rewrite_optimize(){ $this->_query ="VACUUM"; } - /** + * Method to rewrite day. + * * Jusitn Adie says: some wp UI interfaces (notably the post interface) * badly composes the day part of the date leading to problems in sqlite * sort ordering etc. @@ -273,110 +462,125 @@ class PDOSQLiteDriver { * I don't understand that... * * @return void + * @access private */ - private function _rewrite_badly_formed_dates(){ + private function rewrite_badly_formed_dates(){ $pattern = '/([12]\d{3,}-\d{2}-)(\d )/ims'; $this->_query = preg_replace($pattern, '${1}0$2', $this->_query); } - /** - * function to remove unsupported index hinting from mysql queries - * - * @return void - */ - private function _delete_index_hints(){ - $pattern = '/use\s+index\s*\(.*?\)/i'; - $this->_query = preg_replace($pattern, '', $this->_query); - } - - /** - * Justin Adie says: - * method to fix inconsistent use of quoted, unquoted etc date values in query function - * this is ironic, given the above rewrite badlyformed dates method - * examples - * where month(fieldname)=08 becomes month(fieldname)='8' - * where month(fieldname)='08' becomes month(fieldname)='8' - * - * I don't understand... + * Method to remove INDEX HINT. * * @return void + * @access private */ - private function _fix_date_quoting(){ - $pattern = '/(month|year|second|day|minute|hour|dayofmonth)\s*\((.*?)\)\s*=\s*["\']?(\d{1,4})[\'"]?\s*/ei'; - $this->_query = preg_replace($pattern, "'\\1(\\2)=\'' . intval('\\3') . '\' ' ", $this->_query); + private function delete_index_hints(){ + $pattern = '/\\s*(use|ignore|force)\\s+index\\s*\(.*?\)/i'; + $this->_query = preg_replace($pattern, '', $this->_query); } - - private function _rewrite_regexp(){ + /** + * Method to fix the date string and quoting. + * + * This is required for the calendar widget. + * + * WHERE month(fieldname)=08 is converted to month(fieldname)='8' + * WHERE month(fieldname)='08' is converted to month(fieldname)='8' + * + * I use preg_replace_callback instead of 'e' option because of security reason. + * cf. PHP manual (regular expression) + * + * @return void + * @access private + */ + private function fix_date_quoting() { + $pattern = '/(month|year|second|day|minute|hour|dayofmonth)\\s*\((.*?)\)\\s*=\\s*["\']?(\d{1,4})[\'"]?\\s*/im'; + $this->_query = preg_replace_callback($pattern, array($this, '_fix_date_quoting'), $this->_query); + } + /** + * Call back method to rewrite date string. + * + * @param string $match + * @return string + * @access private + */ + private function _fix_date_quoting($match) { + $fixed_val = "{$match[1]}({$match[2]})='" . intval($match[3]) . "' "; + return $fixed_val; + } + /** + * Method to rewrite REGEXP() function. + * + * This method changes function name to regexpp() and pass it to the user defined + * function. + * + * @access private + */ + private function rewrite_regexp(){ $pattern = '/\s([^\s]*)\s*regexp\s*(\'.*?\')/im'; $this->_query = preg_replace($pattern, ' regexpp(\1, \2)', $this->_query); } - /** - * rewrites boolean to numeral - * SQLite doesn't support true/false type + * Method to rewrite boolean to number. + * + * SQLite doesn't support true/false type, so we need to convert them to 1/0. + * + * Obsolite since 1.5.1 + * + * @access private */ - private function _rewrite_boolean() { + private function rewrite_boolean() { $query = str_ireplace('TRUE', "1", $this->_query); $query = str_ireplace('FALSE', "0", $query); $this->_query = $query; } - /** - * method to execute SHOW COLUMNS query + * Method to handl SHOW COLUMN query. + * + * @access private */ - private function _handle_show_columns_query() { + private function handle_show_columns_query() { + $this->_query = str_ireplace(' FULL', '', $this->_query); $pattern_like = '/^\\s*SHOW\\s*(COLUMNS|FIELDS)\\s*FROM\\s*(.*)?\\s*LIKE\\s*(.*)?/i'; - $pattern = '/^\\s*SHOW\\s*(COLUMNS|FIELDS)\\s*FROM\\s*(.*)?/i'; + $pattern = '/^\\s*SHOW\\s*(COLUMNS|FIELDS)\\s*FROM\\s*(.*)?/i'; if (preg_match($pattern_like, $this->_query, $matches)) { - $table_name = str_replace("'", "", trim($matches[2])); - $column_name = str_replace("'", "", trim($matches[3])); + $table_name = str_replace("'", "", trim($matches[2])); + $column_name = str_replace("'", "", trim($matches[3])); $query_string = "SELECT sql FROM sqlite_master WHERE tbl_name='$table_name' AND sql LIKE '%$column_name%'"; $this->_query = $query_string; } elseif (preg_match($pattern, $this->_query, $matches)) { - $table_name = $matches[2]; + $table_name = $matches[2]; $query_string = preg_replace($pattern, "PRAGMA table_info($table_name)", $this->_query); $this->_query = $query_string; } } - /** - * method to execute SHOW INDEX query + * Method to handle SHOW INDEX query. + * + * Moved the WHERE clause manipulation to pdoengin.class.php (ver 1.3.1) + * + * @access private */ - private function _handle_show_index() { - $_columns = array(// No, you'll get no meaningful information.. - 'Key_name' => 'name', - ); - $pattern_0 = '/^\\s*SHOW\\s*(?:INDEX|INDEXES|KEYS)\\s*FROM\\s*(\\w+)?\\s*WHERE\\s*(.*)$/im'; - $pattern_1 = '/^\\s*SHOW\\s*(?:INDEX|INDEXES|KEYS)\\s*FROM\\s*(\\w+)?/im'; - if (preg_match($pattern_0, $this->_query, $match_0)) { - $table_name = str_replace("'", '', $match_0[1]); - list($key, $value) = explode('=', $match_0[2]); - $key = trim($key); - $value = preg_replace("/[\';]/", '', $value); - $value = trim($value); - if (array_key_exists($key, $_columns)) { - $key = $_columns[$key]; - $where_clause = 'AND ' . $key . ' LIKE ' . "'" . $value . "%'"; - } else { - $where_clause = ''; - } - $this->_query = "SELECT * FROM sqlite_master WHERE tbl_name='$table_name' $where_clause"; - } elseif (preg_match($pattern_1, $this->_query, $match_1)) { - $table_name = preg_replace("/[\';]/", '', $match_1[1]); - $table_name = trim($table_name); + private function handle_show_index() { + $pattern = '/^\\s*SHOW\\s*(?:INDEX|INDEXES|KEYS)\\s*FROM\\s*(\\w+)?/im'; + if (preg_match($pattern, $this->_query, $match)) { + $table_name = preg_replace("/[\';]/", '', $match[1]); + $table_name = trim($table_name); $this->_query = "SELECT * FROM sqlite_master WHERE tbl_name='$table_name'"; } } - /** - * function to rewrite ON DUPLICATE KEY UPDATE statement - * I use SELECT query and check if INSERT is allowed or not - * Rewriting procedure looks like a detour, but I've got another way. + * Method to handle ON DUPLICATE KEY UPDATE statement. + * + * First we use SELECT query and check if INSERT is allowed or not. + * Rewriting procedure looks like a detour, but I've got no other ways. + * + * Added the literal check since the version 1.5.1. * * @return void + * @access private */ - private function _execute_duplicate_key_update() { - $update = false; + private function execute_duplicate_key_update() { + if (!$this->rewrite_duplicate_key) return; $unique_keys_for_cond = array(); $unique_keys_for_check = array(); $pattern = '/^\\s*INSERT\\s*INTO\\s*(\\w+)?\\s*(.*)\\s*ON\\s*DUPLICATE\\s*KEY\\s*UPDATE\\s*(.*)$/ims'; @@ -402,14 +606,14 @@ class PDOSQLiteDriver { $unique_keys_for_check = array_map('trim', $unique_keys_for_check); } else { // Without unique key or primary key, UPDATE statement will affect all the rows! - $query = 'INSERT INTO '.$table_name.' '.$insert_data; + $query = 'INSERT INTO '.$table_name.' '.$insert_data; $this->_query = $query; $_wpdb = null; return; } // data check - if (preg_match('/^\((.*)\)\\s*VALUES\\s*\((.*)\)$/im', $insert_data, $match_1)) { - $col_array = explode(',', $match_1[1]); + if (preg_match('/^\((.*)\)\\s*VALUES\\s*\((.*)\)$/ims', $insert_data, $match_1)) { + $col_array = explode(',', $match_1[1]); $ins_data_array = explode(',', $match_1[2]); foreach ($col_array as $col) { $val = trim(array_shift($ins_data_array)); @@ -420,7 +624,7 @@ class PDOSQLiteDriver { foreach ($unique_keys_for_cond as $unique_key) { if (strpos($unique_key, ',') !== false) { $unique_key_array = explode(',', $unique_key); - $counter = count($unique_key_array); + $counter = count($unique_key_array); for ($i = 0; $i < $counter; ++$i) { $col = trim($unique_key_array[$i]); if (isset($ins_data_assoc[$col]) && $i == $counter - 1) { @@ -441,9 +645,9 @@ class PDOSQLiteDriver { } } } - $condition = rtrim($condition, ' OR '); + $condition = rtrim($condition, ' OR '); $test_query = "SELECT * FROM {$table_name} WHERE {$condition}"; - $results = $_wpdb->query($test_query); + $results = $_wpdb->query($test_query); $_wpdb = null; if ($results == 0) { $this->_query = 'INSERT INTO '.$table_name.' '.$insert_data; @@ -453,7 +657,7 @@ class PDOSQLiteDriver { if (preg_match('/^\((.*)\)\\s*VALUES\\s*\((.*)\)$/im', $insert_data, $match_2)) { $col_array = explode(',', $match_2[1]); $ins_array = explode(',', $match_2[2]); - $count = count($col_array); + $count = count($col_array); for ($i = 0; $i < $count; $i++) { $col = trim($col_array[$i]); $val = trim($ins_array[$i]); @@ -463,17 +667,17 @@ class PDOSQLiteDriver { // change col = data, col = data to array(col=>data, col=>data) // some plugins have semi-colon at the end of the query $update_data = rtrim($update_data, ';'); - $tmp_array = explode(',', $update_data); + $tmp_array = explode(',', $update_data); foreach ($tmp_array as $pair) { list($col, $value) = explode('=', $pair); - $col = trim($col); + $col = trim($col); $value = trim($value); $update_array_assoc[$col] = $value; } // change array(col=>values(col)) to array(col=>data) foreach ($update_array_assoc as $key => &$value) { if (preg_match('/^VALUES\\s*\((.*)\)$/im', $value, $match_3)) { - $col = trim($match_3[1]); + $col = trim($match_3[1]); $value = $ins_array_assoc[$col]; } } @@ -491,36 +695,72 @@ class PDOSQLiteDriver { } } $update_strings = rtrim($update_strings, ','); - $unique_where = array_unique($where_array, SORT_REGULAR); - $where_string = ' WHERE ' . implode(' AND ', $unique_where); + $unique_where = array_unique($where_array, SORT_REGULAR); + $where_string = ' WHERE ' . implode(' AND ', $unique_where); // $where_string = ' WHERE ' . rtrim($where_string, ','); $update_query = 'UPDATE ' . $table_name . ' SET ' . $update_strings . $where_string; $this->_query = $update_query; } } - } else { - // wordaround... - $pattern = '/ ON DUPLICATE KEY UPDATE.*$/im'; - $replace_query = preg_replace($pattern, '', $this->_query); - $replace_query = str_ireplace('INSERT ', 'INSERT OR REPLACE ', $replace_query); - $this->_query = $replace_query; } +// else { +// $pattern = '/ ON DUPLICATE KEY UPDATE.*$/im'; +// $replace_query = preg_replace($pattern, '', $this->_query); +// $replace_query = str_ireplace('INSERT ', 'INSERT OR REPLACE ', $replace_query); +// $this->_query = $replace_query; +// } } - /** - * workaround function to avoid DELETE with JOIN + * Method to rewrite BETWEEN A AND B clause. + * + * This clause is the same form as natural language, so we have to check if it is + * in the data or SQL statement. + * + * @access private + */ + private function rewrite_between() { + if (!$this->rewrite_between) return; + $pattern = '/\\s*(CAST\(.+?\)|[^\\s\(]*)?\\s*BETWEEN\\s*([^\\s]*)?\\s*AND\\s*([^\\s\)]*)?\\s*/ims'; + if (preg_match($pattern, $this->_query, $match)) { + $column_name = trim($match[1]); + $min_value = trim($match[2]); + $max_value = trim($match[3]); + $max_value = rtrim($max_value); + $replacement = " $column_name >= $min_value AND $column_name <= $max_value"; + $this->_query = str_ireplace($match[0], $replacement, $this->_query); + } + } + /** + * Method to avoid DELETE with JOIN statement. + * * wp-admin/includes/upgrade.php contains 'DELETE ... JOIN' statement. * This query can't be replaced with regular expression or udf, so we - * replace all the statement with another. + * replace all the statement with another. But this query was used in + * the very old version of WordPress when it was upgraded. So we won't + * have no chance that this method should be used. + * + * @access private */ - private function _delete_workaround() { + private function delete_workaround() { global $wpdb; // $pattern = "DELETE o1 FROM $wpdb->options AS o1 JOIN $wpdb->options AS o2 USING (option_name) WHERE o2.option_id > o1.option_id"; - $pattern = "DELETE o1 FROM $wpdb->options AS o1 JOIN $wpdb->options AS o2"; + $pattern = "DELETE o1 FROM $wpdb->options AS o1 JOIN $wpdb->options AS o2"; $rewritten = "DELETE FROM $wpdb->options WHERE option_id IN (SELECT MIN(option_id) FROM $wpdb->options GROUP BY option_name HAVING COUNT(*) > 1)"; if (stripos($this->_query, $pattern) !== false) { $this->_query = $rewritten; } } + /** + * Method to suppress errors. + * + * When the query string is the one that this class can't manipulate, + * the query string is replaced with the one that always returns true + * and does nothing. + * + * @access private + */ + private function return_true() { + $this->_query = 'SELECT 1=1'; + } } ?> \ No newline at end of file diff --git a/query_alter.class.php b/query_alter.class.php index 5061546..933183c 100644 --- a/query_alter.class.php +++ b/query_alter.class.php @@ -1,170 +1,219 @@ split_multiple($command); - foreach ($command_array as $single_command) { - $command_tokens = $this->command_tokenizer($single_command); - if (!empty($command_tokens)) { - $tokens[] = array_merge($tmp_tokens, $command_tokens); - } else { - $this->_query = 'SELECT 1=1'; - } +// $command_array = $this->split_multiple($command); + $command_array = explode(',', $command); + + $single_command = array_shift($command_array); + if (!empty($command_array)) { + $re_command = 'ALTER TABLE ' . $tmp_tokens['table_name'] . ' '; + $re_command .= implode(',', $command_array); + } + $command_tokens = $this->command_tokenizer($single_command); + if (!empty($command_tokens)) { + $tokens = array_merge($tmp_tokens, $command_tokens); + } else { + $this->_query = 'SELECT 1=1'; + return $this->_query; } - foreach ($tokens as $token) { - $command_name = $token['command']; - switch ($command_name) { - case 'add column': case 'rename to': case 'add index': case 'drop index': - $this->_query = $this->handle_single_command($token); - break; - case 'add primary key': - $this->_query = $this->handle_add_primary_key($token); - break; - case 'drop primary key': - $this->_query = $this->handle_drop_primary_key($token); - break; - case 'modify column': - $this->_query = $this->handle_modify_command($token); - break; - case 'change column': - $this->_query = $this->handle_change_command($token); - break; - case 'alter column': - $this->_query = $this->handle_alter_command($token); - break; - default: - break; +// foreach ($tokens as $token) { + $command_name = strtolower($tokens['command']); + switch ($command_name) { + case 'add column': case 'rename to': case 'add index': case 'drop index': + $tmp_query = $this->handle_single_command($tokens); + break; + case 'add primary key': + $tmp_query = $this->handle_add_primary_key($tokens); + break; + case 'drop primary key': + $tmp_query = $this->handle_drop_primary_key($tokens); + break; + case 'modify column': + $tmp_query = $this->handle_modify_command($tokens); + break; + case 'change column': + $tmp_query = $this->handle_change_command($tokens); + break; + case 'alter column': + $tmp_query = $this->handle_alter_command($tokens); + break; + default: + break; } - } +// } + if (!is_array($tmp_query)) { + $this->_query[] = $tmp_query; + } else { + $this->_query = $tmp_query; + } + if ($re_command != '') { + $this->_query = array_merge($this->_query, array('recursion' => $re_command)); + } } else { $this->_query = 'SELECT 1=1'; } return $this->_query; } - + /** + * Function to analyze ALTER TABLE command and sets the data to an array. + * + * @param string $command + * @return boolean|array + * @access private + */ private function command_tokenizer($command) { $tokens = array(); - if (preg_match('/^(ADD|DROP|RENAME|MODIFY|CHANGE|ALTER)\\s*(\\w+)?\\s*(\\w+)?\\s*/ims', $command, $match)) { + if (preg_match('/^(ADD|DROP|RENAME|MODIFY|CHANGE|ALTER)\\s*(\\w+)?\\s*(\\w+(\(.+\)|))?\\s*/ims', $command, $match)) { $the_rest = str_ireplace($match[0], '', $command); - $match_1 = strtolower(trim($match[1])); - $match_2 = strtolower(trim($match[2])); - $match_3 = isset($match[3]) ? strtolower(trim($match[3])) : ''; - switch ($match_1) { + $match_1 = trim($match[1]); + $match_2 = trim($match[2]); + $match_3 = isset($match[3]) ? trim($match[3]) : ''; + switch (strtolower($match_1)) { case 'add': - if (in_array($match_2, array('fulltext', 'constraint', 'foreign'))) { + if (in_array(strtolower($match_2), array('fulltext', 'constraint', 'foreign'))) { break; - } elseif ($match_2 == 'column') { - $tokens['command'] = $match_1.' '.$match_2; + } elseif (stripos('column', $match_2) !== false) { + $tokens['command'] = $match_1.' '.$match_2; $tokens['column_name'] = $match_3; - $tokens['column_def'] = trim($the_rest); - } elseif ($match_2 == 'primary') { - $tokens['command'] = $match_1.' '.$match_2.' '.$match_3; + $tokens['column_def'] = trim($the_rest); + } elseif (stripos('primary', $match_2) !== false) { + $tokens['command'] = $match_1.' '.$match_2.' '.$match_3; $tokens['column_name'] = $the_rest; - } elseif ($match_2 == 'unique') { + } elseif (stripos('unique', $match_2) !== false) { list($index_name, $col_name) = preg_split('/[\(\)]/s', trim($the_rest), -1, PREG_SPLIT_DELIM_CAPTURE); - $tokens['unique'] = true; - $tokens['command'] = $match_1.' '.$match_3; - $tokens['index_name'] = trim($index_name); + $tokens['unique'] = true; + $tokens['command'] = $match_1.' '.$match_3; + $tokens['index_name'] = trim($index_name); $tokens['column_name'] = '('.trim($col_name).')'; - } elseif (in_array($match_2, array('index', 'key'))) { + } elseif (in_array(strtolower($match_2), array('index', 'key'))) { $tokens['command'] = $match_1.' '.$match_2; - $tokens['index_name'] = $match_3; + if ($match_3 == '') { + $tokens['index_name'] = str_replace(array('(', ')'), '', $the_rest); + } else { + $tokens['index_name'] = $match_3; + } $tokens['column_name'] = trim($the_rest); } else { - $tokens['command'] = $match_1.' column'; + $tokens['command'] = $match_1.' COLUMN'; $tokens['column_name'] = $match_2; - $tokens['column_def'] = $match_3.' '.$the_rest; + $tokens['column_def'] = $match_3.' '.$the_rest; } break; case 'drop': - if ($match_2 == 'column') { - $tokens['command'] = $match_1.' '.$match_2; + if (stripos('column', $match_2) !== false) { + $tokens['command'] = $match_1.' '.$match_2; $tokens['column_name'] = trim($match_3); - } elseif ($match_2 == 'primary') { + } elseif (stripos('primary', $match_2) !== false) { $tokens['command'] = $match_1.' '.$match_2.' '.$match_3; - } elseif (in_array($match_2, array('index', 'key'))) { - $tokens['command'] = $match_1.' '.$match_2; + } elseif (in_array(strtolower($match_2), array('index', 'key'))) { + $tokens['command'] = $match_1.' '.$match_2; $tokens['index_name'] = $match_3; - } elseif ($match_2 == 'primary') { + } elseif (stripos('primary', $match_2) !== false) { $tokens['command'] = $match_1.' '.$match_2.' '.$match_3; } else { - $tokens['command'] = $match_1.' column'; + $tokens['command'] = $match_1.' COLUMN'; $tokens['column_name'] = $match_2; } break; case 'rename': - if ($match_2 == 'to') { - $tokens['command'] = $match_1.' '.$match_2; + if (stripos('to', $match_2) !== false) { + $tokens['command'] = $match_1.' '.$match_2; $tokens['column_name'] = $match_3; } else { - $tokens['command'] = $match_1.' to'; + $tokens['command'] = $match_1.' TO'; $tokens['column_name'] = $match_2; } break; case 'modify': - if ($match_2 == 'column') { - $tokens['command'] = $match_1.' '.$match_2; + if (stripos('column', $match_2) !== false) { + $tokens['command'] = $match_1.' '.$match_2; $tokens['column_name'] = $match_3; - $tokens['column_def'] = trim($the_rest); + $tokens['column_def'] = trim($the_rest); } else { - $tokens['command'] = $match_1.' column'; + $tokens['command'] = $match_1.' COLUMN'; $tokens['column_name'] = $match_2; - $tokens['column_def'] = $match_3.' '.trim($the_rest); + $tokens['column_def'] = $match_3.' '.trim($the_rest); } break; case 'change': - if ($match_2 == 'column') { - $tokens['command'] = $match_1.' '.$match_2; + $the_rest = trim($the_rest); + if (stripos('column', $match_2) !== false) { + $tokens['command'] = $match_1.' '.$match_2; $tokens['old_column'] = $match_3; - list($new_col) = preg_split('/\s/s', trim($the_rest), -1, PREG_SPLIT_DELIM_CAPTURE); - $tokens['new_column'] = $new_col; - $col_def = str_ireplace($new_col, '', $the_rest); - $tokens['column_def'] = trim($col_def); + list($new_col) = explode(' ', $the_rest); + $tmp_col = preg_replace('/\(.+?\)/im', '', $new_col); + if (array_key_exists(strtolower($tmp_col), $this->array_types)) { + $tokens['column_def'] = $the_rest; + } else { + $tokens['new_column'] = $new_col; + $col_def = str_replace($new_col, '', $the_rest); + $tokens['column_def'] = trim($col_def); + } } else { - $tokens['command'] = $match_1.' column'; + $tokens['command'] = $match_1.' column'; $tokens['old_column'] = $match_2; - $tokens['new_column'] = $match_3; - $tokens['column_def'] = trim($the_rest); + $tmp_col = preg_replace('/\(.+?\)/im', '', $match_3); + if (array_key_exists(strtolower($tmp_col), $this->array_types)) { + $tokens['column_def'] = $match_3 . ' ' . $the_rest; + } else { + $tokens['new_column'] = $match_3; + $tokens['column_def'] = $the_rest; + } } break; case 'alter': - if ($match_2 == 'column') { - $tokens['command'] = $match_1.' '.$match_2; + if (stripos('column', $match_2) !== false) { + $tokens['command'] = $match_1.' '.$match_2; $tokens['column_name'] = $match_3; - list($set_or_drop) = explode(' ', $the_rest); - if ($set_or_drop == 'set') { - $tokens['default_command'] = 'set default'; - $default_value = str_ireplace('set default', '', $the_rest); - $tokens['default_value'] = trim($default_value); + list($set_or_drop) = explode(' ', $the_rest); + if (stripos('set', $set_or_drop) !== false) { + $tokens['default_command'] = 'SET DEFAULT'; + $default_value = str_ireplace('set default', '', $the_rest); + $tokens['default_value'] = trim($default_value); } else { - $tokens['default_command'] = 'drop default'; + $tokens['default_command'] = 'DROP DEFAULT'; } } else { - $tokens['command'] = $match_1.' column'; + $tokens['command'] = $match_1.' COLUMN'; $tokens['column_name'] = $match_2; - if ($match_3 == 'set') { - $tokens['default_command'] = 'set default'; - $default_value = str_ireplace('default', '', $the_rest); - $tokens['default_value'] = trim($default_value); + if (stripos('set', $match_3) !== false) { + $tokens['default_command'] = 'SET DEFAULT'; + $default_value = str_ireplace('default', '', $the_rest); + $tokens['default_value'] = trim($default_value); } else { - $tokens['default_command'] = 'drop default'; + $tokens['default_command'] = 'DROP DEFAULT'; } } break; @@ -174,12 +223,20 @@ class AlterQuery { return $tokens; } } - + /** + * Function to split multiple commands into an array and return it. + * + * This function is deprecated. + * + * @access private + * @param unknown $command + * @return multitype:string unknown Ambigous + */ private function split_multiple($command) { - $out = true; - $command_array = array(); + $out = true; + $command_array = array(); $command_string = ''; - $tokens = preg_split('/\b/s', $command, -1, PREG_SPLIT_DELIM_CAPTURE); + $tokens = preg_split('/\b/s', $command, -1, PREG_SPLIT_DELIM_CAPTURE); foreach ($tokens as $token) { switch (trim($token)) { case ';': @@ -194,13 +251,13 @@ class AlterQuery { break; case '),': $command_array[] = $command_string; - $command_string = ''; + $command_string = ''; $out = true; break; case ',': if ($out) { $command_array[] = $command_string; - $command_string = ''; + $command_string = ''; } else { $command_string .= $token; } @@ -215,7 +272,13 @@ class AlterQuery { } return $command_array; } - + /** + * Function to handle single command. + * + * @access private + * @param array of string $queries + * @return string + */ private function handle_single_command($queries) { $tokenized_query = $queries; if (stripos($tokenized_query['command'], 'add column') !== false) { @@ -233,11 +296,17 @@ class AlterQuery { } return $query; } - + /** + * Function to handle ADD PRIMARY KEY. + * + * @access private + * @param array of string $queries + * @return array of string + */ private function handle_add_primary_key($queries) { $tokenized_query = $queries; - $tbl_name = $tokenized_query['table_name']; - $temp_table = 'temp_'.$tokenized_query['table_name']; + $tbl_name = $tokenized_query['table_name']; + $temp_table = 'temp_'.$tokenized_query['table_name']; $_wpdb = new PDODB(); $query_obj = $_wpdb->get_results("SELECT sql FROM sqlite_master WHERE tbl_name='$tbl_name'"); $_wpdb = null; @@ -257,10 +326,16 @@ class AlterQuery { } return $query; } - + /** + * Function to handle DROP PRIMARY KEY. + * + * @access private + * @param array of string $queries + * @return array of string + */ private function handle_drop_primary_key($queries) { $tokenized_query = $queries; - $temp_table = 'temp_'.$tokenized_query['table_name']; + $temp_table = 'temp_'.$tokenized_query['table_name']; $_wpdb = new PDODB(); $query_obj = $_wpdb->get_results("SELECT sql FROM sqlite_master WHERE tbl_name='{$tokenized_query['table_name']}'"); $_wpdb = null; @@ -268,28 +343,34 @@ class AlterQuery { $index_queries[$i] = $query_obj[$i]->sql; } $table_query = array_shift($index_queries); - $pattern1 = '/^\\s*PRIMARY\\s*KEY\\s*\(.*\)/im'; - $pattern2 = '/^\\s*.*(PRIMARY\\s*KEY\\s*(:?AUTOINCREMENT|))\\s*(?!\()/im'; + $pattern1 = '/^\\s*PRIMARY\\s*KEY\\s*\(.*\)/im'; + $pattern2 = '/^\\s*.*(PRIMARY\\s*KEY\\s*(:?AUTOINCREMENT|))\\s*(?!\()/im'; if (preg_match($pattern1, $table_query, $match)) { $table_query = str_replace($match[0], '', $table_query); } elseif (preg_match($pattern2, $table_query, $match)) { $table_query = str_replace($match[1], '', $table_query); } $table_query = str_replace($tokenized_query['table_name'], $temp_table, $table_query); - $query[] = $table_query; - $query[] = "INSERT INTO $temp_table SELECT * FROM {$tokenized_query['table_name']}"; - $query[] = "DROP TABLE IF EXISTS {$tokenized_query['table_name']}"; - $query[] = "ALTER TABLE $temp_table RENAME TO {$tokenized_query['table_name']}"; + $query[] = $table_query; + $query[] = "INSERT INTO $temp_table SELECT * FROM {$tokenized_query['table_name']}"; + $query[] = "DROP TABLE IF EXISTS {$tokenized_query['table_name']}"; + $query[] = "ALTER TABLE $temp_table RENAME TO {$tokenized_query['table_name']}"; foreach ($index_queries as $index) { $query[] = $index; } return $query; } - + /** + * Function to handle MODIFY COLUMN. + * + * @access private + * @param array of string $queries + * @return string|array of string + */ private function handle_modify_command($queries) { $tokenized_query = $queries; - $temp_table = 'temp_'.$tokenized_query['table_name']; - $column_def = $this->convert_field_types($tokenized_query['column_name'], $tokenized_query['column_def']); + $temp_table = 'temp_'.$tokenized_query['table_name']; + $column_def = $this->convert_field_types($tokenized_query['column_name'], $tokenized_query['column_def']); $_wpdb = new PDODB(); $query_obj = $_wpdb->get_results("SELECT sql FROM sqlite_master WHERE tbl_name='{$tokenized_query['table_name']}'"); $_wpdb = null; @@ -299,14 +380,14 @@ class AlterQuery { $create_query = array_shift($index_queries); if (stripos($create_query, $tokenized_query['column_name']) === false) { return 'SELECT 1=1'; - } elseif (preg_match("/{$tokenized_query['column_name']}\\s*{$tokenized_query['column_def']}\\s*[,)]/i", $create_query)) { + } elseif (preg_match("/{$tokenized_query['column_name']}\\s*{$column_def}\\s*[,)]/i", $create_query)) { return 'SELECT 1=1'; } $create_query = preg_replace("/{$tokenized_query['table_name']}/i", $temp_table, $create_query); if (preg_match("/\\b{$tokenized_query['column_name']}\\s*.*(?=,)/ims", $create_query)) { - $create_query = preg_replace("/\\b{$tokenized_query['column_name']}\\s*.*(?=,)/ims", "{$tokenized_query['column_name']} {$tokenized_query['column_def']}", $create_query); + $create_query = preg_replace("/\\b{$tokenized_query['column_name']}\\s*.*(?=,)/ims", "{$tokenized_query['column_name']} {$column_def}", $create_query); } elseif (preg_match("/\\b{$tokenized_query['column_name']}\\s*.*(?=\))/ims", $create_query)) { - $create_query = preg_replace("/\\b{$tokenized_query['column_name']}\\s*.*(?=\))/ims", "{$tokenized_query['column_name']} {$tokenized_query['column_def']}", $create_query); + $create_query = preg_replace("/\\b{$tokenized_query['column_name']}\\s*.*(?=\))/ims", "{$tokenized_query['column_name']} {$column_def}", $create_query); } $query[] = $create_query; $query[] = "INSERT INTO $temp_table SELECT * FROM {$tokenized_query['table_name']}"; @@ -317,18 +398,29 @@ class AlterQuery { } return $query; } - + /** + * Function to handle CHANGE COLUMN. + * + * @access private + * @param array of string $queries + * @return string|array of string + */ private function handle_change_command($queries) { - $col_check = false; - $old_fields = ''; - $new_fields = ''; + $col_check = false; + $old_fields = ''; + $new_fields = ''; $tokenized_query = $queries; - $temp_table = 'temp_'.$tokenized_query['table_name']; - $column_def = $this->convert_field_types($tokenized_query['new_column'], $tokenized_query['column_def']); + $temp_table = 'temp_'.$tokenized_query['table_name']; + if (isset($tokenized_query['new_column'])) { + $column_name = $tokenized_query['new_column']; + } else { + $column_name = $tokenized_query['old_column']; + } + $column_def = $this->convert_field_types($column_name, $tokenized_query['column_def']); $_wpdb = new PDODB(); $col_obj = $_wpdb->get_results("SHOW COLUMNS FROM {$tokenized_query['table_name']}"); foreach ($col_obj as $col) { - if ($col->Field == $tokenized_query['old_column']) $col_check = true; + if (stripos($col->Field, $tokenized_query['old_column']) !== false) $col_check = true; $old_fields .= $col->Field . ','; } if ($col_check == false) { @@ -336,8 +428,8 @@ class AlterQuery { return 'SELECT 1=1'; } $old_fields = rtrim($old_fields, ','); - $new_fields = str_replace($tokenized_query['old_column'], $tokenized_query['new_column'], $old_fields); - $query_obj = $_wpdb->get_results("SELECT sql FROM sqlite_master WHERE tbl_name='{$tokenized_query['table_name']}'"); + $new_fields = str_ireplace($tokenized_query['old_column'], $column_name, $old_fields); + $query_obj = $_wpdb->get_results("SELECT sql FROM sqlite_master WHERE tbl_name='{$tokenized_query['table_name']}'"); $_wpdb = null; for ($i = 0; $i < count($query_obj); $i++) { $index_queries[$i] = $query_obj[$i]->sql; @@ -345,16 +437,16 @@ class AlterQuery { $create_query = array_shift($index_queries); $create_query = preg_replace("/{$tokenized_query['table_name']}/i", $temp_table, $create_query); if (preg_match("/\\b{$tokenized_query['old_column']}\\s*(.+?)(?=,)/ims", $create_query, $match)) { - if ($tokenized_query['column_def'] == trim($match[1])) { + if (stripos(trim($match[1]), $column_def) !== false) { return 'SELECT 1=1'; } else { - $create_query = preg_replace("/\\b{$tokenized_query['old_column']}\\s*.*?(?=,)/ims", "{$tokenized_query['new_column']} {$tokenized_query['column_def']}", $create_query); + $create_query = preg_replace("/\\b{$tokenized_query['old_column']}\\s*.+?(?=,)/ims", "{$column_name} {$column_def}", $create_query, 1); } } elseif (preg_match("/\\b{$tokenized_query['old_column']}\\s*(.+?)(?=\))/ims", $create_query, $match)) { - if ($tokenized_query['column_def'] == trim($match[1])) { + if (stripos(trim($match[1]), $column_def) !== false) { return 'SELECT 1=1'; } else { - $create_query = preg_replace("/\\b{$tokenized_query['old_column']}\\s*.*?(?=\))/ims", "{$tokenized_query['new_column']} {$tokenized_query['column_def']}", $create_query); + $create_query = preg_replace("/\\b{$tokenized_query['old_column']}\\s*.*(?=\))/ims", "{$column_name} {$column_def}", $create_query, 1); } } $query[] = $create_query; @@ -366,15 +458,21 @@ class AlterQuery { } return $query; } - + /** + * Function to handle ALTER COLUMN. + * + * @access private + * @param array of string $queries + * @return string|array of string + */ private function handle_alter_command($queries) { $tokenized_query = $queries; - $temp_table = 'temp_'.$tokenized_query['table_name']; - if (stripos($tokenized_query['default_command'], 'set') !== false) { + $temp_table = 'temp_'.$tokenized_query['table_name']; + if (isset($tokenized_query['default_value'])) { $def_value = $this->convert_field_types($tokenized_query['column_name'], $tokenized_query['default_value']); $def_value = 'DEFAULT '.$def_value; } else { - $def_value = ''; + $def_value = null; } $_wpdb = new PDODB(); $query_obj = $_wpdb->get_results("SELECT sql FROM sqlite_master WHERE tbl_name='{$tokenized_query['table_name']}'"); @@ -386,12 +484,34 @@ class AlterQuery { if (stripos($create_query, $tokenized_query['column_name']) === false) { return 'SELECT 1=1'; } - if (preg_match("/\\s*({$tokenized_query['column_name']}\\s*.*?)\\s*(DEFAULT\\s*.*)[,)]/im", $create_query, $match)) { - $col_def = trim($match[1]); - $old_default = trim($match[2]); - $create_query = preg_replace("/($col_def)\\s*$old_default/im", "\\1 $def_value", $create_query); + if (preg_match("/\\s*({$tokenized_query['column_name']})\\s*(.*)?(DEFAULT\\s*.*)[,)]/im", $create_query, $match)) { + $col_name = trim($match[1]); + $col_def = trim($match[2]); + $col_def_esc = str_replace(array('(', ')'), array('\(', '\)'), $col_def); + $checked_col_def = $this->convert_field_types($col_name, $col_def); + $old_default = trim($match[3]); + $pattern = "/$col_name\\s*$col_def_esc\\s*$old_default/im"; + if (is_null($def_value)) { + $replacement = $col_name . ' ' . $checked_col_def; + } else { + $replacement = $col_name . ' ' . $checked_col_def . ' ' . $def_value; + } + $create_query = preg_replace($pattern, $replacement, $create_query); $create_query = str_ireplace($tokenized_query['table_name'], $temp_table, $create_query); - } else { + } elseif (preg_match("/\\s*({$tokenized_query['column_name']})\\s*(.*)?[,)]/im", $create_query, $match)) { + $col_name = trim($match[1]); + $col_def = trim($match[2]); + $col_def_esc = str_replace(array('(', ')'), array('\(', '\)'), $col_def); + $checked_col_def = $this->convert_field_types($col_name, $col_def); + $pattern = "/$col_name\\s*$col_def_esc/im"; + if (is_null($def_value)) { + $replacement = $col_name . ' ' . $checked_col_def; + } else { + $replacement = $col_name . ' ' . $checked_col_def . ' ' . $def_value; + } + $create_query = preg_replace($pattern, $replacement, $create_query); + $create_query = str_ireplace($tokenized_query['table_name'], $temp_table, $create_query); + } else { return 'SELECT 1=1'; } $query[] = $create_query; @@ -404,35 +524,19 @@ class AlterQuery { return $query; } /** - * Change the field definition to SQLite compatible data type. + * Function to change the field definition to SQLite compatible data type. + * + * @access private * @param string $col_name * @param string $col_def * @return string */ private function convert_field_types($col_name, $col_def){ - $array_types = array( - 'bit' => 'INTEGER', 'bool' => 'INTEGER', - 'boolean' => 'INTEGER', 'tinyint' => 'INTEGER', - 'smallint' => 'INTEGER', 'mediumint' => 'INTEGER', - 'int' => 'INTEGER', 'integer' => 'INTEGER', - 'bigint' => 'INTEGER', 'float' => 'REAL', - 'double' => 'REAL', 'decimal' => 'REAL', - 'dec' => 'REAL', 'numeric' => 'REAL', - 'fixed' => 'REAL', 'date' => 'TEXT', - 'datetime' => 'TEXT', 'timestamp' => 'TEXT', - 'time' => 'TEXT', 'year' => 'TEXT', - 'char' => 'TEXT', 'varchar' => 'TEXT', - 'binary' => 'INTEGER', 'varbinary' => 'BLOB', - 'tinyblob' => 'BLOB', 'tinytext' => 'TEXT', - 'blob' => 'BLOB', 'text' => 'TEXT', - 'mediumblob' => 'BLOB', 'mediumtext' => 'TEXT', - 'longblob' => 'BLOB', 'longtext' => 'TEXT' - ); $array_curtime = array('current_timestamp', 'current_time', 'current_date'); $array_reptime = array("'0000-00-00 00:00:00'", "'0000-00-00 00:00:00'", "'0000-00-00'"); - $def_string = str_replace('`', '', $col_def); - foreach ($array_types as $o=>$r){ - $pattern = "/\\b" . $o . "\\s*(\([^\)]*\))?\\s*/imsx"; + $def_string = str_replace('`', '', $col_def); + foreach ($this->array_types as $o=>$r){ + $pattern = "/\\b$o\\s*(\([^\)]*\)*)?\\s*/ims"; if (preg_match($pattern, $def_string)) { $def_string = preg_replace($pattern, "$r ", $def_string); break; @@ -449,5 +553,29 @@ class AlterQuery { } return $def_string; } + /** + * Variable to store the data definition table. + * + * @access private + * @var associative array + */ + private $array_types = array( + 'bit' => 'INTEGER', 'bool' => 'INTEGER', + 'boolean' => 'INTEGER', 'tinyint' => 'INTEGER', + 'smallint' => 'INTEGER', 'mediumint' => 'INTEGER', + 'bigint' => 'INTEGER', 'integer' => 'INTEGER', + 'int' => 'INTEGER', 'float' => 'REAL', + 'double' => 'REAL', 'decimal' => 'REAL', + 'dec' => 'REAL', 'numeric' => 'REAL', + 'fixed' => 'REAL', 'datetime' => 'TEXT', + 'date' => 'TEXT', 'timestamp' => 'TEXT', + 'time' => 'TEXT', 'year' => 'TEXT', + 'varchar' => 'TEXT', 'char' => 'TEXT', + 'varbinary' => 'BLOB', 'binary' => 'BLOB', + 'tinyblob' => 'BLOB', 'mediumblob' => 'BLOB', + 'longblob' => 'BLOB', 'blob' => 'BLOB', + 'tinytext' => 'TEXT', 'mediumtext' => 'TEXT', + 'longtext' => 'TEXT', 'text' => 'TEXT' + ); } ?> \ No newline at end of file diff --git a/query_create.class.php b/query_create.class.php index 6e41e2c..2a37ad5 100644 --- a/query_create.class.php +++ b/query_create.class.php @@ -1,36 +1,74 @@ _query = $query; + $this->_query = $query; $this->_errors [] = ''; if (preg_match('/^CREATE\\s*(UNIQUE|FULLTEXT|)\\s*INDEX/ims', $this->_query, $match)) { + // we manipulate CREATE INDEX query in PDOEngine.class.php + // FULLTEXT index creation is simply ignored. if (isset($match[1]) && stripos($match[1], 'fulltext') !== false) { return 'SELECT 1=1'; } else { return $this->_query; } + } elseif (preg_match('/^CREATE\\s*(TEMP|TEMPORARY|)\\s*TRIGGER\\s*/im', $this->_query)) { + // if WordPress comes to use foreign key constraint, trigger will be needed. + // we don't use it for now. + return $this->_query; } $this->strip_backticks(); $this->get_table_name(); @@ -41,6 +79,7 @@ class CreateQuery{ $this->rewrite_unsigned(); $this->rewrite_autoincrement(); $this->rewrite_primary_key(); + $this->rewrite_foreign_key(); $this->rewrite_unique_key(); $this->rewrite_enum(); $this->rewrite_set(); @@ -49,11 +88,13 @@ class CreateQuery{ return $this->post_process(); } - /** - * Method for getting the table name from the create query. - * taken from PDO for WordPress - * we don't need 'IF NOT EXISTS', so we changed the pattern. + * Method to get table name from the query string. + * + * 'IF NOT EXISTS' clause is removed for the easy regular expression usage. + * It will be added at the end of the process. + * + * @access private */ private function get_table_name(){ // $pattern = '/^\\s*CREATE\\s*(TEMP|TEMPORARY)?\\s*TABLE\\s*(IF NOT EXISTS)?\\s*([^\(]*)/imsx'; @@ -62,9 +103,12 @@ class CreateQuery{ $this->table_name = trim($matches[1]); } } - /** - * Method for changing the field type to SQLite compatible type. + * Method to change the MySQL field types to SQLite compatible types. + * + * Order of the key value is important. Don't change it. + * + * @access private */ private function rewrite_field_types(){ $array_types = array ( @@ -86,37 +130,52 @@ class CreateQuery{ 'longblob' => 'blob', 'longtext' => 'text' ); foreach ($array_types as $o=>$r){ - $pattern = '/\\b(?_query = preg_replace($pattern, " $r ", $this->_query); + $pattern = "/\\b(?_query)) { + ; + } else { + $this->_query = preg_replace($pattern, " $r ", $this->_query); + } } } - /** - * Method for stripping the comments from the SQL statement + * Method for stripping the comments from the SQL statement. + * + * @access private */ private function rewrite_comments(){ $this->_query = preg_replace("/# --------------------------------------------------------/","-- ******************************************************",$this->_query); $this->_query = preg_replace("/#/","--",$this->_query); } - /** - * Method for stripping the engine and other stuffs + * Method for stripping the engine and other stuffs. + * + * TYPE, ENGINE and AUTO_INCREMENT are removed here. + * @access private */ private function rewrite_engine_info(){ $this->_query = preg_replace("/\\s*(TYPE|ENGINE)\\s*=\\s*.*(?_query); $this->_query = preg_replace("/ AUTO_INCREMENT\\s*=\\s*[0-9]*/ims",'',$this->_query); } - /** - * Method for stripping unsigned + * Method for stripping unsigned. + * + * SQLite doesn't have unsigned int data type. So UNSIGNED INT(EGER) is converted + * to INTEGER here. + * + * @access private */ private function rewrite_unsigned(){ $this->_query = preg_replace('/\\bunsigned\\b/ims', ' ', $this->_query); } - /** - * Method for rewriting auto_increment - * if the field type is 'integer primary key', it is automatically autoincremented + * Method for rewriting primary key auto_increment. + * + * If the field type is 'INTEGER PRIMARY KEY', it is automatically autoincremented + * by SQLite. There's a little difference between PRIMARY KEY and AUTOINCREMENT, so + * we may well convert to PRIMARY KEY only. + * + * @access private */ private function rewrite_autoincrement(){ $this->_query = preg_replace('/\\bauto_increment\\s*primary\\s*key\\s*(,)?/ims', ' PRIMARY KEY AUTOINCREMENT \\1', $this->_query, -1, $count); @@ -125,34 +184,53 @@ class CreateQuery{ $this->has_primary_key = true; } } - /** - * Method for rewriting primary key + * Method for rewriting primary key. + * + * @access private */ private function rewrite_primary_key(){ if ($this->has_primary_key) { - $this->_query = preg_replace('/\\bprimary key\\s*\([^\)]*\)/ims', ' ', $this->_query); + $this->_query = preg_replace('/\\s*primary key\\s*.*?\([^\)]*\)\\s*(,|)/i', ' ', $this->_query); } else { // If primary key has an index name, we remove that name. $this->_query = preg_replace('/\\bprimary\\s*key\\s*.*?\\s*(\(.*?\))/im', 'PRIMARY KEY \\1', $this->_query); } } - + /** + * Method for rewriting foreign key. + * + * @access private + */ + private function rewrite_foreign_key() { + $pattern = '/\\s*foreign\\s*key\\s*(|.*?)\([^\)]+?\)\\s*references\\s*.*/i'; + if (preg_match_all($pattern, $this->_query, $match)) { + if (isset($match[1])) { + $this->_query = str_ireplace($match[1], '', $this->_query); + } + } + } /** - * Method for rewriting unique key + * Method for rewriting unique key. + * + * @access private */ private function rewrite_unique_key(){ - $this->_query = preg_replace_callback('/\\bunique key\\b([^\(]*)(\([^\)]*\))/ims', array($this, '_rewrite_unique_key'), $this->_query); + $this->_query = preg_replace_callback('/\\bunique key\\b([^\(]*)(\(.*\))/im', array($this, '_rewrite_unique_key'), $this->_query); } - /** - * Callback method for rewrite_unique_key + * Callback method for rewrite_unique_key. + * * @param array $matches an array of matches from the Regex + * @access private */ private function _rewrite_unique_key($matches){ $index_name = trim($matches[1]); - $col_name = trim($matches[2]); - $tbl_name = $this->table_name; + $col_name = trim($matches[2]); + $tbl_name = $this->table_name; + if (preg_match('/\(\\d+?\)/', $col_name)) { + $col_name = preg_replace('/\(\\d+?\)/', '', $col_name); + } $_wpdb = new PDODB(); $results = $_wpdb->get_results("SELECT name FROM sqlite_master WHERE type='index'"); $_wpdb = null; @@ -169,50 +247,57 @@ class CreateQuery{ $this->index_queries[] = "CREATE UNIQUE INDEX $index_name ON " . $tbl_name .$col_name; return ''; } - /** - * Method for handling ENUM fields - * SQLite doesn't support enum, so we change it to check constraint + * Method for handling ENUM fields. + * + * SQLite doesn't support enum, so we change it to check constraint. + * + * @access private */ private function rewrite_enum(){ $pattern = '/(,|\))([^,]*)enum\((.*?)\)([^,\)]*)/ims'; $this->_query = preg_replace_callback($pattern, array($this, '_rewrite_enum'), $this->_query); } - /** - * Method for the callback function rewrite_enum and rewrite_set + * Call back method for rewrite_enum() and rewrite_set(). + * + * @access private */ private function _rewrite_enum($matches){ $output = $matches[1] . ' ' . $matches[2]. ' TEXT '. $matches[4].' CHECK ('.$matches[2].' IN ('.$matches[3].')) '; return $output; } - /** - * Method for rewriting usage of set - * whilst not identical to enum, they are similar and sqlite does not - * support either. + * Method for rewriting usage of set. + * + * It is similar but not identical to enum. SQLite does not support either. + * + * @access private */ private function rewrite_set(){ $pattern = '/\b(\w)*\bset\\s*\((.*?)\)\\s*(.*?)(,)*/ims'; $this->_query = preg_replace_callback($pattern, array($this, '_rewrite_enum'), $this->_query); } - /** - * Method for rewriting usage of key to create an index - * sqlite cannot create non-unique indices as part of the create query - * so we need to create an index by hand and append it to the create query + * Method for rewriting usage of key to create an index. + * + * SQLite cannot create non-unique indices as part of the create query, + * so we need to create an index by hand and append it to the create query. + * + * @access private */ private function rewrite_key(){ $this->_query = preg_replace_callback('/,\\s*(KEY|INDEX)\\s*(\\w+)?\\s*(\(.*(?_query); } - /** - * Callback method for rewrite_key + * Callback method for rewrite_key. + * * @param array $matches an array of matches from the Regex + * @access private */ private function _rewrite_key($matches){ $index_name = trim($matches[2]); - $col_name = trim($matches[3]); + $col_name = trim($matches[3]); if (preg_match('/\([0-9]+?\)/', $col_name, $match)) { $col_name = preg_replace_callback('/\([0-9]+?\)/', array($this, '_remove_length'), $col_name); } @@ -232,45 +317,60 @@ class CreateQuery{ $this->index_queries[] = 'CREATE INDEX '. $index_name . ' ON ' . $tbl_name . $col_name ; return ''; } + /** + * Call back method to remove unnecessary string. + * + * This method is deprecated. + * + * @param string $match + * @return string whose length is zero + * @access private + */ private function _remove_length($match) { return ''; } /** - * Method to assemble the main query and index queries into an array - * to be returned to the base class - * @return array + * Method to assemble the main query and index queries into an array. + * + * It return the array of the queries to be executed separately. + * + * @return array + * @access private */ private function post_process(){ $mainquery = $this->_query; do{ - $count = 0; + $count = 0; $mainquery = preg_replace('/,\\s*\)/imsx',')', $mainquery, -1, $count); } while ($count > 0); do { - $count = 0; + $count = 0; $mainquery = preg_replace('/\(\\s*?,/imsx', '(', $mainquery, -1, $count); } while ($count > 0); $return_val[] = $mainquery; - $return_val = array_merge($return_val, $this->index_queries); + $return_val = array_merge($return_val, $this->index_queries); return $return_val; } /** - * Method to add IF NOT EXISTS to query defs - * sometimes, if upgrade.php is being called, wordpress seems to want to run - * new create queries. this stops the query from throwing an error and halting - * output + * Method to add IF NOT EXISTS to query string. + * + * This adds IF NOT EXISTS to every query string, which prevent the exception + * from being thrown. + * + * @access private */ private function add_if_not_exists(){ $pattern_table = '/^\\s*CREATE\\s*(TEMP|TEMPORARY)?\\s*TABLE\\s*(IF NOT EXISTS)?\\s*/ims'; - $this->_query = preg_replace($pattern_table, 'CREATE $1 TABLE IF NOT EXISTS ', $this->_query); + $this->_query = preg_replace($pattern_table, 'CREATE $1 TABLE IF NOT EXISTS ', $this->_query); $pattern_index = '/^\\s*CREATE\\s*(UNIQUE)?\\s*INDEX\\s*(IF NOT EXISTS)?\\s*/ims'; for ($i = 0; $i < count($this->index_queries); $i++) { $this->index_queries[$i] = preg_replace($pattern_index, 'CREATE $1 INDEX IF NOT EXISTS ', $this->index_queries[$i]); } } - /** - * Method to strip back ticks + * Method to strip back quotes. + * + * @access private */ private function strip_backticks(){ $this->_query = str_replace('`', '', $this->_query); @@ -278,15 +378,20 @@ class CreateQuery{ $query = str_replace('`', '', $query); } } - /** - * Method to remove the character set information from within mysql queries + * Method to remove the character set information from within mysql queries. + * + * This removes DEFAULT CHAR(ACTER) SET and COLLATE, which is meaningless for + * SQLite. + * + * @access private */ private function rewrite_character_set(){ - $pattern_charset = '/\\b(default\\s*character\\s*set|default\\s*charset|character\\s*set)\\s*(?_query = preg_replace($patterns, '', $this->_query); + $patterns = array($pattern_charset, $pattern_collate1, $pattern_collate2); + $this->_query = preg_replace($patterns, '', $this->_query); } -} \ No newline at end of file +} +?> \ No newline at end of file diff --git a/readme-ja.txt b/readme-ja.txt index 5d7ca86..5352cf2 100644 --- a/readme-ja.txt +++ b/readme-ja.txt @@ -6,8 +6,8 @@ Tags: database, SQLite, PDO Author: Kojima Toshiyasu Author URI: http://dogwood.skr.jp/ Requires at least: 3.3 -Tested up to: 3.5.2 -Stable tag: 1.1 +Tested up to: 3.9 +Stable tag: 1.6.3 License: GPLv2 License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -15,110 +15,105 @@ SQLite IntegrationはSQLiteでWordPressを使えるようにするプラグイ == Description == -このプラグインは[SQLite](http://www.sqlite.org/)を使ってWordPressを運用するためのものです。MySQLデータベース・サーバを用意する必要はありません。SQLiteは自己完結的で、サーバを必要とせず、トランザクションをサポートしたデータベース・エンジンです。MySQLのようにたくさんの拡張機能を持たないかわりに、小規模から中規模のトラフィックがあるウェブサイトに適しています。 +このプラグインを使うと、MySQL データベースサーバがなくても WordPress のサイトを作ることができます。必要なものは、Apache か、同等のウェブサーバと、PDO エクステンションが使える PHP だけです。WordPress のアーカイブとこのプラグインがあれば、それだけで WordPress サイトを試すことができます。 -SQLite Integrationはラッパ・プログラムです。WordPressとSQLiteの間に入って、やり取りを中継し、次のように動作します。 +SQLite Integration は [PDO for WordPress](http://wordpress.org/extend/plugins/pdo-for-wordpress) プラグインの後継です。後者は残念なことに、もうメンテナンスされていないようです。SQLite IntegrationはPDO for WordPressの基本的なアイディアと構造を借りて、より多くの機能とユーティリティを追加しました。 -1. WordPressからMySQLに発行されるSQLステートメントをインターセプトします -2. それをSQLiteが実行できる形に書き換えます -3. SQLiteに渡します -4. SQLiteから結果を受け取ります -5. 必要なら、WordPressが望む形式にフォーマットしなおします -6. WordPressに結果を返します += 特徴 = -WordPressはMySQLと話していると思っていて、背後で何が起こっているかは知りません。実際にはSQLiteと話しているのですが、WordPressはいつもの通り仕事をします。 +SQLite Integration はデータベースアクセスを制御するためのプログラムです。だから、他のプラグインとは違います。WordPress をインストールするときに使わなければなりません。インストールのセクションを参照してください。[SQLite Integration(ja)](http://dogwood.skr.jp/wordpress/sqlite-integration-ja/)をご覧になると、もっと詳しい説明を読むことができます。 -SQLite Integrationは[PDO for WordPress](http://wordpress.org/extend/plugins/pdo-for-wordpress)プラグインの後継です。後者は残念なことに、もうメンテナンスされていないようです。SQLite IntegrationはPDO for WordPressの基本的なアイディアと構造を借りて、より多くの機能とユーティリティを追加しました。 +インストールに成功したら、MySQL を使う他の WordPress と同じように使うことができます。オプションとして、一時的に MySQL を使い、また SQLite に戻るというような使い方ができます。開発のときに、MySQL のないローカルマシンでサイトのテストをすることもできるでしょう。 -= Features = +インストールが終わったら、このプラグインを有効化することができます(必須ではありませんが、お勧めします)。そうすると、サーバやインストールされたプラグインについての情報を見ることができるようになります。 -SQLite Integrationは普通の「プラグイン」ではありません。WordPressをインストールするときに使います。そのため、少し準備が必要です。インストールのセクションを参照してください。[SQLite Integration Page](http://dogwood.skr.jp/wordpress/sqlite-integration/)をご覧になると、もっと詳しい説明を読むことができます。 += システム要件 = -インストールに成功したら、MySQLを使う他のWordPressと同じように使うことができます。オプションとして、管理パネルでこのプラグインを有効化することができます。有効化すると有益な情報と説明を見ることができます。これは必須ではありませんが、お勧めします。 +* PHP 5.2 以上で PDO extension が必要です(PHP 5.3 以上をお勧めします)。 +* PDO SQLite ドライバがロードされている必要があります。 -= Backward Compatibility = += 後方互換性 = 現在[PDO for WordPress](http://wordpress.org/extend/plugins/pdo-for-wordpress)をお使いの場合は、データベースを移行することができます。インストールのセクションをご覧ください。 -= Support = += サポート = 下の方法でコンタクトを取ってください。 -[Support Forum](http://wordpress.org/support/plugin/sqlite-integration)にポストする。 +1. [Support Forum](http://wordpress.org/support/plugin/sqlite-integration)にポストする。 +2. [SQLite Integration(ja)のページ](http://dogwood.skr.jp/wordpress/sqlite-integration-ja/)でメッセージを残す。 -注意: WordPress.orgはMySQL以外のデータベースを正式にサポートしていません。だから、WordPress.orgからのサポートは得られません。フォーラムに投稿しても、回答を得ることはまずないでしょう。また、パッチをあてたプラグインを使う場合は、そのプラグインの作者からのサポートはないものと思ってください。自分でリスクを負う必要があります。 += サポートについての注意 = -= Translation = +WordPress.org は MySQL 以外のデータベースを正式にサポートしていません。だから、WordPress.org からのサポートは得られません。フォーラムに投稿しても、回答を得ることはまずないでしょう。また、パッチをあてたプラグインを使う場合は、そのプラグインの作者からのサポートはないものと思ってください。できるだけご協力はしますが、自分でリスクを負う必要があります。 -ドキュメントは英語で書かれています。日本語のカタログファイルと、.potファイルがアーカイブに含まれています。もしあなたの言語に翻訳をしたら、知らせてください。 += 翻訳 = -== Installation == +ドキュメントは英語で書かれています。もしあなたの言語に翻訳をしたら、知らせてください。 -このプラグインは他のプラグインとはちがいます。管理パネルのプラグイン・ページでインストールすることはできません。 +* 日本語(kjmtsh) +* スペイン語(Pablo Laguna) -まず、WordPressのインストールを準備しなければなりません。Codexの[Installing Wordpress ](http://codex.wordpress.org/Installing_WordPress)をご覧ください。 +== インストール == -必要要件をチェックし、WordPressのアーカイブを展開したら、wp-config-sample.phpをwp-config.phpにリネームして、[Codex page](http://codex.wordpress.org/Editing_wp-config.php)に書いてあるように、少し編集する必要があります。データベースの設定*以外*の部分を設定してください。 +より詳細な情報は、[SQLite Integration(ja)](http://dogwood.skr.jp/wordpress/sqlite-integration-ja/)をご覧ください。 -終わったら、オプションの設定を書き加えることができます。次の説明に従ってください。 += 準備 = -* デフォルト(wp-content/database)とは違うディレクトリにSQLiteデータベース・ファイルを置きたい場合は、次の行を追加してください(最後のスラッシュを忘れずに)。 - - `define('DB_DIR', '/home/youraccount/database_directory/');` - - 注意: PHPスクリプトがこのディレクトリを作ったり、中にファイルを書き込んだりする権限を持っていることが必要です。 - -* デフォルト(.ht.sqlite)とは違うデータベース・ファイル名を使いたい場合は、次の行を追加してください。 - - `define('DB_FILE', 'database_file_name');` - - 注意: PDO for WordPressをお使いの方は、「データベースを移行する」のセクションをご覧ください。 +1. 最新の WordPress アーカイブとこのプラグインをダウンロードして、ローカルマシンに展開します。 +2. sqlite-integration フォルダを wordpress/wp-content/plugins フォルダに移動します。 +3. sqlite-integration フォルダの中にある db.php ファイルを wordpress/wp-content フォルダにコピーします。 +4. wordpress/wp-config-sample.php ファイルを wordpress/wp-config.php とリネームします。 - よくわからない場合は、何も追加する必要はありません。 += 基本的な設定 = -wp-config.phpの準備が終わったら、次のステップに進みます。 +wp-config.php ファイルを開き、下のセクションを編集します。 -1. プラグインのアーカイブを展開します。 +* 認証用ユニークキー +* WordPressデータベーステーブルの接頭辞 +* ローカル言語(日本語版では、jaがすでに設定されています) -2. アーカイブに含まれるdb.phpファイルをwp-contentディレクトリに移動(またはコピー)してください。 +Codex の[wp-config.php の編集](http://wpdocs.sourceforge.jp/wp-config.php_%E3%81%AE%E7%B7%A8%E9%9B%86)を参照してください。 -3. sqlite-wordpressディレクトリをwp-content/plugin/ディレクトリの下に移動してください。 += 5 分もかからないインストール = - `wordpress/wp-contents/db.php` - - と、 - - `wordpress/wp-contents/sqlite-integration` - - のようになります。 +wordpress フォルダをサーバにアップロードして、ブラウザでアクセスすると、インストールが始まります。ブログ名などを入力してインストールすれば終了です。ブログをお楽しみください。 -さあ、これでお終いです。ディレクトリの構造をそのままに、あなたのサーバにアップロードして、お好きなブラウザでwp-admin/install.phpにアクセスしてください。WordPressのインストールが始まります。Enjoy blogging! += オプション設定 = -= Migrate your database to SQLite Integration = +wp-config.php に設定を書き込むと、デフォルトの設定を変更することができます。SQLite データベースファイル名を変更したい場合は(デフォルトは .ht.sqlite です)、下の 1 行を加えてください。 -一番よい方法は、次のようにすることです。 +`define('DB_FILE', 'your_database_name');` -1. データをエクスポートする。 +SQLite データベースファイルが置かれるディレクトリを変更したい場合は、次の行を追加してください。 +`define('DB_DIR', '/home/youraccount/database_directory/');` + +どちらか片方だけでも、両方でも変更できます。 + += このプラグインを削除せずに MySQL を使う = + +MySQL を使いたいときは、次の行を wp-config.php に追加してください。 + +`define('USE_MYSQL', true);` + +もちろん、これだけでは足りません。データベースサーバやユーザ名、パスワードなども設定してください。この行を追加して、最初にサイトにアクセスすると、WordPress のインストールが始まります。MySQL でのインストールを終えてください。おわかりのように、SQLite のデータは自動的に MySQL に引き継がれることはありません。 + +SQLite に戻りたいときには、この行を次のように変更するか、この行を削除してください。 + +`define('USE_MYSQL', false);` + += PDO for WordPress から SQLite Integration にデータベースを移行する = + +現在、PDO for WordPress をお使いなら、データベースを SQLite Integration に移行することができます。お勧めは下のようにすることです。より詳細な情報については、[SQLite Integration(ja)](http://dogwood.skr.jp/wordpress/sqlite-integration-ja/)を参照してください。 + +1. 現在のデータをエクスポートする。 2. 最新のWordPressを、SQLite Integrationを使って新規インストールする。 - 3. WordPress Importerを使って以前のデータをインポートする。 -何らかの理由で、データがエクスポートできない場合は、次の方法を試すことができます。 +何らかの理由で、データがエクスポートできない場合は、上のサイトをご覧ください。別の方法を読むことができます。 -1. あなたのMyBlog.sqliteがWordPressの必要とするテーブルを全て含んでいるかどうかチェックしてください。[SQLite Manager Mozilla Addon](https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager/)のようなユーティリティが必要かもしれません。また、Codexの[Database Description](http://codex.wordpress.org/Database_Description)を参照してください。 - -2. MyBlog.sqliteとdb.phpファイルをバックアップしてください。 - -3. あなたのMyBlog.sqliteを.ht.sqliteにリネームするか、または、wp-config.phpに次の行を追加してください。 - - `define('FQDB', 'MyBlog.sqlite');` - -4. wp-content/db.phpをSQLite Integrationに含まれている同名のファイルと入れ替えてください。 - -これでおしまいです。忘れずに必要要件とWordPressのバージョンをチェックしてください。*SQLite IntegrationはWordPress 3.2.x以前のものでは動作しません。* - -== Frequently Asked Questions == +== よくある質問 == = データベース・ファイルが作られません = @@ -136,40 +131,116 @@ wp-config.phpの準備が終わったら、次のステップに進みます。 1. システム情報の画面ではデータベースの状態やプラグインの対応状況を見ることができます。 -== Requirements == - -* PHP 5.2 以上で PDO extension が必要です(PHP 5.3 以上をお勧めします)。 -* PDO SQLite ドライバがロードされている必要があります。 - == Known Limitations == 多くのプラグインはちゃんと動作するはずです。が、中にはそうでないものもあります。一般的には、WordPressの関数を通さず、PHPのMysqlあるいはMysqliライブラリの関数を使ってデータベースを操作しようとするプラグインは問題を起こすでしょう。 他には下のようなものがあります。 -= これらのプラグインを使うことはできません。SQLite Integrationと同じファイルを使おうとするからです。 = +これらのプラグインを使うことはできません。SQLite Integrationと同じファイルを使おうとするからです。 -* [W3 Total Cache](http://wordpress.org/extend/plugins/w3-total-cache/) -* [DB Cache Reloaded Fix](http://wordpress.org/extend/plugins/db-cache-reloaded-fix/) -* [HyperDB](http://wordpress.org/extend/plugins/hyperdb/) +* W3 Total Cache +* DB Cache Reloaded Fix +* HyperDB -= これらのプラグインも使えません。SQLiteがエミュレートできないMySQL独自の拡張機能を使っているからです。 = +'WP Super Cache'や'Quick Cache'のようなプラグインなら使えるかもしれません。お勧めはしませんし、何も保証しませんが。 -* [Yet Another Related Posts](http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/) -* [Better Related Posts](http://wordpress.org/extend/plugins/better-related/) +これらのプラグインも使えません。SQLite Integration がエミュレートできない MySQL 独自の拡張機能を使っているからです。 -たぶん、もっとあるでしょう。 +* Yet Another Related Posts +* Better Related Posts -== Changelog == +'WordPress Related Posts'や'Related Posts'のようなプラグインなら使うことができるかもしれません。 -= 1.1 (2013-07-24) = -* DROP INDEX 単独のクエリが動作していなかったのを修正しました。 -* shutdown_hook で descructor を実行していたのをやめました。 -* LOCATE() 関数を使えるようにしました。 +たぶん、もっとあるでしょう。動作しないプラグインを見つけたら、お知らせいただけると助かります。 -= 1.0 (2013-07-07) = -最初のリリース。 +非互換のプラグインの中には、少し修正をすると、使えるようになるものがあります。[Plugins(ja)](http://dogwood.skr.jp/wordpress/plugins-ja/)で情報を公開していますので、参照してください。 + +このプラグインは、'WP_PLUGIN_URL' 定数をサポートしません。 == Upgrade Notice == -SQLite Integrationのアップグレードに失敗するようなら、FTPを使っての手動アップグレードを試してみてください。 +メタクエリを使うときのバグを修正しました。自動アップグレードで失敗するようなら、FTPを使っての手動アップグレードを試してみてください。 + +== Changelog == + += 1.6.3 (2014-05-10) = +* BETWEEN 比較をするメタクエリのバグを修正しました。 +* スペイン語カタログを追加しました。 +* WordPress 3.9.1 での動作チェックをしました。 + += 1.6.2 (2014-05-05) = +* 正規表現に関するバグを修正しました。 +* 管理画面のドキュメント(表示されていなかった)を修正しました。 + += 1.6.1 (2014-04-22) = +* WP Slimstat を使うために、いくつかのバグを修正しました。 +* 古い db.php を使い続けている場合は、ダッシュボードに注意を表示するようにしました(必要な場合のみ)。 +* 古い db.php を新しいものを置き換えるユーティリティを追加しました。 +* 日本語カタログファイルをアップデートしました。 + += 1.6 (2014-04-17) = +* 未対応のクエリに対するエラーメッセージのコントロールができていないのを修正しました。 +* SQL_CALC_FOUND_ROW ステートメントのバグを修正しました。メインクエリと WP_Query、WP_Meta_Query などのページング情報に関連したものです。 +* コメント本文からバッククォートが削除されるバグを修正しました。 +* バックアップファイルをローカルにダウンロードできるようにしました。 +* PHP documentor で使えるように、ソースコードのドキュメントを書き直しました。 +* このドキュメントを変えました。 +* マイナーな変更、修正がいくつかありました。 +* WordPress 3.8.2 と 3.9 alpha でインストールテストをしました。 +* プラグイン互換リストを増補しました。 +* これまで使えなくしていた wp-db.php の関数を使えるようにしました。 +* いくつかのユーザ定義関数を追加しました。 + += 1.5 (2013-12-17) = +* WordPress 3.8 でのインストールと動作テストをしました。 +* SQLite と MySQL を交互に使えるようにしました。 +* readme-ja.txt のインストールの説明をかえました。 +* SQLite のコンパイルオプション'ENABLE_UPDATE_DELETE_LIMIT'をチェックするようにしました。 +* WordPress 3.8 の管理画面に合わせて sytle を変更しました。 +* グローバルで動くファイルへのダイレクトアクセスを制限するようにしました。 + += 1.4.2 (2013-11-06) = +* ダッシュボードに表示される情報についてのバグを修正しました。 +* スクリーンショットを変更しました。 +* WordPress 3.7.1 でのインストールテストを行いました。 + += 1.4.1 (2013-09-27) = +* BETWEEN関数の書き換え方を修正しました。致命的なバグです。新規投稿に'between A and B'というフレーズが含まれていると、公開されず、投稿自体も消えます。 +* MP6を使っているときに、管理画面のレイアウトが崩れるのを修正しました。 +* 日本語が一部表示されないのを直しました。 +* SELECT version()がダミーデータを返すようにしました。 +* WP_DEBUGが有効の時に、WordPressのテーブルからカラム情報を読んで表示できるようにしました。 + += 1.4 (2013-09-12) = +* アップグレードしたWordPressで期待通り動作しないのを修正するために、データベース管理ユーティリティを追加しました。 +* SHOW INDEXクエリにWHERE句がある場合の処理を変更しました。 +* ALTER TABLEクエリのバグを修正しました。 + += 1.3 (2013-09-04) = +* データベースファイルのスナップショットをzipアーカイブとしてバックアップするユーティリティを追加しました。 +* ダッシュボードのスタイルをMP6プラグインに合わせたものに変えました。 +* 言語カタログが読み込まれていないときのエラーメッセージの出力方法を一部変更しました。 +* query_create.class.phpの_rewrite_field_types()を変更しました。dbDelta()関数が意図したとおりに実行されます。 +* BETWEENステートメントが使えるようになりました。 +* クエリからインデックスヒントを全て削除して実行するようにしました。 +* New StatPressプラグインが使えるように、ALTER TABLE CHANGE COLUMNの扱いを修正しました。 +* いくつかの小さなバグを修正しました。 + += 1.2.1 (2013-08-04) = +* wp-db.phpの変更にともなって、wpdb::real_escapeプロパティを削除しました。WordPress 3.6 との互換性を保つための変更です。 + += 1.2 (2013-08-03) = +* カレンダー・ウィジェットでの不具合に対応するため、日付フォーマットとそのクオートを修正しました。 +* Windows マシンでパッチファイルが削除できなかったのを修正しました。 +* パッチファイルをアップロードするときに textdomain のエラーが出るのを修正しました。 +* ON DUPLICATE KEY UPDATEをともなったクエリの処理を変更しました。 +* readme.txt と readme-ja.txt の間違いを直しました。 + += 1.1 (2013-07-24) = +* DROP INDEX 単独のクエリが動作していなかったのを修正しました。 +* shutdown_hook で destruct() を実行していたのをやめました。 +* LOCATE() 関数を使えるようにしました。 + += 1.0 (2013-07-07) = +* 最初のリリース。 diff --git a/readme.txt b/readme.txt index c8c56bb..857d932 100644 --- a/readme.txt +++ b/readme.txt @@ -6,8 +6,8 @@ Tags: database, SQLite, PDO Author: Kojima Toshiyasu Author URI: http://dogwood.skr.jp/ Requires at least: 3.3 -Tested up to: 3.5.2 -Stable tag: 1.1 +Tested up to: 3.9 +Stable tag: 1.6.3 License: GPLv2 License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -15,100 +15,103 @@ SQLite Integration is the plugin that enables WordPress to use SQLite. If you wa == Description == -This plugin enables WordPress to work with [SQLite](http://www.sqlite.org/). You don't have to prepare MySQL database server and its configuration. SQLite is a self-contained, serverless, transactional SQL database engine. It is not a full-featured database system like MySQL or PostgreSQL, but it best fits for low to medium traffic websites. +This plugin enables you to create WordPress based web sites without MySQL database server. All you've got to prepare is the Apache web server or the like and PHP with PDO extension. WordPress archive and this plugin in hand, you can build a WordPress web site out of the box. -SQLite Integration is a kind of wrapper program, which is placed between WordPress and SQLite database and works as a mediator. It works as follows: - -1. Intercepts the SQL statement for MySQL from WordPress -2. Rewrites it for SQLite to execute -3. Give it to SQLite -4. Gets the results from SQLite -5. Formats the results as WordPress wants, if necessary -6. Give the results back to WordPress - -WordPress thinks she talks with MySQL and doesn't know what has happened in the background. She really talks with SQLite and will be happy with it. - -SQLite Integration is a successor to [PDO for WordPress](http://wordpress.org/extend/plugins/pdo-for-wordpress) plugin, which unfortunately enough, doesn't seem to be maintained any more. SQLite Integration uses the basic idea and structures of that plugin and adds some more features or some utilities. +SQLite Integration is a successor to [PDO for WordPress](http://wordpress.org/extend/plugins/pdo-for-wordpress) plugin, which unfortunately enough, doesn't seem to be maintained any more. SQLite Integration uses the basic idea and structures of that plugin and adds some utilities with more features. = Features = -SQLite Integration is not an ordinary 'plugin'. It is used to install WordPress itself. You need to do some preparations. Please read the install section. And see more detailed instruction in the [SQLite Integration Page](http://dogwood.skr.jp/wordpress/sqlite-integration). +SQLite Integration is a database access engine program. So it's not like the other plugins. It must be used to install WordPress. Please read the install section. And see more detailed instruction in the [SQLite Integration Page](http://dogwood.skr.jp/wordpress/sqlite-integration/). -Once you succeeded in installing WordPress, you can use it just like the others using MySQL. Optionally, you can activate this plugin in the installed plugins panel of the adimn dashboard, and you can see the useful information and instructions. It is not required but I recommend it. +Once you succeed in installing WordPress, you can use it just like the other systems using MySQL. Optionally, this plugin provides the feature to temporarily change the database to MySQL and come back to SQLite, which may help developers test their sites on the local machines without MySQL. + +After you finish installing, you can activate this plugin (this is optional but I recommend you to). And you can see some instructions and useful information on your server or your installed plugins. + += System Requirements = + +* PHP 5.2 or newer with PDO extension (PHP 5.3 or newer is better). +* PDO SQLite driver must be loaded. = Backward Compatibility = -If you are using [PDO for WordPress](http://wordpress.org/extend/plugins/pdo-for-wordpress), you can migrate your database. See install section. +If you are using 'PDO for WordPress', you can migrate your database to this plugin. Please check the install section. = Support = Please contact us with the methods below: -Post to [Support Forum](http://wordpress.org/support/plugin/sqlite-integration/). +1. Post to [Support Forum](http://wordpress.org/support/plugin/sqlite-integration/). +2. Visit the [SQLite Integration Page](http://dogwood.skr.jp/wordpress/sqlite-integration/)(in English) or [SQLite Integration(ja) Page](http://dogwood.skr.jp/wordpress/sqlite-integration-ja/)(in Japanese) and leave a message there. -Notes: WordPress.org doesn't officially support using any other database than MySQL. So there will be no supports from WordPress.org. Even if you post to the general Forum, you have few chances to get the answer. And if you use patched plugins, you will have be no support from the plugin authors, eithter. += Notes about Support = + +WordPress.org doesn't officially support using any other database than MySQL. So you will have no supports from WordPress.org. Even if you post to the general Forum, you'll have few chances to get the answer. And if you use patched plugins, you will have no support from the plugin author(s), eithter. I will help you as much as I can, but take your own risk, please. = Translation = -Documentation is written in English. Japanese catalog file and .pot file are included in the archive. If you translate it into your language, please let me know. +Documentation is written in English. If you translate it into your language, please let me know. + +* Japanese (kjmtsh) +* Spanish (Pablo Laguna) == Installation == -This plugin is *not* like the other plugins. You can't install and activate it on the plugin administration panel. +For more detailed instruction, please visit [SQLite Integration](http://dogwood.skr.jp/wordpress/sqlite-integration/). -First of all, you've got to prepare WordPress installation. See [Installing Wordpress ](http://codex.wordpress.org/Installing_WordPress) section in the Codex. += Preparation = -After checking the prerequisites and unzipping the WordPress archive file, you must rename wp-contig-sample.php file to wp-config.php and do some editting as the [Codex page](http://codex.wordpress.org/Editing_wp-config.php) says. Please follow the instructions *except* the database settings. +1. Download the latest WordPress archive and this plugin. And expand them on your machine. +2. Move sqlite-integration folder to wordpress/wp-content/plugins folder. +3. Copy db.php file in sqlite-integratin folder to wordpress/wp-content folder. +4. Rename wordpress/wp-config-sample.php to wordpress/wp-config.php. -When you finish, you can add optional settings. Follow the steps below: += Basic settings = -* If you want to put the SQLite database file to the directory different from the default setting (wp-content/database), you can add the line below (don't forget to add a trailing slash): +Open wp-config.php and edit the section below: - `define('DB_DIR', '/home/youraccount/database_directory/');` +* Authentication Unique keys and Salts +* WordPress Database Table prefix +* WordPress Localized Language - Note: Your PHP scripts must be able to create that directory and files in it. +See also [Editing wp-config.php](http://codex.wordpress.org/Editing_wp-config.php) in the Codex. Note that you don't have to write your database server, user name, user password or etc... -* If you want to change the database file name to the one different from the default (.ht.sqlite), you can add the line below: += Less than 5 minutes installation = - `define('DB_FILE', 'database_file_name');` +Upload everything (keeping the directory structure) to your server and access the wp-admin/install.php with your favorite browser, and WordPress installation process will begin. Enjoy your blogging! - Note: If you are using 'PDO for WordPress' plugin, see also 'Migrating your database' section. += Optional settings = - If you don't understand well, you don't have to add any of the lines above. +You can change some default settings with the directives in wp-config.php.If you change the SQLite database file name (default is .ht.sqlite) to others, add the next line in your wp-config.php. -After you finish preparing wp-config.php, follow the next steps: +`define('DB_FILE', 'your_database_name');` -1. Unzip the plugin archive file. +If you change the directory where the SQLite database is put, add the next line in your wp-config.php. -2. Move db.php file contained in the archive to wp-content directory. +`define('DB_DIR', '/home/youraccount/database_directory/');` -3. Move the sqlite-integration directory to wp-content/plugin/ directory. +You can change either of them or both of them. - `wordpress/wp-contents/db.php` += Use MySQL without uninstalling this plugins = - and - - `wordpress/wp-contents/sqlite-integration` +If you want to use MySQL, add the next line in your wp-config.php. - respectively. +`define('USE_MYSQL', true);` -OK. This is all. Upload everything (keeping the directory structure) to your server and access the wp-admin/install.php with your favorite browser, and WordPress installation process will begin. Enjoy your blogging! +Of course, this is not enough. You must give your database server address, user name, passowrd or etc... in the same file. After you add that line and access your web site for the first time, WordPress installer will begin. Then you must finish setting MySQL database. As you know, data in the SQLite database is not automatically migrated to MySQL. -= Migrate your database to SQLite Integration = +If you want to use SQLite again, change the line in wp-config.php as below or just remove this line. -If you are using PDO for WordPress now, you can migrate your database to SQLite Integration. You don't have to reinstall WordPress. Please follow the next steps: +`define('USE_MYSQL', false);` -1. Check if your MyBlog.sqlite file contains all the tables required by WordPress. You have to use a utility software like [SQLite Manager Mozilla Addon](https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager/). See also [Database Description](http://codex.wordpress.org/Database_Description) in Codex. += For PDO for WordPress users = -2. Backup your MyBlog.sqlite and db.php files. +If you are using PDO for WordPress now, you can migrate your database to SQLite Integration. I recommend the way below. See more detailed instruction [SQLite Integration](http://dogwood.skr.jp/wordpress/sqlite-integration/). -3. EITHER rename your MyBlog.sqlite to .ht.sqlite OR add the next line in wp-config.php file. - - `define('FQDB', 'MyBlog.sqlite');` +1. Export your data from current database. +2. Install latest WordPress with SQLite Integration. +3. Import the old data. -4. Overwrite your wp-content/db.php with the db.php file contained in SQLite Integration archive. - -That's all. Don't forget to check the requirement and your WordPress version. *SQLite Integration doesn't work with WordPress version 3.2.x or lesser*. +If export or import fails for some reason, please visit our site and try another way described there. == Frequently Asked Questions == @@ -118,7 +121,7 @@ The reason of failure in creating directory or files is often that PHP is not al = Such and such plugins can't be activated or doesn't seem to work properly = -Some of the plugins, especially cache plugins or database maintenace plugins, are not compatible with this plugin. Please activate SQLite Integration and see the plugin comatibility section in the documentation or visit the [SQLite Integration Page](http://dogwood.skr.jp/wordpress/sqlite-integration/). +Some of the plugins, especially cache plugins or database maintenace plugins, are not compatible with this plugin. Please activate SQLite Integration and see the known limitations section in this document or visit the [SQLite Integration](http://dogwood.skr.jp/wordpress/sqlite-integration/) for more detailed information. = I don't want the admin menu and documentation = @@ -128,40 +131,114 @@ Just deactivate the plugin, and you can remove them. Activation and deactivation 1. System Information tells you your database status and installed plugins compatibility. -== Requirements == - -* PHP 5.2 or newer with PDO extension (PHP 5.3 or newer is better). -* PDO SQLite driver must be loaded. - == Known Limitations == -Many of the other plugins will work fine with this plugin. But there are some you can't use. Generally speaking, the plugins that manipulate database not with WordPress functions but with Mysql or Mysqli native drivers from PHP might cause the problem. +Many of the other plugins will work fine with this plugin. But there are some you can't use. Generally speaking, the plugins that manipulate database not with WordPress' APIs but with MySQL or MySQLi native drivers from PHP might cause the problem. -These are other examples: +These are some examples: -= You can't use these plugins because they create the same file that this plugin uses: = +You can't use these plugins because they create the same file that this plugin uses. -* [W3 Total Cache](http://wordpress.org/extend/plugins/w3-total-cache/) -* [DB Cache Reloaded Fix](http://wordpress.org/extend/plugins/db-cache-reloaded-fix/) -* [HyperDB](http://wordpress.org/extend/plugins/hyperdb/) +* W3 Total Cache +* DB Cache Reloaded Fix +* HyperDB -= You can't use some of the plugins, because they are using MySQL specific features that SQLite can't emulate. For example: = +You may be able to use 'WP Super Cache' or 'Quick Cache' instead of them. I don't mean to recommend them and give no warranty at all. -* [Yet Another Related Posts](http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/) -* [Better Related Posts](http://wordpress.org/extend/plugins/better-related/) +You can't use these plugins, because they are using MySQL specific features that SQLite Integration can't emulate. -Probably there are more, I'm afraid. +* Yet Another Related Posts +* Better Related Posts -== Changelog == +You may be able to use 'WordPress Related Posts' or 'Related Posts' instead of them. Probably there are more, I'm afraid. If you find one, please let me know. -= 1.1 (2013-07-24) = -* Fixed the manipulation of DROP INDEX query. -* Removed desctructor() from shutdown_hook. -* Enabled LOCATE() function in the query string. +There are some among the incompatible plugins, which work fine by rewriting some codes. I give information about them and provide the patch files on [Plugins](http://dogwood.skr.jp/wordpress/plugins/). -= 1.0 (2013-07-07) = -First release version of the plugin. +This plugin doesn't support 'WP_PLUGIN_URL' constant. == Upgrade Notice == -When auto upgrading of SQLite Integration fails, Please try manual upgrade via FTP. +Fixed the bug about meta query with BETWEEN comparison which may cause some plugins to work correctly. Upgrade is recommended. When auto upgrading fails, please try manual upgrade via FTP. + +== Changelog == + += 1.6.3 (2014-05-10) = +* Fixed the bug about manipulating meta query with BETWEEN comparison. +* Added the Spanish langugae support. +* WordPress 3.9.1 compatibility checked. + += 1.6.2 (2014-05-05) = +* Fixed some bugs for the regular expression. +* Fixed the documents on the admin dashboard. + += 1.6.1 (2014-04-22) = +* Fixed some bugs for using with WP Slimstat plugin. +* Display admin notice when not replacing the old db.php with the new one (when necessary). +* Add the feature for replacing the old db.php file with the button click. +* Fixed the Japanese translation catalog file. + += 1.6 (2014-04-17) = +* Fixed the bug of error messaging control for the unknown query. +* Fixed the bug for 'SQL_CALC_FOUND_ROW' statement. This is for the main query, WP_Query class and WP_Meta_Query concerning paging information. +* Fixed the bug that the back quote in the comments was removed. +* Added the feature to download a backup file to a local machine. +* Revised all the doc strings in the sourcse code for PHP documentor. +* Changed the documentation. +* Fixed minor bugs and typos. +* Tested to install WordPress 3.8.2 and 3.9 beta. +* Augumented the plugin compatibility list. +* Some functions in wp-db.php, which was disabled by the plugin, is enabled and can be used. +* Some more user defined functions are added. + += 1.5 (2013-12-17) = +* Tested WordPress 3.8 installation and compatibility. +* Add the optional feature to change the database from SQLite to MySQL. +* Changed the install instruction in the readme.txt. +* Add the code to check if the SQLite library was compiled with the option 'ENABLE_UPDATE_DELETE_LIMIT'. +* Changed the admin panel style to fit for WordPress 3.8. +* Restricted the direct access to the files that works in the global namespace. + += 1.4.2 (2013-11-06) = +* Fixed some minor bugs about the information in the dashboard. +* Changed the screenshot. +* Tested WordPress 3.7.1 installation. + += 1.4.1 (2013-09-27) = +* Fixed the rewriting process of BETWEEN function. This is a critical bug. When your newly created post contains 'between A and B' phrase, it is not published and disappears. +* Fixed the admin dashboard display when using MP6. +* Fixed the Japanese catalog. +* Added the procedure for returning the dummy data when using SELECT version(). +* Added the procedure for displaying column informatin of WordPress tables when WP_DEBUG enabled. + += 1.4 (2013-09-12) = +* Added the database maintenance utility for fixing the database malfunction of the upgraded WordPress installation. +* Changed the manipulation of SHOW INDEX query with WHERE clause. +* Fixed the bug of the manipulation of ALTER TABLE query. + += 1.3 (2013-09-04) = +* Added the backup utility that creates the zipped archive of the current snapshot of the database file. +* Changed the dashboard style to match MP6 plugin. +* Changed the way of putting out the error messages when language catalogs are not loaded. +* Modified the _rewrite_field_types() in query_create.class.php for the dbDelta() function to work properly. +* Added the support for BETWEEN statement. +* Changed the regular expression to remove all the index hints from the query string. +* Fixed the manipulation of ALTER TABLE CHANGE COLUMN query for NewStatPress plugin to work. +* Fixed minor bugs. + += 1.2.1 (2013-08-04) = +* Removed wpdb::real_escape property following the change of the wpdb.php file which makes the plugin compatible with Wordpress 3.6. + += 1.2 (2013-08-03) = +* Fixed the date string format and its quotation for calendar widget. +* Fixed the patch utility program for using on the Windows machine. +* Fixed the textdomain error in utilities/patch.php file when uploading the patch file. +* Changed the manipulation of the query with ON DUPLICATE KEY UPDATE. +* Fixed the typos in readme.txt and readme-ja.txt. + += 1.1 (2013-07-24) = +* Fixed the manipulation of DROP INDEX query. +* Removed destruct() from shutdown_hook. +* Enabled LOCATE() function in the query string. + += 1.0 (2013-07-07) = +* First release version of the plugin. diff --git a/schema.php b/schema.php index 185ee0a..5100ed1 100644 --- a/schema.php +++ b/schema.php @@ -1,32 +1,38 @@ PDO::ERRMODE_EXCEPTION)); } catch (PDOException $err) { $err_data = $err->errorInfo; - $message = __("Database connection error!
", 'sqlite-integration'); - $message .= sprintf(__("Error message is: %s", 'sqlite-integration'), $err_data[2]); - echo $message; - return false; + $message = 'Database connection error!
'; + $message .= sprintf("Error message is: %s", $err_data[2]); + wp_die($message, 'Database Error!'); } try { @@ -37,9 +43,9 @@ function make_db_sqlite() { continue; $rewritten_query = $query_parser->rewrite_query($query); if (is_array($rewritten_query)) { - $table_query = array_shift($rewritten_query); + $table_query = array_shift($rewritten_query); $index_queries = $rewritten_query; - $table_query = trim($table_query); + $table_query = trim($table_query); $pdo->exec($table_query); // foreach($rewritten_query as $single_query) { // $single_query = trim($single_query); @@ -77,10 +83,9 @@ function make_db_sqlite() { $pdo->commit(); } else { $pdo->rollBack(); - $message = sprintf(__("Error occured while creating tables or indexes...
Query was: %s
", 'sqlite-integration'), var_export($rewritten_query, true)); - $message .= sprintf(__("Error message is: %s", 'sqlite-integration'), $err_data[2]); - echo $message; - return false; + $message = sprintf("Error occured while creating tables or indexes...
Query was: %s
", var_export($rewritten_query, true)); + $message .= sprintf("Error message is: %s", $err_data[2]); + wp_die($message, 'Database Error!'); } } diff --git a/sqlite-integration.php b/sqlite-integration.php index 6351896..4b8b171 100644 --- a/sqlite-integration.php +++ b/sqlite-integration.php @@ -1,17 +1,17 @@ ID, 'admin_color', true); + if ($admin_color == 'fresh') { + $stylesheet_file = 'style.min.css'; + } else { + $stylesheet_file = $admin_color . '.min.css'; + } + $style_url = SQLiteUrl . '/styles/' . $stylesheet_file; + $style_file = SQLiteFilePath . '/styles/' . $stylesheet_file; if (file_exists($style_file)) { wp_enqueue_style('sqlite_integration_stylesheet', $style_url); } } - function add_doc_style_sheet() { - $style_url = SQLiteUrl . '/styles/doc.css'; - $style_file = SQLiteFilePath . '/styles/doc.css'; - if (file_exists($style_file)) { - wp_enqueue_style('sqlite_integration_doc_style', $style_url); - } - } + /** + * Method to register the JavaScript file. + * + * To register the JavaScript file. It's only for the admin dashboard. + * It won't included in web pages. + * + * @param no parameter is provided. + * @return no return value. + */ function add_sqlite_script() { - $script_url = SQLiteUrl . '/js/sqlite.js'; - $script_file = SQLiteFilePath . '/js/sqlite.js'; + $script_url = SQLiteUrl . '/js/sqlite.min.js'; + $script_file = SQLiteFilePath . '/js/sqlite.min.js'; if (file_exists($script_file)) { wp_enqueue_script('sqlite-integration', $script_url, 'jquery'); } diff --git a/styles/blue.css b/styles/blue.css new file mode 100644 index 0000000..959a249 --- /dev/null +++ b/styles/blue.css @@ -0,0 +1,43 @@ +/** + * This file is a part of SQLite Integration. + * + * @package SQLite Integration + * @author Kojima Toshiyasu + */ +@import url('./style.min.css'); +@CHARSET "UTF-8"; +#sqlite-admin-wrap h2, +#sqlite-admin-side-wrap h2 { + background: #4796b3; + color: rgb(255, 255, 255); + padding-left: 5px; +} +.menu-item { + font-size: 20px; + display: inline; + min-width: 150px; + height: 50px; + margin-left: 0; + margin-right: 10px; + padding: 5px; + border: .5px solit #000; + background: #4796b3; + color: (255, 255, 255); + line-height: 40px; +} +.menu-selected { + font-size: 20px; + display: inline; + min-width: 150px; + height: 50px; + margin-left: 0; + margin-right: 10px; + padding: 5px; + border: .5px solit #000; + background: #096484; + color: rgb(255, 255, 255); +} +.menu-item a { + text-decoration: none; + color: rgb(255, 255, 255); +} diff --git a/styles/blue.min.css b/styles/blue.min.css new file mode 100644 index 0000000..6e94c63 --- /dev/null +++ b/styles/blue.min.css @@ -0,0 +1 @@ +@import url('./style.min.css');@CHARSET "UTF-8";#sqlite-admin-wrap h2,#sqlite-admin-side-wrap h2{background:#4796b3;color:#fff;padding-left:5px}.menu-item{font-size:20px;display:inline;min-width:150px;height:50px;margin-left:0;margin-right:10px;padding:5px;border:.5px solit #000;background:#4796b3;color:(255,255,255);line-height:40px}.menu-selected{font-size:20px;display:inline;min-width:150px;height:50px;margin-left:0;margin-right:10px;padding:5px;border:.5px solit #000;background:#096484;color:#fff}.menu-item a{text-decoration:none;color:#fff} \ No newline at end of file diff --git a/styles/coffee.css b/styles/coffee.css new file mode 100644 index 0000000..48fd937 --- /dev/null +++ b/styles/coffee.css @@ -0,0 +1,42 @@ +/** + * This file is a part of SQLite Integration. + * + * @package SQLite Integration + * @author Kojima Toshiyasu + */ +@import url('./style.min.css'); +@CHARSET "UTF-8"; +#sqlite-admin-wrap h2, +#sqlite-admin-side-wrap h2 { + background: #59524c; + color: rgb(255, 255, 255); + padding-left: 5px; +} +.menu-item { + font-size: 20px; + display: inline; + min-width: 150px; + height: 50px; + margin-left: 0; + margin-right: 10px; + padding: 5px; + border: .5px solit #000; + background: #59524c; + color: rgb(255, 255, 255); + line-height: 40px; +} +.menu-selected { + font-size: 20px; + display: inline; + min-width: 150px; + height: 50px; + margin-left: 0; + margin-right: 10px; + padding: 5px; + background: #c7a589; + color: rgb(255, 255, 255); +} +.menu-item a { + text-decoration: none; + color: rgb(255, 255, 255); +} diff --git a/styles/coffee.min.css b/styles/coffee.min.css new file mode 100644 index 0000000..4fecc4a --- /dev/null +++ b/styles/coffee.min.css @@ -0,0 +1 @@ +@import url('./style.min.css');@CHARSET "UTF-8";#sqlite-admin-wrap h2,#sqlite-admin-side-wrap h2{background:#59524c;color:#fff;padding-left:5px}.menu-item{font-size:20px;display:inline;min-width:150px;height:50px;margin-left:0;margin-right:10px;padding:5px;border:.5px solit #000;background:#59524c;color:#fff;line-height:40px}.menu-selected{font-size:20px;display:inline;min-width:150px;height:50px;margin-left:0;margin-right:10px;padding:5px;background:#c7a589;color:#fff}.menu-item a{text-decoration:none;color:#fff} \ No newline at end of file diff --git a/styles/doc.css b/styles/doc.css deleted file mode 100644 index c3255b0..0000000 --- a/styles/doc.css +++ /dev/null @@ -1,141 +0,0 @@ -@CHARSET "UTF-8"; -#sqlite-admin-wrap h2, -#sqlite-admin-side-wrap h2 { - background: rgb(73, 90, 88); - background: -moz-linear-gradient(bottom, rgba(73, 90, 88, 1), rgba(73, 90, 88, 0.5), rgba(73, 90, 88, 0)); - background: -webkit-gradient(linear, bottom, top, from(rgba(73, 90, 88, 1)), color-stop(0.5, rgba(73, 90, 88, 0.5)), to(rgba(73, 90, 88, 0))); - background: linear-gradient(to top, rgba(73, 90, 88, 1), rgba(73, 90, 88, 0.2)); - color: rgb(247, 254, 236); - -webkit-border-top-right-radius: 6px; - -webkit-border-top-left-radius: 6px; - -moz-border-radius-topright: 6px; - -moz-border-radius-topleft: 6px; - border-top-right-radius: 6px; - border-top-left-radius: 6px; - text-shadow: -1px -1px 0 rgb(93, 69, 35), - 1px -1px 0 rgb(93, 69, 35), - -1px 1px 0 rgb(93, 69, 35), - 1px 1px 0 rgb(93, 69, 35); - padding-left: 5px; -} -.navigation { - display: block; - margin-top: 0; - margin-bottom: 0; - min-height: 20px; -/* border: 1px solid #000; */ -} -.navi-menu { - margin-left: 0; -} -.menu-item { - font-size: 20px; - display: inline; - min-width: 150px; - height: 50px; - margin-left: 0; - margin-right: 10px; - padding: 5px; - border: .5px solit #000; - -webkit-border-top-right-radius: 6px; - -webkit-border-top-left-radius: 6px; - -moz-border-radius-topright: 6px; - -moz-border-radius-topleft: 6px; - border-top-right-radius: 6px; - border-top-left-radius: 6px; - box-shadow: 5px 5px 5px #eee; -} -.menu-selected { - font-size: 20px; - display: inline; - min-width: 150px; - height: 50px; - margin-left: 0; - margin-right: 10px; - padding: 5px; - border: .5px solit #000; - -webkit-border-top-right-radius: 6px; - -webkit-border-top-left-radius: 6px; - -moz-border-radius-topright: 6px; - -moz-border-radius-topleft: 6px; - border-top-right-radius: 6px; - border-top-left-radius: 6px; - box-shadow: 5px 5px 5px #eee; - background: rgb(73, 90, 88); - background: -moz-linear-gradient(bottom, rgba(73, 90, 88, 1), rgba(73, 90, 88, 0.5), rgba(73, 90, 88, 0)); - background: -webkit-gradient(linear, bottom, top, from(rgba(73, 90, 88, 1)), color-stop(0.5, rgba(73, 90, 88, 0.5)), to(rgba(73, 90, 88, 0))); - background: linear-gradient(to top, rgba(73, 90, 88, 1), rgba(73, 90, 88, 0.2)); - color: rgb(247, 254, 236); - text-shadow: -1px -1px 0 rgb(93, 69, 35), - 1px -1px 0 rgb(93, 69, 35), - -1px 1px 0 rgb(93, 69, 35), - 1px 1px 0 rgb(93, 69, 35); -} -.menu-item a { - text-decoration: none; -} -#sqlite-admin-wrap { - color: #1d1d1d; - font-size: 10pt; - border: 1px solid #ddd; -/* border-top: 0; */ - -webkit-border-bottom-right-radius: 6px; - -webkit-border-bottom-left-radius: 6px; - -moz-border-radius-bottomright: 6px; - -moz-border-radius-bottomleft: 6px; - border-bottom-right-radius: 6px; - border-bottom-left-radius: 6px; - display: block; - float: left; - min-height: 100px; - position: relative; - width: 47%; - margin-top: 10px; - padding: 5px; - box-shadow: 5px 5px 5px #eee; - z-index: 1; -} -#sqlite-admin-side-wrap { - color: #1d1d1d; - font-size: 10pt; - border: 1px solid #ddd; -/* border-top: 0; */ - -webkit-border-bottom-right-radius: 6px; - -webkit-border-bottom-left-radius: 6px; - -moz-border-radius-bottomright: 6px; - -moz-border-radius-bottomleft: 6px; - border-bottom-right-radius: 6px; - border-bottom-left-radius: 6px; - display: block; - float: left; - min-height: 100px; - position: relative; - width: 47%; - margin-top: 10px; - padding: 5px; - box-shadow: 5px 5px 5px #eee; - z-index: 1; -} -p { - text-indent: 15px; - line-height: 150%; - margin-left: 10px; - margin-right: 10px; -} -ul { - margin-left: 20px; -} -ol { - margin-left: 40px; -} -pre.code { - margin-left: 10px; - background: #eee; -} -.alt { - background: rgb(247, 254, 236); -} -.em { - font-weight: bold; - text-transform: capitalize; -} diff --git a/styles/ectoplasm.css b/styles/ectoplasm.css new file mode 100644 index 0000000..a083a90 --- /dev/null +++ b/styles/ectoplasm.css @@ -0,0 +1,42 @@ +/** + * This file is a part of SQLite Integration. + * + * @package SQLite Integration + * @author Kojima Toshiyasu + */ +@import url('./style.min.css'); +@CHARSET "UTF-8"; +#sqlite-admin-wrap h2, +#sqlite-admin-side-wrap h2 { + background: #523f6d; + color: rgb(255, 255, 255); + padding-left: 5px; +} +.menu-item { + font-size: 20px; + display: inline; + min-width: 150px; + height: 50px; + margin-left: 0; + margin-right: 10px; + padding: 5px; + border: .5px solit #000; + background: #523f6d; + color: rgb(255, 255, 255); + line-height: 40px; +} +.menu-selected { + font-size: 20px; + display: inline; + min-width: 150px; + height: 50px; + margin-left: 0; + margin-right: 10px; + padding: 5px; + background: #a3b745; + color: rgb(255, 255, 255); +} +.menu-item a { + text-decoration: none; + color: rgb(255, 255, 255); +} diff --git a/styles/ectoplasm.min.css b/styles/ectoplasm.min.css new file mode 100644 index 0000000..351d709 --- /dev/null +++ b/styles/ectoplasm.min.css @@ -0,0 +1 @@ +@import url('./style.min.css');@CHARSET "UTF-8";#sqlite-admin-wrap h2,#sqlite-admin-side-wrap h2{background:#523f6d;color:#fff;padding-left:5px}.menu-item{font-size:20px;display:inline;min-width:150px;height:50px;margin-left:0;margin-right:10px;padding:5px;border:.5px solit #000;background:#523f6d;color:#fff;line-height:40px}.menu-selected{font-size:20px;display:inline;min-width:150px;height:50px;margin-left:0;margin-right:10px;padding:5px;background:#a3b745;color:#fff}.menu-item a{text-decoration:none;color:#fff} \ No newline at end of file diff --git a/styles/index.php b/styles/index.php new file mode 100644 index 0000000..29d690a --- /dev/null +++ b/styles/index.php @@ -0,0 +1,2 @@ + .single { + width: 95%; +} #sqlite-admin-side-wrap { color: #1d1d1d; - font-size: 10pt; + font-size: 11pt; border: 1px solid #ddd; + background: rgb(255, 255, 255); /* border-top: 0; */ -webkit-border-bottom-right-radius: 6px; -webkit-border-bottom-left-radius: 6px; @@ -109,6 +94,12 @@ h3 { -moz-border-radius-bottomleft: 6px; border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; + -webkit-border-top-right-radius: 6px; + -webkit-border-top-left-radius: 6px; + -moz-border-radius-topright: 6px; + -moz-border-radius-topleft: 6px; + border-top-right-radius: 6px; + border-top-left-radius: 6px; display: block; float: left; min-height: 100%; @@ -121,27 +112,33 @@ h3 { } p { text-indent: 15px; - line-height: 150%; + line-height: 160%; + font-size: 11pt; + margin-left: 10px; + margin-right: 10px; +} +li { + line-height: 130%; } table#sys-info{ /* width: 600px; */ - width: 450px; + width: 80%; } table#status { - width: 450px; + width: 100%; } table#sqlite-table { /* width: 700px; */ - width: 650px; + width: 100%; } th.tbl-name { - width: 200px; + width: 25%; } th.tbl_owner { - width: 105px; + width: 25%; } th.tbl_index { - width: 350px; + width: 50%; } td.system { color: rgb(153, 0, 0); @@ -150,12 +147,12 @@ td.user { color: rgb(0, 0, 255); } td.menu-title { - width: 90px; + width: 95px; } table.statement { width: 500px; } -ul { +ul.in-body-list { margin-left: 20px; } ol { @@ -166,6 +163,9 @@ pre.code { margin-left: 15px; margin-right: 10px; background: #eee; + white-space: pre-wrap; + word-wrap: break-word; + overflow: auto; } tr.incompatible { background: rgb(251, 229, 221); @@ -176,10 +176,10 @@ tr.workaround { tr.compatible { } th.active-plugins { - width: 100px; + width: 20%; } th.compatible { - width: 80px; + width: 30%; } input.button-primary { display: block; @@ -189,18 +189,23 @@ input.button-primary { .alt { background: rgb(247, 254, 236); } -table#patch-files .item { - width: 40px; +.em { + font-weight: bold; + text-transform: capitalize; +} +table#patch-files .item, +table#backup-files .item { + width: 150px; } .alert { - color: rgb(256, 0, 0); + color: rgb(255, 0, 0); } div.alert { display: block; width: 95%; text-align: center; margin: 0 auto; - color: rgb(256, 0, 0); + color: rgb(255, 0, 0); text-transform: capitalize; } blockquote.caution { @@ -213,4 +218,151 @@ blockquote.caution { blockquote.caution > p { margin: 5px; padding: 0; +} +#errorlog, +#dbfile { + width: 100%; +} +/* + * Media Query + */ +@media screen and (max-width: 600px) { + #sqlite-admin-wrap { + width: 95%; + } + #sqlite-admin-side-wrap { + width: 95%; + } + #sqlite-admin-wrap > table#sys-info{ + width: 100%; + } + table#sys-info th.item { + width: 50% + } + #sqlite-admin-wrap > table#status { + width: 100%; + } + table#status th { + width: 50%; + } + table#sqlite-table { + width: 100%; + } + th.tbl-name { + width: 25%; + } + th.tbl_owner { + width: 25%; + } + th.tbl_index { + width: 50%; + } + #sqlite-admin-side-wrap table#plugins-info { + width: 100%; + } + th.installed-plugins { + width: 50%; + } + th.active-plugins { + width: 20%; + } + th.compatible { + width: 30%; + } + #sqlite-admin-side-wrap > table#plugins-table { + width: 100%; + } + #sqlite-admin-side-wrap > table#plugins-table th.item { + width: 30%; + } + #sqlite-admin-side-wrap > table#plugins-table th.compat { + width: 20%; + } + #sqlite-admin-side-wrap > table#plugins-table th.reason { + width: 50%; + } +} +@media screen and (max-width: 782px) { + #sqlite-admin-wrap { + width: 95%; + } + #sqlite-admin-side-wrap { + width: 95%; + } + table#plugins-info { + width: 480px; + } + table#sqlite-table { + width: 100%; + } + th.tbl-name { + width: 25%; + } + th.tbl_owner { + width: 25%; + } + th.tbl_index { + width: 50%; + } + #plugins-table { + width: 500px; + } +} +@media screen and (max-width: 900px) { + #sqlite-admin-wrap { + width: 95%; + } + #sqlite-admin-side-wrap { + width: 95%; + } + table#plugins-info { + width: 480px; + } + table#sqlite-table { + width: 100%; + } + th.tbl-name { + width: 25%; + } + th.tbl_owner { + width: 25%; + } + th.tbl_index { + width: 50%; + } + #plugins-table { + width: 500px; + } +} +@media screen and (max-width: 1169px) { + #sqlite-admin-wrap { + width: 95%; + } + #sqlite-admin-side-wrap { + width: 95%; + } + table#plugins-info { + width: 480px; + } + table#sys-info { + width: 460px; + } + table#status { + width: 460px; + } + table#sqlite-table { + width: 100%; + } + th.tbl-name { + width: 25%; + } + th.tbl_owner { + width: 25%; + } + th.tbl_index { + width: 50%; + } + #plugins-table { + width: 500px; + } } \ No newline at end of file diff --git a/styles/style.min.css b/styles/style.min.css new file mode 100644 index 0000000..b1f4dd8 --- /dev/null +++ b/styles/style.min.css @@ -0,0 +1 @@ +@CHARSET "UTF-8";#sqlite-admin-wrap h2,#sqlite-admin-side-wrap h2{background:#222;color:#fff;padding-left:5px}h3{clear:both}.navigation{display:block;margin-top:0;margin-bottom:0;min-height:20px}.navi-menu{margin-left:0}.menu-item{font-size:20px;display:inline;min-width:150px;height:50px;margin-left:0;margin-right:10px;padding:5px;border:.5px solit #000;background:#333;color:(255,255,255);line-height:40px}.menu-selected{font-size:20px;display:inline;min-width:150px;height:50px;margin-left:0;margin-right:10px;padding:5px;border:.5px solit #000;background:#2ea2cc;color:#fff}.menu-item a{text-decoration:none;color:#fff}#sqlite-admin-wrap{color:#1d1d1d;font-size:11pt;border:1px solid #ddd;background:#fff;-webkit-border-bottom-right-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomright:6px;-moz-border-radius-bottomleft:6px;border-bottom-right-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-right-radius:6px;-webkit-border-top-left-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-topleft:6px;border-top-right-radius:6px;border-top-left-radius:6px;display:block;float:left;min-height:100%;position:relative;width:58%;margin-top:10px;padding:5px;box-shadow:5px 5px 5px #eee;z-index:1}#wpbody-content>.single{width:95%}#sqlite-admin-side-wrap{color:#1d1d1d;font-size:11pt;border:1px solid #ddd;background:#fff;-webkit-border-bottom-right-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomright:6px;-moz-border-radius-bottomleft:6px;border-bottom-right-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-right-radius:6px;-webkit-border-top-left-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-topleft:6px;border-top-right-radius:6px;border-top-left-radius:6px;display:block;float:left;min-height:100%;position:relative;width:35%;margin-top:10px;padding:5px 5px 5px 5px;box-shadow:5px 5px 5px #eee;z-index:1}p{text-indent:15px;line-height:160%;font-size:11pt;margin-left:10px;margin-right:10px}li{line-height:130%}table#sys-info{width:80%}table#status{width:100%}table#sqlite-table{width:100%}th.tbl-name{width:25%}th.tbl_owner{width:25%}th.tbl_index{width:50%}td.system{color:#900}td.user{color:#00f}td.menu-title{width:95px}table.statement{width:500px}ul.in-body-list{margin-left:20px}ol{margin-left:40px}pre.code{padding:5px 5px 5px 5px;margin-left:15px;margin-right:10px;background:#eee;white-space:pre-wrap;word-wrap:break-word;overflow:auto}tr.incompatible{background:#fbe5dd}tr.workaround{background:#d9e8ed}th.active-plugins{width:20%}th.compatible{width:30%}input.button-primary{display:block;clear:both;width:100px}.alt{background:#f7feec}.em{font-weight:bold;text-transform:capitalize}table#patch-files .item,table#backup-files .item{width:150px}.alert{color:#f00}div.alert{display:block;width:95%;text-align:center;margin:0 auto;color:#f00;text-transform:capitalize}blockquote.caution{display:block;width:95%;border:3px double #000;margin:0 auto;padding:5px}blockquote.caution>p{margin:5px;padding:0}#errorlog,#dbfile{width:100%}@media screen and (max-width:600px){#sqlite-admin-wrap{width:95%}#sqlite-admin-side-wrap{width:95%}#sqlite-admin-wrap>table#sys-info{width:100%}table#sys-info th.item{width:50%}#sqlite-admin-wrap>table#status{width:100%}table#status th{width:50%}table#sqlite-table{width:100%}th.tbl-name{width:25%}th.tbl_owner{width:25%}th.tbl_index{width:50%}#sqlite-admin-side-wrap table#plugins-info{width:100%}th.installed-plugins{width:50%}th.active-plugins{width:20%}th.compatible{width:30%}#sqlite-admin-side-wrap>table#plugins-table{width:100%}#sqlite-admin-side-wrap>table#plugins-table th.item{width:30%}#sqlite-admin-side-wrap>table#plugins-table th.compat{width:20%}#sqlite-admin-side-wrap>table#plugins-table th.reason{width:50%}}@media screen and (max-width:782px){#sqlite-admin-wrap{width:95%}#sqlite-admin-side-wrap{width:95%}table#plugins-info{width:480px}table#sqlite-table{width:100%}th.tbl-name{width:25%}th.tbl_owner{width:25%}th.tbl_index{width:50%}#plugins-table{width:500px}}@media screen and (max-width:900px){#sqlite-admin-wrap{width:95%}#sqlite-admin-side-wrap{width:95%}table#plugins-info{width:480px}table#sqlite-table{width:100%}th.tbl-name{width:25%}th.tbl_owner{width:25%}th.tbl_index{width:50%}#plugins-table{width:500px}}@media screen and (max-width:1169px){#sqlite-admin-wrap{width:95%}#sqlite-admin-side-wrap{width:95%}table#plugins-info{width:480px}table#sys-info{width:460px}table#status{width:460px}table#sqlite-table{width:100%}th.tbl-name{width:25%}th.tbl_owner{width:25%}th.tbl_index{width:50%}#plugins-table{width:500px}} \ No newline at end of file diff --git a/styles/sunrise.css b/styles/sunrise.css new file mode 100644 index 0000000..e8cdcb0 --- /dev/null +++ b/styles/sunrise.css @@ -0,0 +1,42 @@ +/** + * This file is a part of SQLite Integration. + * + * @package SQLite Integration + * @author Kojima Toshiyasu + */ +@import url('./style.min.css'); +@CHARSET "UTF-8"; +#sqlite-admin-wrap h2, +#sqlite-admin-side-wrap h2 { + background: #cf4944; + color: rgb(255, 255, 255); + padding-left: 5px; +} +.menu-item { + font-size: 20px; + display: inline; + min-width: 150px; + height: 50px; + margin-left: 0; + margin-right: 10px; + padding: 5px; + border: .5px solit #000; + background: #cf4944; + color: rgb(255, 255, 255); + line-height: 40px; +} +.menu-selected { + font-size: 20px; + display: inline; + min-width: 150px; + height: 50px; + margin-left: 0; + margin-right: 10px; + padding: 5px; + background: #dd823b; + color: rgb(256, 256, 256); +} +.menu-item a { + text-decoration: none; + color: rgb(255, 255, 255); +} diff --git a/styles/sunrise.min.css b/styles/sunrise.min.css new file mode 100644 index 0000000..23a89b6 --- /dev/null +++ b/styles/sunrise.min.css @@ -0,0 +1 @@ +@import url('./style.min.css');@CHARSET "UTF-8";#sqlite-admin-wrap h2,#sqlite-admin-side-wrap h2{background:#cf4944;color:#fff;padding-left:5px}.menu-item{font-size:20px;display:inline;min-width:150px;height:50px;margin-left:0;margin-right:10px;padding:5px;border:.5px solit #000;background:#cf4944;color:#fff;line-height:40px}.menu-selected{font-size:20px;display:inline;min-width:150px;height:50px;margin-left:0;margin-right:10px;padding:5px;background:#dd823b;color:#100100100}.menu-item a{text-decoration:none;color:#fff} \ No newline at end of file diff --git a/utilities/database_maintenance.php b/utilities/database_maintenance.php new file mode 100644 index 0000000..ea2e313 --- /dev/null +++ b/utilities/database_maintenance.php @@ -0,0 +1,607 @@ +prefix.'commentmeta' => array( + 'comment_id' => '\'0\'', + 'meta_key' => 'NULL' + ), + $wpdb->prefix.'comments' => array( + 'comment_post_ID' => '\'0\'', + 'comment_author_email' => '\'\'', + 'comment_author_url' => '\'\'', + 'comment_author_IP' => '\'\'', + 'comment_date_gmt' => '\'0000-00-00 00:00:00\'', + 'comment_date' => '\'0000-00-00 00:00:00\'', + 'comment_karma' => '\'0\'', + 'comment_approved' => '\'1\'', + 'comment_agent' => '\'\'', + 'comment_type' => '\'\'', + 'comment_parent' => '\'0\'', + 'user_id' => '\'0\'' + ), + $wpdb->prefix.'links' => array( + 'link_url' => '\'\'', + 'link_name' => '\'\'', + 'link_image' => '\'\'', + 'link_target' => '\'\'', + 'link_description' => '\'\'', + 'link_visible' => '\'Y\'', + 'link_owner' => '\'1\'', + 'link_rating' => '\'0\'', + 'link_updated' => '\'0000-00-00 00:00:00\'', + 'link_rel' => '\'\'', + 'link_rss' => '\'\'' + ), + $wpdb->prefix.'options' => array( + 'option_name' => '\'\'', + 'autoload' => '\'yes\'' + ), + $wpdb->prefix.'postmeta' => array( + 'post_id' => '\'0\'', + 'meta_key' => 'NULL' + ), + $wpdb->prefix.'posts' => array( + 'post_author' => '\'0\'', + 'post_date_gmt' => '\'0000-00-00 00:00:00\'', + 'post_date' => '\'0000-00-00 00:00:00\'', + 'post_status' => '\'publish\'', + 'comment_status' => '\'open\'', + 'ping_status' => '\'open\'', + 'post_password' => '\'\'', + 'post_name' => '\'\'', + 'post_modified_gmt' => '\'0000-00-00 00:00:00\'', + 'post_modified' => '\'0000-00-00 00:00:00\'', + 'post_parent' => '\'0\'', + 'guid' => '\'\'', + 'menu_order' => '\'0\'', + 'post_type' => '\'post\'', + 'post_mime_type' => '\'\'', + 'comment_count' => '\'0\'' + ), + $wpdb->prefix.'term_relationships' => array( + 'term_order' => '0' + ), + $wpdb->prefix.'term_taxonomy' => array( + 'taxonomy' => '\'\'', + 'parent' => '0', + 'count' => '0' + ), + $wpdb->prefix.'terms' => array( + 'name' => '\'\'', + 'slug' => '\'\'', + 'term_group' => '0' + ), + $wpdb->prefix.'users' => array( + 'user_login' => '\'\'', + 'user_pass' => '\'\'', + 'user_nicename' => '\'\'', + 'user_email' => '\'\'', + 'user_url' => '\'\'', + 'user_registered' => '\'0000-00-00 00:00:00\'', + 'user_activation_key' => '\'\'', + 'user_status' => '\'0\'', + 'display_name' => '\'\'', + // for network install + 'spam' => '\'0\'', + 'deleted' => '\'0\'' + ), + $wpdb->prefix.'usermeta' => array( + 'user_id' => '\'0\'', + 'meta_key' => 'NULL', + ), + // for network install + $wpdb->prefix.'blog_versions' => array( + 'blog_id' => '\'0\'', + 'db_version' => '\'\'', + 'last_updated' => '\'0000-00-00 00:00:00\'' + ), + $wpdb->prefix.'blogs' => array( + 'site_id' => '\'0\'', + 'domain' => '\'\'', + 'path' => '\'\'', + 'registered' => '\'0000-00-00 00:00:00\'', + 'last_updated' => '\'0000-00-00 00:00:00\'', + 'public' => '\'1\'', + 'mature' => '\'0\'', + 'spam' => '\'0\'', + 'deleted' => '\'0\'', + 'lang_id' => '\'0\'' + ), + $wpdb->prefix.'registration_log' => array( + 'email' => '\'\'', + 'IP' => '\'\'', + 'blog_id' => '\'0\'', + 'date_registered' => '\'0000-00-00 00:00:00\'' + ), + $wpdb->prefix.'signups' => array( + 'domain' => '\'\'', + 'path' => '\'\'', + 'user_login' => '\'\'', + 'user_email' => '\'\'', + 'registered' => '\'0000-00-00 00:00:00\'', + 'activated' => '\'0000-00-00 00:00:00\'', + 'active' => '\'0\'', + 'activation_key' => '\'\'', + ), + $wpdb->prefix.'site' => array( + 'domain' => '\'\'', + 'path' => '\'\'' + ), + $wpdb->prefix.'sitemeta' => array( + 'site_id' => '\'0\'', + 'meta_key' => 'NULL', + ) + ); + $tables = $wpdb->tables('all'); + foreach ($tables as $table) { + $col_infos = $wpdb->get_results("SHOW COLUMNS FROM $table"); + foreach ($col_infos as $col) { + if (array_key_exists($col->Field, $columns_to_check[$table]) && $col->Default != $columns_to_check[$table][$col->Field]) { + $results_table[$table] = 'damaged'; + break; + } + } + } + if (empty($results_table)) { + return true; + } else { + return $results_table; + } + } + /** + * Method to do the fixing job to the broken tables. + * + * If the job succeeded, it returns string of success message. + * If failed, it returns the array of the failed query for debugging. + * + * @return string|array of string + * @access private + */ + private function do_fix_database() { + global $wpdb, $wp_version, $utils; + $global_schema_to_change = array( + $wpdb->prefix.'commentmeta' => array( + "comment_id bigint(20) unsigned NOT NULL default '0'", + "meta_key varchar(255) default NULL", + "meta_value longtext" + ), + $wpdb->prefix.'comments' => array( + "comment_post_ID bigint(20) unsigned NOT NULL default '0'", + "comment_author_email varchar(100) NOT NULL default ''", + "comment_author_url varchar(200) NOT NULL default ''", + "comment_author_IP varchar(100) NOT NULL default ''", + "comment_date datetime NOT NULL default '0000-00-00 00:00:00'", + "comment_date_gmt datetime NOT NULL default '0000-00-00 00:00:00'", + "comment_karma int(11) NOT NULL default '0'", + "comment_approved varchar(20) NOT NULL default '1'", + "comment_agent varchar(255) NOT NULL default ''", + "comment_type varchar(20) NOT NULL default ''", + "comment_parent bigint(20) unsigned NOT NULL default '0'", + "user_id bigint(20) unsigned NOT NULL default '0'" + ), + $wpdb->prefix.'links' => array( + "link_url varchar(255) NOT NULL default ''", + "link_name varchar(255) NOT NULL default ''", + "link_image varchar(255) NOT NULL default ''", + "link_target varchar(25) NOT NULL default ''", + "link_description varchar(255) NOT NULL default ''", + "link_visible varchar(20) NOT NULL default 'Y'", + "link_owner bigint(20) unsigned NOT NULL default '1'", + "link_rating int(11) NOT NULL default '0'", + "link_updated datetime NOT NULL default '0000-00-00 00:00:00'", + "link_rel varchar(255) NOT NULL default ''", + "link_notes mediumtext NOT NULL", + "link_rss varchar(255) NOT NULL default ''" + ), + $wpdb->prefix.'options' => array( + "option_name varchar(64) NOT NULL default ''", + "option_value longtext NOT NULL", + "autoload varchar(20) NOT NULL default 'yes'" + ), + $wpdb->prefix.'postmeta' => array( + "post_id bigint(20) unsigned NOT NULL default '0'", + "meta_key varchar(255) default NULL", + "meta_value longtext" + ), + $wpdb->prefix.'posts' => array( + "post_author bigint(20) unsigned NOT NULL default '0'", + "post_date datetime NOT NULL default '0000-00-00 00:00:00'", + "post_date_gmt datetime NOT NULL default '0000-00-00 00:00:00'", + "post_status varchar(20) NOT NULL default 'publish'", + "comment_status varchar(20) NOT NULL default 'open'", + "ping_status varchar(20) NOT NULL default 'open'", + "post_password varchar(20) NOT NULL default ''", + "post_name varchar(200) NOT NULL default ''", + "post_modified datetime NOT NULL default '0000-00-00 00:00:00'", + "post_modified_gmt datetime NOT NULL default '0000-00-00 00:00:00'", + "post_content_filtered longtext NOT NULL", + "post_parent bigint(20) unsigned NOT NULL default '0'", + "guid varchar(255) NOT NULL default ''", + "menu_order int(11) NOT NULL default '0'", + "post_type varchar(20) NOT NULL default 'post'", + "post_mime_type varchar(100) NOT NULL default ''", + "comment_count bigint(20) NOT NULL default '0'" + ), + $wpdb->prefix.'term_relationships' => array( + "term_order int(11) NOT NULL default 0" + ), + $wpdb->prefix.'term_taxonomy' => array( + "taxonomy varchar(32) NOT NULL default ''", + "description longtext NOT NULL", + "parent bigint(20) unsigned NOT NULL default 0", + "count bigint(20) NOT NULL default 0" + ), + $wpdb->prefix.'terms' => array( + "name varchar(200) NOT NULL default ''", + "slug varchar(200) NOT NULL default ''", + "term_group bigint(10) NOT NULL default 0" + ), + $wpdb->prefix.'users' => array( + "user_login varchar(60) NOT NULL default ''", + "user_pass varchar(64) NOT NULL default ''", + "user_nicename varchar(50) NOT NULL default ''", + "user_email varchar(100) NOT NULL default ''", + "user_url varchar(100) NOT NULL default ''", + "user_registered datetime NOT NULL default '0000-00-00 00:00:00'", + "user_activation_key varchar(60) NOT NULL default ''", + "user_status int(11) NOT NULL default '0'", + "display_name varchar(250) NOT NULL default ''" + ), + $wpdb->prefix.'usermeta' => array( + "user_id bigint(20) unsigned NOT NULL default '0'", + "meta_key varchar(255) default NULL", + "meta_value longtext" + ) + ); + + $network_schema_to_change = array( + $wpdb->prefix.'blog_versions' => array( + "blog_id bigint(20) NOT NULL default '0'", + "db_version varchar(20) NOT NULL default ''", + "last_updated datetime NOT NULL default '0000-00-00 00:00:00'" + ), + $wpdb->prefix.'blogs' => array( + "site_id bigint(20) NOT NULL default '0'", + "domain varchar(200) NOT NULL default ''", + "path varchar(100) NOT NULL default ''", + "registered datetime NOT NULL default '0000-00-00 00:00:00'", + "last_updated datetime NOT NULL default '0000-00-00 00:00:00'", + "public tinyint(2) NOT NULL default '1'", + "mature tinyint(2) NOT NULL default '0'", + "spam tinyint(2) NOT NULL default '0'", + "deleted tinyint(2) NOT NULL default '0'", + "lang_id int(11) NOT NULL default '0'" + ), + $wpdb->prefix.'registration_log' => array( + "email varchar(255) NOT NULL default ''", + "IP varchar(30) NOT NULL default ''", + "blog_id bigint(20) NOT NULL default '0'", + "date_registered datetime NOT NULL default '0000-00-00 00:00:00'" + ), + $wpdb->prefix.'signups' => array( + "domain varchar(200) NOT NULL default ''", + "path varchar(100) NOT NULL default ''", + "title longtext NOT NULL", + "user_login varchar(60) NOT NULL default ''", + "user_email varchar(100) NOT NULL default ''", + "registered datetime NOT NULL default '0000-00-00 00:00:00'", + "activated datetime NOT NULL default '0000-00-00 00:00:00'", + "active tinyint(1) NOT NULL default '0'", + "activation_key varchar(50) NOT NULL default ''", + "meta longtext" + ), + $wpdb->prefix.'site' => array( + "domain varchar(200) NOT NULL default ''", + "path varchar(100) NOT NULL default ''" + ), + $wpdb->prefix.'sitemeta' => array( + "site_id bigint(20) NOT NULL default '0'", + "meta_key varchar(255) default NULL", + "meta_value longtext" + ), + $wpdb->prefix.'users' => array( + "user_login varchar(60) NOT NULL default ''", + "spam tinyint(2) NOT NULL default '0'", + "deleted tinyint(2) NOT NULL default '0'" + ) + ); + if (version_compare($wp_version, '3.6', '<')) return false; + $return_val = array(); + $queries = array(); + $results = $this->sanity_check(); + if ($results !== true) { + if (!$this->maintenance_backup()) { + $message = __('Can\'t create backup file.', $domain); + return $message; + } + $tables = array_keys($results); + foreach ($tables as $table) { + if (key_exists($table, $global_schema_to_change)) { + $queries = $global_schema_to_change[$table]; + } + if (key_exists($table, $network_schema_to_change)) { + if (!empty($queries)) { + $queries = array_merge($queries, $network_schema_to_change[$table]); + } else { + $queries = $network_schema_to_change[$table]; + } + } + foreach ($queries as $query) { + $sql = 'ALTER TABLE' . ' ' . $table . ' ' . 'CHANGE COLUMN' . ' ' . $query; + $res = $wpdb->query($sql); + if ($res === false) { + $return_val[] = __('Failed: ', $domain) . $query; + } + } + } + } else { + $message = __('Your database is OK. You don\'t have to restore it.', $domain); + return $message; + } + if (empty($return_val)) { + $message = __('Your database restoration is successfully finished!', $domain); + return $message; + } else { + return $return_val; + } + } + /** + * Method to return the result of SHOW COLUMNS query. + * + * It returns the result of SHOW COLUMNS query as an object if the table exists. + * It returns the error message if the table doesn't exist. + * + * @return string|object + */ + private function show_columns() { + global $wpdb, $utils; + $domain = $utils->text_domain; + $tables = $wpdb->tables('all'); + if (!isset($_POST['table'])) { + $message = __('Table name is not selected.', $domain); + return $message; + } elseif (!in_array($_POST['table'], $tables)) { + $message = __('There\'s no such table.', $domain); + return $message; + } else { + $table_name = $_POST['table']; + $results = $wpdb->get_results("SHOW COLUMNS FROM $table_name"); + return $results; + } + } + /** + * Method to create a back up file of the database. + * + * It returns true if success, false if failure. + * + * @return boolean + */ + private function maintenance_backup() { + $result = array(); + $database_file = FQDB; + $db_name = basename(FQDB); + if (!file_exists($database_file)) { + return false; + } + $today = date("Ymd-His"); + if (!extension_loaded('zip')) { + $backup_file = $database_file . '.' . $today . '.maintenance-backup'; + if (copy($database_file, $backup_file)) { + $result = true; + } else { + $result = false; + } + } else { + $backup_file = $database_file . '.' . $today . '.maintenance-backup.zip'; + $zip = new ZipArchive(); + $res = $zip->open($backup_file, ZipArchive::CREATE | ZipArchive::OVERWRITE); + if ($res === true) { + $zip->addFile($database_file, $db_name); + $result = true; + } else { + $result = false; + } + $zip->close(); + } + return $result; + } + /** + * Method to display the maintenance page on the admin panel. + * + */ + function show_maintenance_page() { + global $utils, $wpdb; + $domain = $utils->text_domain; + if (is_multisite() && !current_user_can('manage_network_options')) { + die(__('You are not allowed to access this page!', $domain)); + } elseif (!current_user_can('manage_options')) { + die(__('You are not allowed to access this page!', $domain)); + } + if (isset($_GET['page']) && $_GET['page'] == 'maintenance') : ?> + +
+

+

+

+ + +

+

+ +

+

+ +

+

+ +

+ +
+ + + +
+ + +

+

+ +

+ tables('all'); + ?> +
+ + + + +
+ + +
+ do_fix_database(); + if (is_array($fix_results)) { + $title = '

'. __('Results', $domain) . '

'; + echo '
'; + echo $title; + echo '
    '; + foreach ($fix_results as $result) { + echo '
  • ' . $result . '
  • '; + } + echo '
'; + echo '
'; + } else { + $title = '

'. __('Results', $domain) . '

'; + echo '
'; + echo $title; + echo '

'.$fix_results.'

'; + echo '
'; + } + } + if (isset($_POST['sanity-check'])) { + check_admin_referer('sqliteintegration-database-manip-stats'); + if (is_multisite() && !current_user_can('manage_network_options')) { + die(__('You are not allowed to do this operation!', $domain)); + } elseif (!current_user_can('manage_options')) { + die(__('You are not allowed to do this operation!', $domain)); + } + $check_results = $this->sanity_check(); + if ($check_results !== true) { + $title = '

'. __('Checked Results', $domain) . '

'; + echo '
'; + echo $title; + echo '
    '; + foreach ($check_results as $table => $damaged) { + $message = __(' needs restoring.', $domain); + echo '
  • ' . $table . '' . $message . '
  • '; + } + echo '
'; + echo '
'; + } else { + $title = '

'. __('Checked Results', $domain) . '

'; + $message = __('Your database is OK. You don\'t have to restore it.', $domain); + echo '
'; + echo $title; + echo '

'.$message.'

'; + echo '
'; + } + } + if (isset($_POST['show-columns'])) { + check_admin_referer('sqliteintegration-database-manip-stats'); + if (is_multisite() && !current_user_can('manage_network_options')) { + die(__('You are not allowed to do this operation!', $domain)); + } elseif (!current_user_can('manage_options')) { + die(__('You are not allowed to do this operation!', $domain)); + } + $results = $this->show_columns(); + if (is_array($results)) { + $title = '

'. sprintf(__('Columns In %s', $domain), $_POST['table']) . '

'; + $column_header = __('Column', $domain); + $type_header = __('Type', $domain); + $null_header = __('Null', $domain); + $default_header = __('Default', $domain); + echo '
'; + echo $title; + echo ''; + echo ''; + $counter = 0; + foreach ($results as $column) { + echo (($counter % 2) == 1) ? '' : ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + $counter++; + } + echo '
'. $column_header . ''. $type_header . '' . $null_header . '' . $default_header . '
' . $column->Field . '' . $column->Type . '' . $column->Null . '' . $column->Default . '
'; + } else { + $title = '

'. __('Columns Info', $domain) . '

'; + echo '
'; + echo $title; + echo '

' . $results; + echo '

'; + } + } + } +} +?> \ No newline at end of file diff --git a/utilities/documentation.php b/utilities/documentation.php index 8fe9f7b..18343da 100644 --- a/utilities/documentation.php +++ b/utilities/documentation.php @@ -1,16 +1,22 @@ text_domain; if (is_multisite() && !current_user_can('manage_network_options')) { @@ -25,12 +31,13 @@ class SQLiteIntegrationDocument { +

- Plugin Page.', $domain);?> + SQLite Integration page.', $domain);?>

@@ -38,7 +45,7 @@ class SQLiteIntegrationDocument {

- PDO for WordPress, which enabled WordPress to use SQLite for its database. But PDO for WordPress doesn\'t seem to be maintained any more only to be outdated. SQLite Integration makes use of the basic ideas and framework of PDO for WordPress, adds some new features and updates it to be able to work with the newest version of WordPress(3.5.1 and 3.6 beta).', $domain); ?> + PDO for WordPress, which enabled WordPress to use SQLite for its database. But PDO for WordPress doesn\'t seem to be maintained any more only to be outdated. SQLite Integration makes use of the basic ideas and framework of PDO for WordPress, adds some new features and updates it to be able to work with the newest version of WordPress(3.8.1).', $domain); ?>

SQLite Web Page says — SQLite is a "software library that implements selfcontained, serverless, zero-configuration, transactional SQL database engine". It is "a good choice for small to medium size websites". It\'s small and portable, and you don\'t need any database server system.', $domain); ?> @@ -66,10 +73,10 @@ class SQLiteIntegrationDocument {

    -
  1. ', $domain);?> +
  2. ', $domain);?>
  3. ', $domain);?> - Patch Utility. See also the Plugin Page for more details.', $domain), $utils->show_parent());?>
  4. + Patch Utility. See also the SQLite Integration Page for more details.', $domain), $utils->show_parent());?>

Support Forum.', $domain);?> @@ -86,7 +93,7 @@ class SQLiteIntegrationDocument {

-
    + @@ -102,15 +109,15 @@ class SQLiteIntegrationDocument {

    - System Info page. To see more details, please visit the Plugin Page.', $domain), $utils->show_parent());?> + System Info page. To see more details, please visit the Plugin Page.', $domain), $utils->show_parent());?>

    - - + + @@ -131,62 +138,13 @@ class SQLiteIntegrationDocument { - +
    reason;?>
    - -

    -

    - -

    -

    - My recommendation is not to use caching plugins. Even so, if you want a caching plugin, you could try WP Super Cache, which doesn\'t use db.php file. But no warranty, try at your own risk.', $domain);?> -

    -

    - -

    -

    -

    - -

    -

    - -

    -
    -$postRes = mysql_query($sql,$wpdb->dbh);
    -
    -

    - -

    -
    -if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') ) {
    -
    -

    - -

    -

    - -

    -
    -$postRes = $wpdb->query($sql);
    -
    -
    -if ( version_compare($wpdb->db_version(), '4.1.0', '>=') ) {
    -
    -

    - -

    -

    -

    - -

    -

    - WordPress Related Posts or Related Posts or others. They are working fine with SQLite Integration!', $domain);?> -

    -
+ text_domain; $installed_plugins = array(); $file_names = array(); $output = array(); $retval = 0; $patch_results = array(); + $message = ''; if (isset($_POST['plugin_checked'])) { $file_names = $_POST['plugin_checked']; } else { @@ -97,12 +111,18 @@ class PatchUtils { return $patch_results; } /** - * Delete uploaded patch file(s). + * Method to remove patch file(s) from the server. + * + * It deletes uploaded patch file(s). * If patch file(s) is not selected, returns false. * Or else returns array contains messages. + * * @return boolean|array + * @access private */ private function delete_patch_files() { + global $utils; + $domain = $utils->text_domain; $file_names = array(); $rm_results = array(); if (isset($_POST['plugin_checked'])) { @@ -110,45 +130,104 @@ class PatchUtils { } else { return false; } - $command = 'rm -f'; - foreach ($file_names as $file) { - if (chdir(SQLitePatchDir)) { - exec("$command $file", $output, $retval); - } else { - $rm_results[$file] = __('Error!: patches directory is not accessible.', $domain); - } - if ($retval > 0) { - $rm_results[$file] = sprintf(__('Error! Messages: %s', $domain), $output); - } else { - $rm_results[$file] = sprintf(__('File %s is deleted.', $domain), $file); - } + if (chdir(SQLitePatchDir)) { + foreach ($file_names as $file) { + if (unlink($file)) { + $rm_results[$file] = sprintf(__('File %s is deleted.', $domain), $file); + } else { + $rm_results[$file] = sprintf(__('Error! File %s is not deleted.', $domain), $file); + } + } + } else { + $rm_results[$file] = __('Error!: patches directory is not accessible.', $domain); } return $rm_results; } /** - * Uploads a patch file. + * Method to upload patch file(s) to the server. + * + * It uploads a patch file to the server. You must have the permission to write to the + * temporary directory. If there isn't SQLitePatchDir, this method will create it and + * set the permission to 0707. + * * No return values. + * + * @return boolean + * @access private */ private function upload_file() { + global $utils; + $domain = $utils->text_domain; if (!file_exists(SQLitePatchDir) || !is_dir(SQLitePatchDir)) { - mkdir(SQLitePatchDir, 0705, true); + if (!mkdir(SQLitePatchDir, 0707, true)) { + $message = __('Unable to create a patch directory.', $domain); + echo '
'.$message.'
'; + return false; + } + } + if (!is_file(SQLitePatchDir . '/.htaccess')) { + $fp = fopen(SQLitePatchDir . '/.htaccess', 'w'); + if (!$fp) { + $message = __('Unable to create a .htaccess file.', $domain); + echo '
'.$message.'
'; + return false; + } + fwrite($fp, 'DENY FROM ALL'); + fclose($fp); + } + if (!isset($_FILES['upfile']['error']) || !is_int($_FILES['upfile']['error'])) { + $message = __('Invalid operation.', $domain); + echo '
'.$message.'
'; + return false; + } elseif ($_FILES['upfile']['error'] != UPLOAD_ERR_OK) { + switch ($_FILES['upfile']['error']) { + case UPLOAD_ERR_FORM_SIZE: + $message = __('File is too large to upload.', $domain); + echo '
'.$message.'
'; + break; + case UPLOAD_ERR_PARTIAL: + $message = __('File upload is not complete.', $domain); + echo '
'.$message.'
'; + break; + case UPLOAD_ERR_NO_FILE: + $message = __('File is not uploaded.', $domain); + echo '
'.$message.'
'; + break; + case UPLOAD_ERR_NO_TMP_DIR: + $message = __('Temporary directory is not writable.', $domain); + echo '
'.$message.'
'; + break; + case UPLOAD_ERR_CANT_WRITE: + $message = __('File cannot be written on the disk.', $domain); + echo '
'.$message.'
'; + break; + default: + $message = __('Unknown error.', $domain); + break; + } + return false; } if (is_uploaded_file($_FILES['upfile']['tmp_name'])) { - if (move_uploaded_file($_FILES['upfile']['tmp_name'], SQLitePatchDir.'/'.$_FILES['upfile']['name'])) { - $message = __('File is uploaded', $domain); + $file_full_path = SQLitePatchDir . '/' . $_FILES['upfile']['name']; + if (move_uploaded_file($_FILES['upfile']['tmp_name'], $file_full_path)) { + $message = __('File is successfully uploaded.', $domain); echo '
'.$message.'
'; - chmod(SQLitePatchDir.'/'.$_FILES['upfile']['name'], 0644); + chmod(SQLitePatchDir.'/'.$_FILES['upfile']['name'], 0606); } else { - $message = __('File is not uploaded', $domain); + $message = __('File upload failed. Possible file upload attack.', $domain); echo '
'.$message.'
'; + return false; } } else { $message = __('File is not selected', $domain); echo '
'.$message.'
'; + return false; } + return true; } /** - * Displays patch util page + * Method to display the patch utility page on the admin panel. + * */ function show_patch_page() { global $utils; @@ -198,7 +277,7 @@ class PatchUtils { } echo ''; } else { - $message = __('Error! Please remove files manually'); + $message = __('Error! Please remove files manually', $domain); echo '
'.$message.'
'; } } @@ -218,6 +297,7 @@ class PatchUtils { +
@@ -279,7 +359,8 @@ class PatchUtils { wp_nonce_field('sqlitewordpress-plugin-patch-file-stats'); } ?> -
+ +
diff --git a/utilities/plugin_lists.json b/utilities/plugin_lists.json index 5055e89..1b1be44 100644 --- a/utilities/plugin_lists.json +++ b/utilities/plugin_lists.json @@ -1,4 +1,18 @@ [ + { + "name":"Add Meta Tags", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Advanced Sitemap Generator", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"Akismet", "compat":"Checked", @@ -11,18 +25,53 @@ "class":"compatible" }, + { + "name":"All In One WP Security & Firewall", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Anti-spam", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"Any Mobile Theme Switcher", "compat":"Checked", "class":"compatible" }, - + + { + "name":"Batcache", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"BAW Manual Related Posts", "compat":"Checked", "class":"compatible" }, - + + { + "name":"bbPress", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Better Delete Revision", + "compat":"No", + "reason":"DELETE with JOIN/etc", + "class":"incompatible" + }, + { "name":"Better Related Posts", "compat":"No", @@ -30,6 +79,20 @@ "class":"incompatible" }, + { + "name":"Better WP Security", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WP Bit.ly", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"Breadcrumb NavXT", "compat":"Checked", @@ -38,8 +101,10 @@ { "name":"Broken Link Checker", - "compat":"Checked", - "class":"compatible" + "compat":"Needs Patch", + "patch_url":"http://dogwood.skr.jp/wordpress/plugins/", + "reason":"MySQL function", + "class":"workaround" }, { @@ -48,6 +113,20 @@ "class":"compatible" }, + { + "name":"BuddyPress", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"BuddyPress Courseware", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"Camera slideshow", "compat":"Needs Patch", @@ -56,12 +135,40 @@ "class":"workaround" }, + { + "name":"Cart66 Cloud :: Ecommerce with security", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Cart66 Lite :: WordPress Ecommerce", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"Category Order and Taxonomy Terms Order", "compat":"Checked", "class":"compatible" }, + { + "name":"CKEditor For WordPress", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"configure-login-timeout", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"Contact Form 7", "compat":"Checked", @@ -74,12 +181,61 @@ "class":"compatible" }, + { + "name":"Control XML-RPC publishing", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Count per Day", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"Crayon Syntax Highlighter", "compat":"Checked", "class":"compatible" }, + { + "name":"Custom Post type and short code", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Custom Content Shortcode", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Custom Field List Widget", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Custom Meta Widget", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Custom sidebars", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"DB Cache Reloaded Fix", "compat":"Probably No", @@ -105,18 +261,96 @@ "class":"compatible" }, + { + "name":"Disable XML-RPC", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Download Button Shortcode", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WordPress Download Manager", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"Dynamic To Top", "compat":"Checked", "class":"compatible" }, + { + "name":"Easy Digital Downloads", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Easy WP SMTP", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"EDD Hide Download", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"eShop", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Facebook", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"FeedWordPress", + "compat":"Needs patch", + "patch_url":"http://dogwood.skr.jp/wordpress/plugins/", + "reason":"MySQL specific function", + "class":"workaround" + }, + + { + "name":"FlexiCache", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"Google Analyticator", "compat":"Checked", "class":"compatible" }, + { + "name":"Google Analytics for WordPress", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"Google Analytics Popular Posts", "compat":"Checked", @@ -137,6 +371,13 @@ "class":"compatible" }, + { + "name":"HTTP Digest Authentication", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"HyperDB", "compat":"Probably No", @@ -150,6 +391,13 @@ "class":"compatible" }, + { + "name":"Jigoshop", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"Ktai Style", "compat":"Checked", @@ -162,6 +410,104 @@ "class":"compatible" }, + { + "name":"Login Only 1 Session", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Mass Email To users", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Mathjax Latex", + "compat":"Checked", + "class":"compatible" + }, + + { + "name":"Members", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Members Category", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"MP6", + "compat":"Checked", + "class":"compatible" + }, + + { + "name":"Multisite Global Search", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Multisite User Management", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"MW WP Form", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"My Content Management", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Networks for WordPress", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"NewStatPress", + "compat":"Needs Patch", + "patch_url":"http://dogwood.skr.jp/wordpress/plugins/", + "reason":"MySQL specific data", + "class":"workaround" + }, + + { + "name":"NextGEN Gallery", + "compat":"Needs Patch", + "patch_url":"http://dogwood.skr.jp/wordpress/plugins/", + "reason":"MySQL specific function", + "class":"workaround" + }, + + { + "name":"StatCounter - Free Real Time Visitor Stats", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"Optimize Database after Deleting Revisions", "compat":"Probably No", @@ -169,12 +515,67 @@ "class":"workaround" }, + { + "name":"Options Framework", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"OSE Firewall™ Security", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Page Builder by SiteOrigin", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"PDF.js Viewer Shortcode", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"PHP Code Widget", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"Polylang", "compat":"Checked", "class":"compatible" }, + { + "name":"Prevent XMLRPC", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Qikmo Mobile Website Redirection", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Redirection", + "compat":"Checked", + "class":"compatible" + }, + { "name":"Related Posts", "compat":"Checked", @@ -187,6 +588,13 @@ "class":"compatible" }, + { + "name":"Safer Cookies", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"Search Everything", "compat":"Checked", @@ -199,46 +607,209 @@ "class":"compatible" }, + { + "name":"Sell Downloads", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Session Manager", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Simple Session Support", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Simple Tags", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Smart Donations", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Socializer!", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"SQLite Integration", "compat":"Checked", "class":"compatible" }, + { + "name":"StatPress", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"Synchi", "compat":"Checked", "class":"compatible" }, + { + "name":"SysInfo", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"System information", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"Theme-Check", "compat":"Checked", "class":"compatible" }, + { + "name":"Theme My Login", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Welcart e-Commerce", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"Wikiful Mediawiki Bridge", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WooCommerce - excelling eCommerce", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"Wordfence Security", "compat":"Checked", "class":"compatible" }, + { + "name":"WordPress Advanced Ticket System", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WP Attachments", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"WordPress Beta Tester", "compat":"Checked", "class":"compatible" }, + { + "name":"WP Campaign Manager", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WordPress.com Custom CSS", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WordPress.com Stats", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WordPress Hit Counter", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"WordPress Importer", "compat":"Checked", "class":"compatible" }, + { + "name":"WordPress Login Redirect", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WordPress Mobile Pack", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WordPress MU Domain Mapping", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WordPress MU Sitewide Tags Pages", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"Wordpress Popular Posts", - "compat":"Checked", - "class":"compatible" + "compat":"Needs Patch", + "patch_url":"http://dogwood.skr.jp/wordpress/plugins/", + "reason":"MySQL specific query", + "class":"workaround" }, { @@ -247,12 +818,123 @@ "class":"compatible" }, + { + "name":"WordPress SEO by Yoast", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WP Document Revisions", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WP e-Commerce", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WP Email Login", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WP Emmet", + "compat":"Checked", + "class":"compatible" + }, + + { + "name":"WP Custom Login", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WP Frontpage News", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WP iSell Photo", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WP Mail SMTP", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WP-Members", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WP-Piwik", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WPtap Mobile Detector", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WP Mobile Edition", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WP Mobile Theme Switcher", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WP-Mobilizer", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"WP Multibyte Patch", "compat":"Checked", "class":"compatible" }, + { + "name":"WP Online Store", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"WP-PageNavi", "compat":"Checked", @@ -264,31 +946,107 @@ "compat":"Checked", "class":"compatible" }, - + + { + "name":"WP-PostViews", + "compat":"Checked", + "class":"compatible" + }, + { "name":"WP-reCAPTCHA", "compat":"Checked", "class":"compatible" }, + { + "name":"WP Session Manager", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"WP Social Bookmarking Light", "compat":"Checked", "class":"compatible" }, + { + "name":"WP-Statistics", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"WP Super Cache", "compat":"Checked", "class":"compatible" }, + { + "name":"WP System Health", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"WP Video Lightbox", "compat":"Checked", "class":"compatible" }, + { + "name":"wp-webservices", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WP Document Revisions Simple Downloads", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WP Marketplace - Complete Shopping Cart / eCommerce Solution", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WordPress Multi Site Mobile Edition", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WPQuery Shortcode", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WP Social Stats", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + + { + "name":"WPtouch Mobile Plugin", + "compat":"Checked", + "class":"compatible", + "informed":"Users' Information" + }, + { "name":"Wysija Newsletters", "compat":"Needs Patch", diff --git a/utilities/utility.php b/utilities/utility.php index a122b2d..dd08322 100644 --- a/utilities/utility.php +++ b/utilities/utility.php @@ -1,21 +1,72 @@ > SQLite Integration >> Miscellaneous, and click the button "update" at the bottom of the page. Or else replace wp-content/db.php with the one in sqlite-integration directory manually.', 'sqlite-integration'); + $current_version = defined('SQLITE_INTEGRATION_VERSION') ? SQLITE_INTEGRATION_VERSION : ''; + if (version_compare($current_version, '1.6.2', '=')) return; + $version = ''; + if (defined('WP_CONTENT_DIR')) { + $path = WP_CONTENT_DIR . '/db.php'; + } else { + $path = ABSPATH . 'wp-content/db.php'; + } + if (!$file_handle = @fopen($path, 'r')) return; + while (($buffer = fgets($file_handle)) !== false) { + if (stripos($buffer, '@version') !== false) { + $version = str_ireplace('*@version ', '', $buffer); + $version = trim($version); + break; + } + } + fclose($file_handle); + if (empty($version) || version_compare($version, $current_version, '<')) { + echo '
'.$notice_string.'
'; + } + } + /** + * Method to read a error log file and returns its contents. + * + * 'FQDBDIR/debug.txt' is the log file name. + * If this file is not existent, returns false. + * * @return string|boolean + * @access private */ private function show_error_log() { $file = FQDBDIR . 'debug.txt'; @@ -27,8 +78,10 @@ class SQLiteIntegrationUtils { } } /** - * function to clear the contents of 'FQDBIR/debug.txt' + * Method to clear the contents of the error log file. + * * @return boolean + * @access private */ private function clear_log_file() { $result = false; @@ -49,10 +102,16 @@ class SQLiteIntegrationUtils { } /** - * function to return associative array of system informations + * Method to get system information from the server and returns its data. + * + * Returned value is an associative array of system informations. + * * sys_info['WordPress'] => WordPress Version * sys_info['PHP'] => PHP Version + * + * * @return array + * @access private */ private function get_system_info() { global $wp_version; @@ -62,8 +121,12 @@ class SQLiteIntegrationUtils { return $sys_info; } /** - * function to return various database information - * @return assoc array + * Method to get database information from the database and returns its data. + * + * Returned value is an associative array. + * + * @return array + * @access private */ private function get_database_status() { global $wpdb; @@ -93,10 +156,16 @@ class SQLiteIntegrationUtils { return $status; } /** - * function to return associative array + * Method to get table information and returns its data. + * + * Returned value is an associative array like: + * * array( table name => array( index name ( column name ))) + * * for each table in the database + * * @return array + * @access private */ private function get_tables_info() { global $wpdb; @@ -116,8 +185,12 @@ class SQLiteIntegrationUtils { return $table_info; } /** - * function to return the autoincremented values of each table + * Method to get the autoincremented values of each table and returns it. + * + * The data is from sqlite_sequence table. + * * @return assoc array name => sequence, or false + * @access private */ private function get_sequence() { global $wpdb; @@ -133,9 +206,12 @@ class SQLiteIntegrationUtils { } } /** - * function to return contents of 'wp-content/db.php' file - * if the file is not existent, returns false. - * @return string|boolean + * Method to show the contents of 'wp-content/db.php' file. + * + * If this file is not existent, shows message and returns false. + * + * @return string + * @access private */ private function show_db_php() { if (defined('WP_CONTENT_DIR')) { @@ -146,19 +222,21 @@ class SQLiteIntegrationUtils { if (file_exists($file)) { if (is_readable($file)) { $contents = file_get_contents($file); - echo $contents; + return $contents; } else { - echo 'file is not readable'; + $contents = 'file is not readable'; } } else { - echo 'file doesn\'t exist'; - return false; + $contents = 'file doesn\'t exist'; } + return $contents; } /** - * function to get the textarea contents and write into db.php file + * Method to get the textarea content and write it to db.php file. + * * @param string $contents * @return boolean + * @access private */ private function save_db_php($contents) { if (defined('WP_CONTENT_DIR')) { @@ -181,9 +259,44 @@ class SQLiteIntegrationUtils { return true; } /** - * function to optimize database file - * only to give vacuum command to SQLite + * Method to replace the old db.php with the new one. + * * @return boolean + * @access private + */ + private function update_db_file() { + $new_file = PDODIR . 'db.php'; + if (file_exists($new_file) && is_readable($new_file)) { + $contents = file_get_contents($new_file); + } else { + return false; + } + if (defined('WP_CONTENT_DIR')) { + $path = WP_CONTENT_DIR . '/db.php'; + } else { + $path = ABSPATH . 'wp-content/db.php'; + } + if (($handle = @fopen($path, 'w+')) && flock($handle, LOCK_EX)) { + if (fwrite($handle, $contents) == false) { + flock($handle, LOCK_UN); + fclose($handle); + return false; + } + flock($handle, LOCK_UN); + fclose($handle); + } else { + return false; + } + return true; + } + /** + * Method to optimize SQLite database. + * + * This only gives VACUUM command to SQLite database. This query is rewritten in + * the query.class.php file. + * + * @return boolean + * @access private */ private function optimize_db() { global $wpdb; @@ -191,21 +304,25 @@ class SQLiteIntegrationUtils { return $result; } /** - * function to get SQLite database file size + * Method to get SQLite database file size. + * * @return string + * @access private */ private function get_database_size() { $db_file = FQDB; if (file_exists($db_file)) { $size = filesize($db_file); - clearstatcache(false, $db_file); + clearstatcache(true, $db_file); return $this->convert_to_formatted_number($size); } } /** - * function to format file size to unit byte + * Method to format the file size number to the unit byte. + * * @param integer $size * @return string + * @access private */ private function convert_to_formatted_number($size) { $unim = array('Bytes', 'KB', 'MB', 'GB', 'TB', 'PB'); @@ -218,7 +335,10 @@ class SQLiteIntegrationUtils { } /** - * function to echo plugins info table component + * Method to echo plugins info table component. + * + * @return nothing returned. + * @access private */ private function show_plugins_info() { $domain = $this->text_domain; @@ -251,7 +371,11 @@ class SQLiteIntegrationUtils { $compat = __('No', $domain); break; case 'Checked': - $compat = __('Checked', $domain); + if (!empty($plugin_info->informed) && stripos($plugin_info->informed, 'Users\' Information') !== false) { + $compat = __('Checked*', $domain); + } else { + $compat = __('Checked', $domain); + } break; default: $compat = __('Not Checked', $domain); @@ -279,9 +403,11 @@ class SQLiteIntegrationUtils { } /** - * function to return output of phpinfo() as an array - * See PHP Manual + * Method to return output of phpinfo() as an array. + * + * @See PHP Manual * @return array + * @access private */ private function parse_php_modules() { ob_start(); @@ -313,9 +439,11 @@ class SQLiteIntegrationUtils { return $modules; } /** - * function to echo PHP module info + * Method to echo PHP module info. + * * @param string $module_name * @param string $setting_name + * @access private */ private function get_module_setting($module_name, $setting_name) { $module_info = $this->parse_php_modules(); @@ -329,10 +457,147 @@ class SQLiteIntegrationUtils { } } + /** + * Method to parse FQDBDIR and return backup database files. + * + * @return nothing returned. + * @access private + */ + private function get_backup_files() { + $db_name = basename(FQDB); + $names_to_exclude = array('.', '..', '.htaccess', 'debug.txt', '.ht.sqlite', 'index.php', $db_name); + $backup_files = array(); + if (is_dir(FQDBDIR)) { + if ($dir_handle = opendir(FQDBDIR)) { + while (($file_name = readdir($dir_handle)) !== false) { + if (in_array($file_name, $names_to_exclude)) continue; + $backup_files[] = $file_name; + } + } + } + return $backup_files; + } + + /** + * Method to create backup database file. + * + * @return string array + * @access private + */ + private function backup_db() { + $domain = $this->text_domain; + $result = array(); + $database_file = FQDB; + $db_name = basename(FQDB); + if (!file_exists($database_file)) { + return false; + } + $today = date("Ymd"); + if (!extension_loaded('zip')) { + $backup_file = $database_file . '.' . $today . '.back'; + if (copy($database_file, $backup_file)) { + $result['success'] = basename($backup_file) . __(' was created.', $domain); + } else { + $result['error'] = basename($backup_file) . __(' was not created.', $domain); + } + } else { + $backup_file = $database_file . '.' . $today . '.zip'; + $zip = new ZipArchive(); + $res = $zip->open($backup_file, ZipArchive::CREATE | ZipArchive::OVERWRITE); + if ($res === true) { + $zip->addFile($database_file, $db_name); + $result['success'] = basename($backup_file) . __(' was created.', $domain); + } else { + $result['error'] = basename($backup_file) . __(' was not created.', $domain); + } + $zip->close(); + } + return $result; + } + /** + * Method to delete backup database file(s). + * + * Users can delete multiple files at a time. + * + * @return false if file names aren't checked, empty array if failed, array of messages if succeeded. + * @access private + */ + private function delete_backup_db() { + $domain = $this->text_domain; + $file_names = array(); + $results = array(); + if (isset($_POST['backup_checked'])) { + $file_names = $_POST['backup_checked']; + } else { + return false; + } + if (chdir(FQDBDIR)) { + foreach ($file_names as $file) { + if (unlink($file)) { + $results[$file] = sprintf(__('File %s was deleted.', $domain), $file); + } else { + $results[$file] = sprintf(__('Error! File was not deleted.', $domain), $file); + } + } + } + return $results; + } + /** + * Method to download a backup file. + * + * This method uses header() function, so we have to register this function using + * admin_init action hook. It must also be declared as public. We check HTTP_REFERER + * and input button name, and ,after that, wp_nonce. When the admin_init is executed + * it only returns true. + * + * The database file might be several hundred mega bytes, so we don't use readfile() + * but use fread() instead. + * + * Users can download one file at a time. + * + * @return 1 if the file name isn't checked, 2 if multiple files are checked, true if succeeded. + */ + static function download_backup_db() { + if (is_multisite()) { + $script_url = network_admin_url('settings.php?page=setting-file'); + } else { + $script_url = admin_url('options-general.php?page=setting-file'); + } + if (isset($_POST['download_backup_file']) && stripos($_SERVER['HTTP_REFERER'], $script_url) !== false) { + check_admin_referer('sqliteintegration-backup-manip-stats'); + if (!isset($_POST['backup_checked'])) return 1; + $file_names = array(); + $file_names = $_POST['backup_checked']; + if (count($file_names) != 1) return 2; + $file_name = $file_names[0]; + $file_path = FQDBDIR . $file_name; + $blog_name = str_replace(array(' ', ' ', ';'), array('_', '_', '_'), get_bloginfo('name')); + $download_file_name = $blog_name . '_' . $file_name; + header('Pragma: public'); + header('Cache-Control: must-revalidate,post-check=0,pre-check=0'); + header('Content-Type: application/force-download'); + header('Content-Type: application/octet-stream'); + header('Content-Type: application/download'); + header('Content-Disposition: attachment; filename='.$download_file_name.';'); + header('Content-Transfer-Encoding: binary'); + header('Content-Length: '.filesize($file_path)); + $fp = fopen($file_path, 'r'); + while (!feof($fp)) { + echo fread($fp, 65536); + flush(); + } + fclose($fp); + } + return true; + } + /** + * Method to show Welcome page. + * + */ function welcome() { $domain = $this->text_domain; if (isset($_GET['page']) && $_GET['page'] == 'sqlite-integration') :?> -
+

@@ -366,15 +631,18 @@ class SQLiteIntegrationUtils { + + + +

- text_domain; @@ -390,6 +658,7 @@ class SQLiteIntegrationUtils { +
@@ -555,12 +824,16 @@ class SQLiteIntegrationUtils { show_plugins_info();?> +

+ +

text_domain; @@ -608,6 +881,71 @@ class SQLiteIntegrationUtils { echo '
'.$messages.'
'; } } + if (isset($_POST['backup_db'])) { + check_admin_referer('sqliteintegration-backup-manip-stats'); + $results = $this->backup_db(); + if ($results === false) { + $message = __('Couldn\'t find your database file.'); + echo '
'.$message.'
'; + } elseif (is_array($results) && array_key_exists('success', $results)) { + echo '
'.$results['success'].'
'; + } else { + echo '
'.$results['error'].'
'; + } + } + if (isset($_POST['delete_backup_files'])) { + check_admin_referer('sqliteintegration-backup-manip-stats'); + $results = $this->delete_backup_db(); + if ($results === false) { + $message = __('Please select backup file(s).', $domain); + echo '
'.$message.'
'; + } elseif (is_array($results) && count($results) > 0) { + echo '
'; + foreach ($results as $key => $val) { + echo $val.'
'; + } + echo '
'; + } else { + $message = __('Error! Please remove file(s) manyally.', $domain); + echo '
'.$message.'
'; + } + } + if (isset($_POST['download_backup_file'])) { + check_admin_referer('sqliteintegration-backup-manip-stats'); + $message = ''; + $result = self::download_backup_db(); + if ($result !== true) { + switch($result) { + case 1: + $message = __('Please select backup file.', $domain); + break; + case 2: + $message = __('Please select one file at a time.', $domain); + break; + default: + break; + } + echo '
' . $message . '
'; + } + } + if (isset($_POST['sqliteintegration_update_db_file'])) { + check_admin_referer('sqliteintegration-db-update-stats'); + $result = $this->update_db_file(); + if ($result === false) { + $message = __('Couldn"t update db.php file. Please replace it manually.', $domain); + echo '
'.$message.'
'; + } else { + echo << +// + +JS; + $message = __('Your db.php is updated.', $domain); + echo '
'.$message.'
'; + } + } if (isset($_GET['page']) && $_GET['page'] == 'setting-file') :?> -
+

@@ -632,7 +971,47 @@ class SQLiteIntegrationUtils {

-

+

+

+ +

+

+ +

+

+ +

+ get_backup_files();?> +
+ + + + + + + + + + + + + + + + + + +
+

+ + + +

+
+

@@ -641,39 +1020,43 @@ class SQLiteIntegrationUtils { wp_nonce_field('sqlitewordpress-log-reset-stats'); } ?> - +

-

-

- If you don\'t understand well, please don\'t edit this file.', $domain)?> -

-
+ + ';?> + +

'; ?> + If you don\'t understand well, please don\'t edit this file.', $domain)?> + '; ?> + '; ?> + show_db_php();?> + '.$db_contents.'

'; ?> + ', __('Save', $domain), __('Are you sure to save this file?\n\nClick [Cancel] to stop, [OK] to continue.', $domain)); ?> +

'; ?> + +

+

+
+ - -

- -

+

', __('Update', $domain), __('Are you sure to update this file?\n\nClick [Cancel] to stop, [OK] to continue.', $domain));?>

-
\ No newline at end of file +?>