WP Htaccess Editor - Version 1.1.1

Version Description

  • Fixed CHMOD
Download this release

Release Info

Developer Lukenzi
Plugin Icon 128x128 WP Htaccess Editor
Version 1.1.1
Comparing to
See all releases

Code changes from version 1.1.0 to 1.1.1

lib/lib.functions.php CHANGED
@@ -15,6 +15,7 @@ function WPHE_CreateBackup()
15
  $htaccess_content_orig = trim($htaccess_content_orig);
16
  $htaccess_content_orig = str_replace('\\\\', '\\', $htaccess_content_orig);
17
  $htaccess_content_orig = str_replace('\"', '"', $htaccess_content_orig);
 
18
  $WPHE_success = file_put_contents($WPHE_backup_path, $htaccess_content_orig, LOCK_EX);
19
  if($WPHE_success === false)
20
  {
@@ -30,6 +31,7 @@ function WPHE_CreateBackup()
30
  unset($WPHE_success);
31
  return true;
32
  }
 
33
  }else{
34
  unset($WPHE_backup_path);
35
  unset($WPHE_orig_path);
@@ -42,6 +44,7 @@ function WPHE_CreateBackup()
42
  $htaccess_content_orig = trim($htaccess_content_orig);
43
  $htaccess_content_orig = str_replace('\\\\', '\\', $htaccess_content_orig);
44
  $htaccess_content_orig = str_replace('\"', '"', $htaccess_content_orig);
 
45
  $WPHE_success = file_put_contents($WPHE_backup_path, $htaccess_content_orig, LOCK_EX);
46
  if($WPHE_success === false)
47
  {
@@ -57,6 +60,7 @@ function WPHE_CreateBackup()
57
  unset($WPHE_success);
58
  return true;
59
  }
 
60
  }else{
61
  unset($WPHE_backup_path);
62
  unset($WPHE_orig_path);
@@ -151,7 +155,6 @@ function WPHE_WriteNewHtaccess($WPHE_new_content)
151
  $WPHE_new_content = str_replace('\\\\', '\\', $WPHE_new_content);
152
  $WPHE_new_content = str_replace('\"', '"', $WPHE_new_content);
153
  $WPHE_write_success = file_put_contents($WPHE_orig_path, $WPHE_new_content, LOCK_EX);
154
-
155
  if(!file_exists($WPHE_orig_path) && $WPHE_write_success === false)
156
  {
157
  unset($WPHE_orig_path);
15
  $htaccess_content_orig = trim($htaccess_content_orig);
16
  $htaccess_content_orig = str_replace('\\\\', '\\', $htaccess_content_orig);
17
  $htaccess_content_orig = str_replace('\"', '"', $htaccess_content_orig);
18
+ @chmod($WPHE_backup_path, 0666);
19
  $WPHE_success = file_put_contents($WPHE_backup_path, $htaccess_content_orig, LOCK_EX);
20
  if($WPHE_success === false)
21
  {
31
  unset($WPHE_success);
32
  return true;
33
  }
34
+ @chmod($WPHE_backup_path, 0644);
35
  }else{
36
  unset($WPHE_backup_path);
37
  unset($WPHE_orig_path);
44
  $htaccess_content_orig = trim($htaccess_content_orig);
45
  $htaccess_content_orig = str_replace('\\\\', '\\', $htaccess_content_orig);
46
  $htaccess_content_orig = str_replace('\"', '"', $htaccess_content_orig);
47
+ @chmod($WPHE_backup_path, 0666);
48
  $WPHE_success = file_put_contents($WPHE_backup_path, $htaccess_content_orig, LOCK_EX);
49
  if($WPHE_success === false)
50
  {
60
  unset($WPHE_success);
61
  return true;
62
  }
63
+ @chmod($WPHE_backup_path, 0644);
64
  }else{
65
  unset($WPHE_backup_path);
66
  unset($WPHE_orig_path);
155
  $WPHE_new_content = str_replace('\\\\', '\\', $WPHE_new_content);
156
  $WPHE_new_content = str_replace('\"', '"', $WPHE_new_content);
157
  $WPHE_write_success = file_put_contents($WPHE_orig_path, $WPHE_new_content, LOCK_EX);
 
158
  if(!file_exists($WPHE_orig_path) && $WPHE_write_success === false)
159
  {
160
  unset($WPHE_orig_path);
pages/wphe-dashboard.php CHANGED
@@ -92,7 +92,6 @@ if(current_user_can('activate_plugins'))
92
  }else{
93
  $success = true;
94
  }
95
- @chmod($WPHE_orig_path, 0640);
96
  }
97
  }
98
 
92
  }else{
93
  $success = true;
94
  }
 
95
  }
96
  }
97
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Lukenzi
3
  Donate link: http://www.wp-blog.cz/o-autorovi/
4
  Tags: simply,htaccess,editor
5
  Requires at least: 3.0
6
- Tested up to: 3.1.1
7
- Stable tag: 1.1.0
8
 
9
  Simple editor htaccess file without using FTP client.
10
 
@@ -35,6 +35,9 @@ Try to restore the original backup file. If restoration is not possible with thi
35
 
36
  == Changelog ==
37
 
 
 
 
38
  = 1.1.0 =
39
  * Adding Czech and English language
40
  * Adding debug panel
3
  Donate link: http://www.wp-blog.cz/o-autorovi/
4
  Tags: simply,htaccess,editor
5
  Requires at least: 3.0
6
+ Tested up to: 3.1.2
7
+ Stable tag: 1.1.1
8
 
9
  Simple editor htaccess file without using FTP client.
10
 
35
 
36
  == Changelog ==
37
 
38
+ = 1.1.1 =
39
+ * Fixed CHMOD
40
+
41
  = 1.1.0 =
42
  * Adding Czech and English language
43
  * Adding debug panel
wp-htaccess-editor.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP Htaccess Editor
4
  Plugin URI: http://www.wp-blog.cz/101-plugin-wp-htaccess-editor/
5
  Description: Simple editor htaccess file without using FTP client.
6
- Version: 1.1.0
7
  Author: Lukenzi
8
  Author URI: http://www.wp-blog.cz/
9
  License: GPLv2 or later
@@ -31,7 +31,7 @@ if (!defined('ABSPATH')) die();
31
  if(!is_admin()){
32
  return;
33
  }else{
34
- $WPHE_version = '1.1.0';
35
  $WPHE_mem_start = memory_get_usage();
36
 
37
  if(!defined('WP_CONTENT_URL')){
3
  Plugin Name: WP Htaccess Editor
4
  Plugin URI: http://www.wp-blog.cz/101-plugin-wp-htaccess-editor/
5
  Description: Simple editor htaccess file without using FTP client.
6
+ Version: 1.1.1
7
  Author: Lukenzi
8
  Author URI: http://www.wp-blog.cz/
9
  License: GPLv2 or later
31
  if(!is_admin()){
32
  return;
33
  }else{
34
+ $WPHE_version = '1.1.1';
35
  $WPHE_mem_start = memory_get_usage();
36
 
37
  if(!defined('WP_CONTENT_URL')){