ARI Adminer – WordPress Database Manager - Version 1.0.6

Version Description

  • Add .htaccess file to allow execution of Adminer wrapper to avoid "Forbidden" error
Download this release

Release Info

Developer arisoft
Plugin Icon 128x128 ARI Adminer – WordPress Database Manager
Version 1.0.6
Comparing to
See all releases

Code changes from version 1.0.5 to 1.0.6

adminer/.htaccess ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <IfModule mod_rewrite.c>
2
+ RewriteEngine On
3
+ </IfModule>
4
+ <FilesMatch ".*">
5
+ Order Allow,Deny
6
+ Deny from all
7
+ </FilesMatch>
8
+ <FilesMatch "^wrapper_(adminer|editor)\.php$">
9
+ Order Allow,Deny
10
+ Allow from all
11
+ </FilesMatch>
ari-adminer.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: ARI Adminer
4
  Plugin URI: http://wp-quiz.ari-soft.com/plugins/wordpress-adminer.html
5
  Description: Powerful, compact and easy to use database manager plugin for WordPress.
6
- Version: 1.0.5
7
  Author: ARI Soft
8
  Author URI: http://www.ari-soft.com
9
  Text Domain: ari-adminer
3
  Plugin Name: ARI Adminer
4
  Plugin URI: http://wp-quiz.ari-soft.com/plugins/wordpress-adminer.html
5
  Description: Powerful, compact and easy to use database manager plugin for WordPress.
6
+ Version: 1.0.6
7
  Author: ARI Soft
8
  Author URI: http://www.ari-soft.com
9
  Text Domain: ari-adminer
includes/defines.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- define( 'ARIADMINER_VERSION', '1.0.5' );
3
  define( 'ARIADMINER_SLUG', 'ari-adminer' );
4
  define( 'ARIADMINER_ASSETS_URL', ARIADMINER_URL . 'assets/' );
5
  define( 'ARIADMINER_VERSION_OPTION', 'ari_adminer' );
1
  <?php
2
+ define( 'ARIADMINER_VERSION', '1.0.6' );
3
  define( 'ARIADMINER_SLUG', 'ari-adminer' );
4
  define( 'ARIADMINER_ASSETS_URL', ARIADMINER_URL . 'assets/' );
5
  define( 'ARIADMINER_VERSION_OPTION', 'ari_adminer' );
libraries/arisoft/core/app/class-plugin-options.php CHANGED
@@ -17,4 +17,6 @@ class Plugin_Options extends Options {
17
  public $view_path = '';
18
 
19
  public $main_file = '';
 
 
20
  }
17
  public $view_path = '';
18
 
19
  public $main_file = '';
20
+
21
+ public $page_prefix = '';
22
  }
libraries/arisoft/core/app/class-plugin.php CHANGED
@@ -77,7 +77,16 @@ class Plugin {
77
 
78
  switch ( $cmd_type ) {
79
  case 'display':
80
- $ctrl_name = Request::get_var( 'action', 'display' );
 
 
 
 
 
 
 
 
 
81
  if ( strpos( $ctrl_name, '_' ) )
82
  $ctrl_name = join(
83
  '_',
77
 
78
  switch ( $cmd_type ) {
79
  case 'display':
80
+ $ctrl_name = 'display';
81
+ if ( $this->options->page_prefix ) {
82
+ $current_page = Request::get_var( 'page' );
83
+ if ( strpos( $current_page, $this->options->page_prefix ) === 0) {
84
+ $ctrl_name = Request::get_var( 'action', 'display' );
85
+ }
86
+ } else {
87
+ $ctrl_name = Request::get_var( 'action', 'display' );
88
+ }
89
+
90
  if ( strpos( $ctrl_name, '_' ) )
91
  $ctrl_name = join(
92
  '_',
libraries/arisoft/core/database/class-helper.php CHANGED
@@ -140,4 +140,12 @@ class Helper {
140
 
141
  return false;
142
  }
 
 
 
 
 
 
 
 
143
  }
140
 
141
  return false;
142
  }
143
+
144
+ public static function is_utf8mb4_supported() {
145
+ global $wpdb;
146
+
147
+ $res = $wpdb->get_var( 'SELECT COUNT(*) FROM information_schema.character_sets WHERE `CHARACTER_SET_NAME` = "utf8mb4"' );
148
+
149
+ return !! $res;
150
+ }
151
  }
libraries/arisoft/core/utils/class-request.php CHANGED
@@ -25,9 +25,13 @@ class Request {
25
  if ( ! is_null( self::$root_url ) )
26
  return self::$root_url;
27
 
28
- $is_SSL = ! empty( $_SERVER['HTTPS'] );
 
 
 
 
29
  $port = intval( $_SERVER['SERVER_PORT'], 10);
30
- $port = ( ( $is_SSL && $port != 443 ) || ( ! $is_SSL && $port != 80) ) ? $port : 0;
31
  $protocol = $is_SSL ? 'https' : 'http';
32
 
33
  self::$root_url = $protocol . '://' . $_SERVER['SERVER_NAME'] . ( $port > 0 ? ':' . $port : '' );
25
  if ( ! is_null( self::$root_url ) )
26
  return self::$root_url;
27
 
28
+ $is_SSL = ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' );
29
+
30
+ if ( ! $is_SSL && ! empty( $_SERVER['HTTPS'] ) )
31
+ $is_SSL = $_SERVER['HTTPS'] != 'off';
32
+
33
  $port = intval( $_SERVER['SERVER_PORT'], 10);
34
+ $port = ( ( $is_SSL && $port != 443 && $port != 80 ) || ( ! $is_SSL && $port != 80) ) ? $port : 0;
35
  $protocol = $is_SSL ? 'https' : 'http';
36
 
37
  self::$root_url = $protocol . '://' . $_SERVER['SERVER_NAME'] . ( $port > 0 ? ':' . $port : '' );
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: arisoft
3
  Donate link: http://wp-quiz.ari-soft.com/plugins/wordpress-adminer.html
4
  Tags: adminer, sql, database, mysql, report, sqlite, table, postgresql, dump, backup, import, export, phpmyadmin
5
  Requires at least: 3.4
6
- Tested up to: 4.7.2
7
- Stable tag: 1.0.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -69,6 +69,9 @@ Sure, it is available [here](http://www.ari-soft.com/docs/wordpress/ari-adminer/
69
 
70
  == Changelog ==
71
 
 
 
 
72
  = 1.0.5 =
73
  * Compatible with WordPress 3.x
74
 
@@ -90,6 +93,9 @@ Sure, it is available [here](http://www.ari-soft.com/docs/wordpress/ari-adminer/
90
 
91
  == Upgrade Notice ==
92
 
 
 
 
93
  = 1.0.5 =
94
  * Compatible with WordPress 3.x
95
 
3
  Donate link: http://wp-quiz.ari-soft.com/plugins/wordpress-adminer.html
4
  Tags: adminer, sql, database, mysql, report, sqlite, table, postgresql, dump, backup, import, export, phpmyadmin
5
  Requires at least: 3.4
6
+ Tested up to: 4.7.3
7
+ Stable tag: 1.0.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
69
 
70
  == Changelog ==
71
 
72
+ = 1.0.6 =
73
+ * Add .htaccess file to allow execution of Adminer wrapper to avoid "Forbidden" error
74
+
75
  = 1.0.5 =
76
  * Compatible with WordPress 3.x
77
 
93
 
94
  == Upgrade Notice ==
95
 
96
+ = 1.0.6 =
97
+ * Add .htaccess file to allow execution of Adminer wrapper to avoid "Forbidden" error
98
+
99
  = 1.0.5 =
100
  * Compatible with WordPress 3.x
101