diff --git a/functions-5-2.php b/functions-5-2.php index 62a8be3..934b57b 100644 --- a/functions-5-2.php +++ b/functions-5-2.php @@ -56,7 +56,8 @@ class PDOSQLiteUDFS { 'inet_ntoa' => 'inet_ntoa', 'inet_aton' => 'inet_aton', 'datediff' => 'datediff', - 'locate' => 'locate' + 'locate' => 'locate', + 'version' => 'version' ); public function month($field){ @@ -384,5 +385,12 @@ class PDOSQLiteUDFS { } } } + /** + * + */ + public function version() { + global $required_mysql_version; + return $required_mysql_version; + } } ?> \ No newline at end of file diff --git a/functions.php b/functions.php index 7337b2c..e97e373 100644 --- a/functions.php +++ b/functions.php @@ -57,7 +57,8 @@ class PDOSQLiteUDFS { 'inet_ntoa' => 'inet_ntoa', 'inet_aton' => 'inet_aton', 'datediff' => 'datediff', - 'locate' => 'locate' + 'locate' => 'locate', + 'version' => 'version' ); public function month($field){ @@ -358,5 +359,12 @@ class PDOSQLiteUDFS { } } } + /** + * + */ + public function version() { + global $required_mysql_version; + return $required_mysql_version; + } } ?> \ No newline at end of file diff --git a/install.php b/install.php index 4c27b88..26e6739 100644 --- a/install.php +++ b/install.php @@ -56,7 +56,14 @@ function wp_install($blog_title, $user_name, $user_email, $public, $deprecated = wp_new_blog_notification($blog_title, $guessurl, $user_id, ($email_password ? $user_password : __('The password you chose during the install.'))); wp_cache_flush(); - + + if ((isset($_SERVER['SERVER_NAME']) && stripos('apache', $_SERVER['SERVER_NAME']) === false) || (isset($_SERVER['SERVER_SIGNATURE']) && stripos('apache', $_SERVER['SERVER_SIGNATURE']) === false)) { + $server_message = sprintf('Your webserver doesn\'t seem to be Apache. So the database directory access restriction by the .htaccess file may not function. We strongly recommend that you should restrict the access to the directory %s in some other way.', FQDBDIR); + echo '

'; + 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/pdoengine.class.php b/pdoengine.class.php index a7ef23c..70c6279 100644 --- a/pdoengine.class.php +++ b/pdoengine.class.php @@ -112,7 +112,7 @@ class PDOEngine extends PDO { 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.'; echo $message; @@ -706,7 +706,11 @@ class PDOEngine extends PDO { $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; diff --git a/utilities/database_maintenance.php b/utilities/database_maintenance.php index 861c671..6a259bd 100644 --- a/utilities/database_maintenance.php +++ b/utilities/database_maintenance.php @@ -17,13 +17,12 @@ class DatabaseMaintenance { 'comment_author_email' => '\'\'', 'comment_author_url' => '\'\'', 'comment_author_IP' => '\'\'', - 'comment_date' => '\'0000-00-00 00:00:00\'', '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_type' => '\'\'', 'comment_parent' => '\'0\'', 'user_id' => '\'0\'' ), @@ -50,15 +49,15 @@ class DatabaseMaintenance { ), $wpdb->prefix.'posts' => array( 'post_author' => '\'0\'', - 'post_date' => '\'0000-00-00 00:00:00\'', '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' => '\'0000-00-00 00:00:00\'', 'post_modified_gmt' => '\'0000-00-00 00:00:00\'', + 'post_modified' => '\'0000-00-00 00:00:00\'', 'post_parent' => '\'0\'', 'guid' => '\'\'', 'menu_order' => '\'0\'', @@ -90,7 +89,6 @@ class DatabaseMaintenance { 'user_status' => '\'0\'', 'display_name' => '\'\'', // for network install - 'user_login' => '\'\'', 'spam' => '\'0\'', 'deleted' => '\'0\'' ), @@ -344,6 +342,23 @@ class DatabaseMaintenance { return $return_val; } } + + 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; + } + } private function maintenance_backup() { $result = array(); @@ -421,7 +436,25 @@ class DatabaseMaintenance { - +

+

+ +

+
+ + + + +
+ '; } } + 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']) . '

'; + echo '
'; + echo $title; + echo ''; + echo ''; + foreach ($results as $column) { + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + } + echo '
ColumnTypeNullDefault
' . $column->Field . '' . $column->Type . '' . $column->Null . '' . $column->Default . '
'; + } else { + $title = '

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

'; + echo '
'; + echo $title; + echo '
'; + } + } } } ?> \ No newline at end of file diff --git a/utilities/plugin_lists.json b/utilities/plugin_lists.json index ff5962e..0af7919 100644 --- a/utilities/plugin_lists.json +++ b/utilities/plugin_lists.json @@ -120,8 +120,10 @@ { "name":"FeedWordPress", - "compat":"Checked", - "class":"compatible" + "compat":"Needs patch", + "patch_url":"http://dogwood.skr.jp/wordpress/plugins/", + "reason":"MySQL specific function", + "class":"workaround" }, { @@ -182,6 +184,14 @@ "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":"Optimize Database after Deleting Revisions", @@ -264,8 +274,10 @@ { "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" }, {