fixed the patch utility for Windows and the manipulation of 'ON DUPLICATE KEY UPDATE' query.

git-svn-id: https://plugins.svn.wordpress.org/sqlite-integration/trunk@748127 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
kjmtsh 2013-07-30 03:18:31 +00:00
parent d8314baf48
commit 6b66c23718
18 changed files with 54 additions and 48 deletions

1
db.php
View File

@ -5,7 +5,6 @@
* wordpress/wp-content/db.php
*
* @package SQLite Integration
* @version 1.1
* @author Kojima Toshiyasu, Justin Adie
*
*/

View File

@ -1,7 +1,6 @@
<?php
/**
* @package SQLite Integration
* @version 1.1
* @author Kojima Toshiyasu, Justin Adie
*
*/

View File

@ -1,7 +1,6 @@
<?php
/**
* @package SQLite Integration
* @version 1.1
* @author Kojima Toshiyasu, Justin Adie
*
*/

View File

@ -1,7 +1,6 @@
<?php
/**
* @package SQLite Integration
* @version 1.1
* @author Kojima Toshiyasu, Justin Adie
*
*/

Binary file not shown.

View File

@ -211,12 +211,12 @@ msgid ""
"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)."
"be able to work with the newest version of WordPress(3.5.2 and 3.6 beta)."
msgstr ""
"このプラグインは<a href=\"http://wordpress.org/extend/plugins/pdo-for-wordpress/\">"
"PDO for WordPress</a>の後継です。PDO for WordPressはWordPressでSQLiteを使えるようにする"
"ものでしたが、もうメンテナンスされていないようで、古くなってしまいました。SQLite Integrationは、その基本的な"
"考えと枠組みを使って、新たな機能を追加し、最新のWordPress(3.5.1および3.6ベータ)で動作するように"
"考えと枠組みを使って、新たな機能を追加し、最新のWordPress(3.5.2および3.6ベータ)で動作するように"
"したものです。"
#: utilities/documentation.php:44
@ -589,8 +589,8 @@ msgstr "パッチを適用しました。"
#: utilities/patch.php:94 utilities/patch.php:121
#, php-format
msgid "Error! Messages: %s"
msgstr "エラー。メッセージは: %s"
msgid "Error! File %s is not deleted."
msgstr "エラー。ファイル%sは削除できませんでした。"
#: utilities/patch.php:118
msgid "Error!: patches directory is not accessible."

View File

@ -195,7 +195,7 @@ msgid ""
"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)."
"be able to work with the newest version of WordPress(3.5.2 and 3.6 beta)."
msgstr ""
#: utilities/documentation.php:44
@ -505,7 +505,7 @@ msgstr ""
#: utilities/patch.php:94 utilities/patch.php:121
#, php-format
msgid "Error! Messages: %s"
msgid "Error! File %s is not deleted."
msgstr ""
#: utilities/patch.php:118

View File

@ -1,7 +1,6 @@
<?php
/**
* @package SQLite Integration
* @version 1.1
* @author Kojima Toshiyasu, Justin Adie
*
*/

View File

@ -1,7 +1,6 @@
<?php
/**
* @package SQLite Integration
* @version 1.1
* @author Kojima Toshiyasu, Justin Adie
*
*/

View File

@ -1,7 +1,6 @@
<?php
/**
* @package SQLite Integration
* @version 1.1
* @author Kojima Toshiyasu, Justin Adie
*/

View File

@ -3,7 +3,6 @@
* The class for manipulating ALTER query
* newly supports multiple variants
* @package SQLite Integration
* @version 1.1
* @author Kojima Toshiyasu
*/
class AlterQuery {

View File

@ -1,7 +1,6 @@
<?php
/**
* @package SQLite Integration
* @version 1.1
* @author Kojima Toshiyasu, Justin Adie
*/

View File

@ -160,16 +160,23 @@ wp-config.phpの準備が終わったら、次のステップに進みます。
たぶん、もっとあるでしょう。
== Changelog ==
= 1.1 (2013-07-24) =
* DROP INDEX 単独のクエリが動作していなかったのを修正しました。
* shutdown_hook で descructor を実行していたのをやめました。
* LOCATE() 関数を使えるようにしました。
= 1.0 (2013-07-07) =
最初のリリース。
== Upgrade Notice ==
SQLite Integrationのアップグレードに失敗するようなら、FTPを使っての手動アップグレードを試してみてください。
== Changelog ==
= 1.2 (2013-07-30) =
* 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) =
* 最初のリリース。

View File

@ -152,16 +152,22 @@ These are other examples:
Probably there are more, I'm afraid.
== Upgrade Notice ==
When auto upgrading of SQLite Integration fails, please try manual upgrade via FTP.
== Changelog ==
= 1.2 (2013-07-30) =
* 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 desctructor() from shutdown_hook.
* Removed destruct() from shutdown_hook.
* Enabled LOCATE() function in the query string.
= 1.0 (2013-07-07) =
First release version of the plugin.
== Upgrade Notice ==
When auto upgrading of SQLite Integration fails, Please try manual upgrade via FTP.
* First release version of the plugin.

View File

@ -1,7 +1,6 @@
<?php
/**
* @package SQLite Integration
* @version 1.1
* @author Kojima Toshiyasu, Justin Adie
*/

View File

@ -1,8 +1,7 @@
<?php
/**
* @package SQLite Integration
* @version 1.1
* @author Toshiyasu Kojima
* @author Kojima Toshiyasu
*
*/
/**
@ -38,7 +37,7 @@ class SQLiteIntegrationDocument {
<h3><?php _e('Features', $domain);?></h3>
<p>
<?php _e('This plugin is a successor to <a href="http://wordpress.org/extend/plugins/pdo-for-wordpress/">PDO for WordPress</a>, 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); ?>
<?php _e('This plugin is a successor to <a href="http://wordpress.org/extend/plugins/pdo-for-wordpress/">PDO for WordPress</a>, 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.2 and 3.6 beta).', $domain); ?>
</p>
<p>
<?php _e('<a href="http://www.sqlite.org/">SQLite Web Page</a> says &mdash; SQLite is a &quot;software library that implements selfcontained, serverless, zero-configuration, transactional SQL database engine&quot;. It is &quot;a good choice for small to medium size websites&quot;. It\'s small and portable, and you don\'t need any database server system.', $domain); ?>

View File

@ -3,7 +3,7 @@
* This file contains PatchUtils class
*
* @package SQLite Integration
* @since 1.1
* @author Kojima Toshiyasu
*
*/
class PatchUtils {
@ -34,6 +34,8 @@ class PatchUtils {
* @return boolean|array
*/
private function apply_patches() {
global $utils;
$domain = $utils->text_domain;
$installed_plugins = array();
$file_names = array();
$output = array();
@ -103,6 +105,8 @@ class PatchUtils {
* @return boolean|array
*/
private function delete_patch_files() {
global $utils;
$domain = $utils->text_domain;
$file_names = array();
$rm_results = array();
if (isset($_POST['plugin_checked'])) {
@ -110,19 +114,17 @@ class PatchUtils {
} else {
return false;
}
$command = 'rm -f';
foreach ($file_names as $file) {
if (chdir(SQLitePatchDir)) {
exec("$command $file", $output, $retval);
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);
}
if ($retval > 0) {
$rm_results[$file] = sprintf(__('Error! Messages: %s', $domain), $output);
} else {
$rm_results[$file] = sprintf(__('File %s is deleted.', $domain), $file);
}
}
return $rm_results;
}
/**
@ -130,6 +132,8 @@ class PatchUtils {
* No return values.
*/
private function upload_file() {
global $utils;
$domain = $utils->text_domain;
if (!file_exists(SQLitePatchDir) || !is_dir(SQLitePatchDir)) {
mkdir(SQLitePatchDir, 0705, true);
}

View File

@ -2,7 +2,7 @@
/**
*
* @package SQLite Integration
* @author kjm
* @author Kojima Toshiyasu
*
*/
class SQLiteIntegrationUtils {