Version Description
Download this release
Release Info
Developer | bmett |
Plugin | The WP Remote WordPress Plugin |
Version | 2.7.8 |
Comparing to | |
See all releases |
Code changes from version 2.7.7 to 2.7.8
- plugin.php +4 -4
- readme.txt +7 -3
- wprp.hm.backup.php +21 -20
plugin.php
CHANGED
@@ -3,12 +3,12 @@
|
|
3 |
/*
|
4 |
Plugin Name: WP Remote
|
5 |
Description: Manage your WordPress site with <a href="https://wpremote.com/">WP Remote</a>. <strong>Deactivate to clear your API Key.</strong>
|
6 |
-
Version: 2.7.
|
7 |
-
Author:
|
8 |
-
Author URI:
|
9 |
*/
|
10 |
|
11 |
-
/* Copyright
|
12 |
|
13 |
This program is free software; you can redistribute it and/or modify
|
14 |
it under the terms of the GNU General Public License as published by
|
3 |
/*
|
4 |
Plugin Name: WP Remote
|
5 |
Description: Manage your WordPress site with <a href="https://wpremote.com/">WP Remote</a>. <strong>Deactivate to clear your API Key.</strong>
|
6 |
+
Version: 2.7.8
|
7 |
+
Author: maekit
|
8 |
+
Author URI: https://maek.it/
|
9 |
*/
|
10 |
|
11 |
+
/* Copyright 2017 maekit (email : hello@maek.it)
|
12 |
|
13 |
This program is free software; you can redistribute it and/or modify
|
14 |
it under the terms of the GNU General Public License as published by
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== The WP Remote WordPress Plugin ===
|
2 |
-
Contributors: humanmade, willmot, joehoyle, danielbachhuber, mattheu, pauldewouters, cuvelier, tcrsavage
|
3 |
Tags: wpremote, remote administration, multiple wordpress
|
4 |
Requires at least: 3.0
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 2.7.
|
7 |
|
8 |
WP Remote is a free web app that enables you to easily manage all of your WordPress powered sites from one place.
|
9 |
|
@@ -72,6 +72,10 @@ You can email us at support@wpremote.com for support.
|
|
72 |
|
73 |
== Changelog ==
|
74 |
|
|
|
|
|
|
|
|
|
75 |
#### 2.7.7 (20 April 2017)
|
76 |
|
77 |
* Fixed fatal error with backup location
|
1 |
=== The WP Remote WordPress Plugin ===
|
2 |
+
Contributors: jeramynirodha, humanmade, willmot, joehoyle, danielbachhuber, mattheu, pauldewouters, cuvelier, tcrsavage
|
3 |
Tags: wpremote, remote administration, multiple wordpress
|
4 |
Requires at least: 3.0
|
5 |
+
Tested up to: 4.8
|
6 |
+
Stable tag: 2.7.8
|
7 |
|
8 |
WP Remote is a free web app that enables you to easily manage all of your WordPress powered sites from one place.
|
9 |
|
72 |
|
73 |
== Changelog ==
|
74 |
|
75 |
+
#### 2.7.8 (20 July 2017)
|
76 |
+
|
77 |
+
* Replaced mysql class and functions with mysqli
|
78 |
+
|
79 |
#### 2.7.7 (20 April 2017)
|
80 |
|
81 |
* Fixed fatal error with backup location
|
wprp.hm.backup.php
CHANGED
@@ -997,21 +997,21 @@ class WPRP_HM_Backup {
|
|
997 |
|
998 |
$this->do_action( 'hmbkp_mysqldump_started' );
|
999 |
|
1000 |
-
$this->db = @
|
1001 |
|
1002 |
if ( ! $this->db )
|
1003 |
-
$this->db =
|
1004 |
|
1005 |
if ( ! $this->db )
|
1006 |
return;
|
1007 |
|
1008 |
-
|
1009 |
|
1010 |
-
if ( function_exists( '
|
1011 |
-
|
1012 |
|
1013 |
// Begin new backup of MySql
|
1014 |
-
$tables =
|
1015 |
|
1016 |
$sql_file = "# WordPress : " . get_bloginfo( 'url' ) . " MySQL database backup\n";
|
1017 |
$sql_file .= "#\n";
|
@@ -1020,9 +1020,8 @@ class WPRP_HM_Backup {
|
|
1020 |
$sql_file .= "# Database: " . $this->sql_backquote( DB_NAME ) . "\n";
|
1021 |
$sql_file .= "# --------------------------------------------------------\n";
|
1022 |
|
1023 |
-
|
1024 |
-
|
1025 |
-
$curr_table = mysql_tablename( $tables, $i );
|
1026 |
|
1027 |
// Create the SQL statements
|
1028 |
$sql_file .= "# --------------------------------------------------------\n";
|
@@ -1953,16 +1952,16 @@ class WPRP_HM_Backup {
|
|
1953 |
|
1954 |
// Get table structure
|
1955 |
$query = 'SHOW CREATE TABLE ' . $this->sql_backquote( $table );
|
1956 |
-
$result =
|
1957 |
|
1958 |
if ( $result ) {
|
1959 |
|
1960 |
-
if (
|
1961 |
-
$sql_create_arr =
|
1962 |
$sql_file .= $sql_create_arr[1];
|
1963 |
}
|
1964 |
|
1965 |
-
|
1966 |
$sql_file .= ' ;';
|
1967 |
|
1968 |
}
|
@@ -1971,11 +1970,11 @@ class WPRP_HM_Backup {
|
|
1971 |
|
1972 |
// Get table contents
|
1973 |
$query = 'SELECT * FROM ' . $this->sql_backquote( $table );
|
1974 |
-
$result =
|
1975 |
|
1976 |
if ( $result ) {
|
1977 |
-
$fields_cnt =
|
1978 |
-
$rows_cnt =
|
1979 |
}
|
1980 |
|
1981 |
// Comment in SQL-file
|
@@ -1988,8 +1987,10 @@ class WPRP_HM_Backup {
|
|
1988 |
// Checks whether the field is an integer or not
|
1989 |
for ( $j = 0; $j < $fields_cnt; $j++ ) {
|
1990 |
|
1991 |
-
$
|
1992 |
-
|
|
|
|
|
1993 |
|
1994 |
if ( $type === 'tinyint' || $type === 'smallint' || $type === 'mediumint' || $type === 'int' || $type === 'bigint' )
|
1995 |
$field_num[$j] = true;
|
@@ -2006,7 +2007,7 @@ class WPRP_HM_Backup {
|
|
2006 |
$current_row = 0;
|
2007 |
$batch_write = 0;
|
2008 |
|
2009 |
-
while ( $row =
|
2010 |
|
2011 |
$current_row++;
|
2012 |
|
@@ -2047,7 +2048,7 @@ class WPRP_HM_Backup {
|
|
2047 |
|
2048 |
}
|
2049 |
|
2050 |
-
|
2051 |
|
2052 |
// Create footer/closing comment in SQL-file
|
2053 |
$sql_file .= "\n";
|
997 |
|
998 |
$this->do_action( 'hmbkp_mysqldump_started' );
|
999 |
|
1000 |
+
$this->db = @mysqli_connect( 'p:'.DB_HOST, DB_USER, DB_PASSWORD, DB_NAME );
|
1001 |
|
1002 |
if ( ! $this->db )
|
1003 |
+
$this->db = mysqli_connect( DB_HOST, DB_USER, DB_PASSWORD, DB_NAME );
|
1004 |
|
1005 |
if ( ! $this->db )
|
1006 |
return;
|
1007 |
|
1008 |
+
// mysql_select_db( DB_NAME, $this->db );
|
1009 |
|
1010 |
+
if ( function_exists( 'mysqli_set_charset') )
|
1011 |
+
mysqli_set_charset( $this->db, DB_CHARSET );
|
1012 |
|
1013 |
// Begin new backup of MySql
|
1014 |
+
$tables = mysqli_query( $this->db, 'SHOW TABLES' );
|
1015 |
|
1016 |
$sql_file = "# WordPress : " . get_bloginfo( 'url' ) . " MySQL database backup\n";
|
1017 |
$sql_file .= "#\n";
|
1020 |
$sql_file .= "# Database: " . $this->sql_backquote( DB_NAME ) . "\n";
|
1021 |
$sql_file .= "# --------------------------------------------------------\n";
|
1022 |
|
1023 |
+
while ( $row = mysqli_fetch_array($tables) ) {
|
1024 |
+
$curr_table = $row[0];
|
|
|
1025 |
|
1026 |
// Create the SQL statements
|
1027 |
$sql_file .= "# --------------------------------------------------------\n";
|
1952 |
|
1953 |
// Get table structure
|
1954 |
$query = 'SHOW CREATE TABLE ' . $this->sql_backquote( $table );
|
1955 |
+
$result = mysqli_query( $this->db, $query );
|
1956 |
|
1957 |
if ( $result ) {
|
1958 |
|
1959 |
+
if ( mysqli_num_rows( $result ) > 0 ) {
|
1960 |
+
$sql_create_arr = mysqli_fetch_array( $result );
|
1961 |
$sql_file .= $sql_create_arr[1];
|
1962 |
}
|
1963 |
|
1964 |
+
mysqli_free_result( $result );
|
1965 |
$sql_file .= ' ;';
|
1966 |
|
1967 |
}
|
1970 |
|
1971 |
// Get table contents
|
1972 |
$query = 'SELECT * FROM ' . $this->sql_backquote( $table );
|
1973 |
+
$result = mysqli_query( $this->db, $query );
|
1974 |
|
1975 |
if ( $result ) {
|
1976 |
+
$fields_cnt = mysqli_num_fields( $result );
|
1977 |
+
$rows_cnt = mysqli_num_rows( $result );
|
1978 |
}
|
1979 |
|
1980 |
// Comment in SQL-file
|
1987 |
// Checks whether the field is an integer or not
|
1988 |
for ( $j = 0; $j < $fields_cnt; $j++ ) {
|
1989 |
|
1990 |
+
$field_obj = mysqli_fetch_field_direct( $result, $j );
|
1991 |
+
|
1992 |
+
$field_set[$j] = $this->sql_backquote( $field_obj->name );
|
1993 |
+
$type = $field_obj->type;
|
1994 |
|
1995 |
if ( $type === 'tinyint' || $type === 'smallint' || $type === 'mediumint' || $type === 'int' || $type === 'bigint' )
|
1996 |
$field_num[$j] = true;
|
2007 |
$current_row = 0;
|
2008 |
$batch_write = 0;
|
2009 |
|
2010 |
+
while ( $row = mysqli_fetch_row( $result ) ) {
|
2011 |
|
2012 |
$current_row++;
|
2013 |
|
2048 |
|
2049 |
}
|
2050 |
|
2051 |
+
mysqli_free_result( $result );
|
2052 |
|
2053 |
// Create footer/closing comment in SQL-file
|
2054 |
$sql_file .= "\n";
|