ARI Adminer – WordPress Database Manager - Version 1.1.1

Version Description

  • Improve installer
Download this release

Release Info

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

Code changes from version 1.1.0 to 1.1.1

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.1.0
7
  Author: ARI Soft
8
  Author URI: http://www.ari-soft.com
9
  Text Domain: ari-adminer
@@ -22,39 +22,6 @@ if ( ! defined( 'ARI_WP_LEGACY' ) ) {
22
  define( 'ARI_WP_LEGACY', version_compare( $current_wp_version, '4.0', '<' ) );
23
  }
24
 
25
- if ( ! function_exists( 'ari_adminer_init' ) ) {
26
- function ari_adminer_init() {
27
- if ( defined( 'ARIADMINER_INITED' ) )
28
- return ;
29
-
30
- define( 'ARIADMINER_INITED', true );
31
-
32
- require_once ARIADMINER_PATH . 'includes/defines.php';
33
- require_once ARIADMINER_PATH . 'libraries/arisoft/loader.php';
34
-
35
- Ari_Loader::register_prefix( 'Ari_Adminer', ARIADMINER_PATH . 'includes' );
36
-
37
- $plugin = new \Ari_Adminer\Plugin(
38
- array(
39
- 'class_prefix' => 'Ari_Adminer',
40
-
41
- 'version' => ARIADMINER_VERSION,
42
-
43
- 'path' => ARIADMINER_PATH,
44
-
45
- 'url' => ARIADMINER_URL,
46
-
47
- 'assets_url' => ARIADMINER_ASSETS_URL,
48
-
49
- 'view_path' => ARIADMINER_PATH . 'includes/views/',
50
-
51
- 'main_file' => __FILE__,
52
- )
53
- );
54
- $plugin->init();
55
- }
56
- }
57
-
58
  if ( ! function_exists( 'ari_adminer_activation_check' ) ) {
59
  function ari_adminer_activation_check() {
60
  $min_php_version = '5.4.0';
@@ -102,5 +69,24 @@ if ( ! function_exists( 'ari_adminer_activation_check' ) ) {
102
  }
103
  }
104
 
105
- add_action( 'plugins_loaded', 'ari_adminer_init' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  register_activation_hook( ARIADMINER_EXEC_FILE, 'ari_adminer_activation_check' );
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.1.1
7
  Author: ARI Soft
8
  Author URI: http://www.ari-soft.com
9
  Text Domain: ari-adminer
22
  define( 'ARI_WP_LEGACY', version_compare( $current_wp_version, '4.0', '<' ) );
23
  }
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  if ( ! function_exists( 'ari_adminer_activation_check' ) ) {
26
  function ari_adminer_activation_check() {
27
  $min_php_version = '5.4.0';
69
  }
70
  }
71
 
72
+ if ( version_compare( PHP_VERSION, '5.4.0', '>=' ) ) {
73
+ require_once ARIADMINER_PATH . 'loader.php';
74
+
75
+ add_action( 'plugins_loaded', 'ari_adminer_init' );
76
+ } else {
77
+ if ( ! function_exists( 'ari_adminer_requirement_notice' ) ) {
78
+ function ari_adminer_requirement_notice() {
79
+ printf(
80
+ '<div class="notice notice-error"><p>%s</p></div>',
81
+ sprintf(
82
+ __( '"ARI Adminer" requires PHP v. 5.4.0+, but PHP version %s is used on the site.', 'ari-adminer' ),
83
+ PHP_VERSION
84
+ )
85
+ );
86
+ }
87
+ }
88
+
89
+ add_action( 'admin_notices', 'ari_adminer_requirement_notice' );
90
+ }
91
+
92
  register_activation_hook( ARIADMINER_EXEC_FILE, 'ari_adminer_activation_check' );
includes/defines.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- define( 'ARIADMINER_VERSION', '1.1.0' );
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.1.1' );
3
  define( 'ARIADMINER_SLUG', 'ari-adminer' );
4
  define( 'ARIADMINER_ASSETS_URL', ARIADMINER_URL . 'assets/' );
5
  define( 'ARIADMINER_VERSION_OPTION', 'ari_adminer' );
languages/ari-adminer.pot CHANGED
@@ -7,7 +7,7 @@ msgstr ""
7
  "Project-Id-Version: ARI "
8
  "Adminer v 1.1.0\n"
9
  "POT-Creation-Date: "
10
- "2017-03-24 19:51+0300\n"
11
  "PO-Revision-Date: \n"
12
  "Last-Translator: Your "
13
  "Name <you@example.com>\n"
@@ -64,7 +64,7 @@ msgstr ""
64
  "SearchPathExcluded-4: "
65
  "adminer/adminer\n"
66
 
67
- #: ari-adminer.php:77
68
  #, php-format
69
  msgid ""
70
  "update PHP version on "
@@ -72,19 +72,19 @@ msgid ""
72
  "to at least v. %s"
73
  msgstr ""
74
 
75
- #: ari-adminer.php:83
76
  msgid ""
77
  "install PHP SPL extension"
78
  msgstr ""
79
 
80
- #: ari-adminer.php:87
81
  #, php-format
82
  msgid ""
83
  "update WordPress v. %s "
84
  "to at least v. %s"
85
  msgstr ""
86
 
87
- #: ari-adminer.php:94
88
  #, php-format
89
  msgid ""
90
  "\"ARI Adminer\" can not "
@@ -99,6 +99,15 @@ msgid ""
99
  "button-primary\">Back</a>"
100
  msgstr ""
101
 
 
 
 
 
 
 
 
 
 
102
  #: includes/class-plugin.php:38
103
  #: includes/class-plugin.php:39
104
  #: includes/views/adminer-runner/class-html.php:8
7
  "Project-Id-Version: ARI "
8
  "Adminer v 1.1.0\n"
9
  "POT-Creation-Date: "
10
+ "2017-03-27 10:42+0300\n"
11
  "PO-Revision-Date: \n"
12
  "Last-Translator: Your "
13
  "Name <you@example.com>\n"
64
  "SearchPathExcluded-4: "
65
  "adminer/adminer\n"
66
 
67
+ #: ari-adminer.php:44
68
  #, php-format
69
  msgid ""
70
  "update PHP version on "
72
  "to at least v. %s"
73
  msgstr ""
74
 
75
+ #: ari-adminer.php:50
76
  msgid ""
77
  "install PHP SPL extension"
78
  msgstr ""
79
 
80
+ #: ari-adminer.php:54
81
  #, php-format
82
  msgid ""
83
  "update WordPress v. %s "
84
  "to at least v. %s"
85
  msgstr ""
86
 
87
+ #: ari-adminer.php:61
88
  #, php-format
89
  msgid ""
90
  "\"ARI Adminer\" can not "
99
  "button-primary\">Back</a>"
100
  msgstr ""
101
 
102
+ #: ari-adminer.php:82
103
+ #, php-format
104
+ msgid ""
105
+ "\"ARI Adminer\" requires "
106
+ "PHP v. 5.4.0+, but PHP "
107
+ "version %s is used on "
108
+ "the site."
109
+ msgstr ""
110
+
111
  #: includes/class-plugin.php:38
112
  #: includes/class-plugin.php:39
113
  #: includes/views/adminer-runner/class-html.php:8
libraries/arisoft/core/utils/class-object-factory.php CHANGED
@@ -4,14 +4,13 @@ namespace Ari\Utils;
4
  class Object_Factory {
5
  static public function get_object( $name, $ns, $params = array() ) {
6
  $obj = null;
7
- $name = ucfirst( preg_replace( '/[^A-Z_]/i', '', $name ) );
8
 
9
  if ( empty( $name ) ) {
10
  return $obj;
11
  }
12
 
13
  $class_name = $ns . '\\' . $name;
14
-
15
  if ( ! class_exists( $class_name ) ) {
16
  return $obj;
17
  }
4
  class Object_Factory {
5
  static public function get_object( $name, $ns, $params = array() ) {
6
  $obj = null;
7
+ $name = ucfirst( preg_replace( '/[^A-Z_0-9]/i', '', $name ) );
8
 
9
  if ( empty( $name ) ) {
10
  return $obj;
11
  }
12
 
13
  $class_name = $ns . '\\' . $name;
 
14
  if ( ! class_exists( $class_name ) ) {
15
  return $obj;
16
  }
libraries/arisoft/core/utils/class-object.php CHANGED
@@ -18,4 +18,13 @@ class Object {
18
  public static function get_default_properties( $obj ) {
19
  return get_class_vars( get_class( $obj ) );
20
  }
 
 
 
 
 
 
 
 
 
21
  }
18
  public static function get_default_properties( $obj ) {
19
  return get_class_vars( get_class( $obj ) );
20
  }
21
+
22
+ public static function get_path( $obj ) {
23
+ $rc = new \ReflectionClass( get_class( $obj ) );
24
+ return dirname( $rc->getFileName() );
25
+ }
26
+
27
+ public static function get_namespace( $obj ) {
28
+ return ( new \ReflectionObject( $obj ) )->getNamespaceName();
29
+ }
30
  }
loader.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ defined( 'ABSPATH' ) or die( 'Access forbidden!' );
3
+
4
+ if ( ! function_exists( 'ari_adminer_init' ) ) {
5
+ function ari_adminer_init() {
6
+ if ( defined( 'ARIADMINER_INITED' ) )
7
+ return ;
8
+
9
+ define( 'ARIADMINER_INITED', true );
10
+
11
+ require_once ARIADMINER_PATH . 'includes/defines.php';
12
+ require_once ARIADMINER_PATH . 'libraries/arisoft/loader.php';
13
+
14
+ Ari_Loader::register_prefix( 'Ari_Adminer', ARIADMINER_PATH . 'includes' );
15
+
16
+ $plugin = new \Ari_Adminer\Plugin(
17
+ array(
18
+ 'class_prefix' => 'Ari_Adminer',
19
+
20
+ 'version' => ARIADMINER_VERSION,
21
+
22
+ 'path' => ARIADMINER_PATH,
23
+
24
+ 'url' => ARIADMINER_URL,
25
+
26
+ 'assets_url' => ARIADMINER_ASSETS_URL,
27
+
28
+ 'view_path' => ARIADMINER_PATH . 'includes/views/',
29
+
30
+ 'main_file' => __FILE__,
31
+ )
32
+ );
33
+ $plugin->init();
34
+ }
35
+ }
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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.1.0
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.1.0 =
73
  * Encrypt database passwords
74
 
@@ -102,6 +105,9 @@ Sure, it is available [here](http://www.ari-soft.com/docs/wordpress/ari-adminer/
102
 
103
  == Upgrade Notice ==
104
 
 
 
 
105
  = 1.1.0 =
106
  * Encrypt database passwords
107
 
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.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
69
 
70
  == Changelog ==
71
 
72
+ = 1.1.1 =
73
+ * Improve installer
74
+
75
  = 1.1.0 =
76
  * Encrypt database passwords
77
 
105
 
106
  == Upgrade Notice ==
107
 
108
+ = 1.1.1 =
109
+ * Improve installer
110
+
111
  = 1.1.0 =
112
  * Encrypt database passwords
113