Redirection - Version 2.2.14

Version Description

Download this release

Release Info

Developer johnny5
Plugin Icon 128x128 Redirection
Version 2.2.14
Comparing to
See all releases

Code changes from version 2.2.13 to 2.2.14

readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://urbangiraffe.com/about/
4
  Tags: post, admin, seo, pages, manage, 301, 404, redirect, permalink
5
  Requires at least: 3.0
6
  Tested up to: 3.4
7
- Stable tag: 2.2.12
8
 
9
  Redirection is a WordPress plugin to manage 301 redirections and keep track of 404 errors without requiring knowledge of Apache .htaccess files.
10
 
@@ -89,6 +89,9 @@ Full documentation can be found on the [Redirection](http://urbangiraffe.com/plu
89
 
90
  == Changelog ==
91
 
 
 
 
92
  = 2.2.12 =
93
  * Cleanup some XSS issues
94
 
4
  Tags: post, admin, seo, pages, manage, 301, 404, redirect, permalink
5
  Requires at least: 3.0
6
  Tested up to: 3.4
7
+ Stable tag: 2.2.13
8
 
9
  Redirection is a WordPress plugin to manage 301 redirections and keep track of 404 errors without requiring knowledge of Apache .htaccess files.
10
 
89
 
90
  == Changelog ==
91
 
92
+ = 2.2.13 =
93
+ * Fix some broken links in admin pages
94
+
95
  = 2.2.12 =
96
  * Cleanup some XSS issues
97
 
redirection.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Redirection
4
  Plugin URI: http://urbangiraffe.com/plugins/redirection/
5
  Description: Manage all your 301 redirects and monitor 404 errors
6
- Version: 2.2.12
7
  Author: John Godley
8
  Author URI: http://urbangiraffe.com
9
  ============================================================================================================
@@ -198,7 +198,7 @@ class Redirection extends Redirection_Plugin {
198
  function inject() {
199
  $options = $this->get_options();
200
 
201
- if ( isset($_GET['token'] ) && isset( $_GET['page'] ) && isset( $_GET['sub'] ) && $_GET['token'] == $options['token'] && $_GET['page'] == 'redirection.php' && in_array( $_GET['sub'], array( 'rss', 'xml', 'csv', 'apache' ) ) ) {
202
  include dirname( __FILE__ ).'/models/file_io.php';
203
 
204
  $exporter = new Red_FileIO;
@@ -257,16 +257,16 @@ class Redirection extends Redirection_Plugin {
257
 
258
  if ( isset( $_POST['deleteall'] ) && check_admin_referer( 'redirection-process_logs' ) ) {
259
  if ( isset( $_GET['module'] ) )
260
- RE_Log::delete_all( array( 'module_id' => intval( $_GET['module'] ) ), new RE_Pager( $_GET, admin_url( add_query_arg( array( 'sub' => 'log' ), 'redirection.php' ) ), 'created', 'DESC', 'log' ) );
261
  else if (isset($_GET['group']))
262
- RE_Log::delete_all( array( 'group_id' => intval( $_GET['group'] ) ), new RE_Pager( $_GET, admin_url( add_query_arg( array( 'sub' => 'log' ), 'redirection.php' ) ), 'created', 'DESC', 'log' ) );
263
  else
264
- RE_Log::delete_all( array(), new RE_Pager( $_GET, admin_url( add_query_arg( array( 'sub' => 'log' ), 'redirection.php' ) ), 'created', 'DESC', 'log' ) );
265
 
266
  $this->render_message( __( 'Your logs have been deleted', 'redirection' ) );
267
  }
268
 
269
- $pager = new RE_Pager( $_GET, admin_url( add_query_arg( array( 'sub' => 'log' ), 'redirection.php' ) ), 'created', 'DESC', 'log' );
270
 
271
  if ( isset( $_GET['module'] ) )
272
  $logs = RE_Log::get_by_module( $pager, intval( $_GET['module'] ) );
@@ -296,7 +296,7 @@ class Redirection extends Redirection_Plugin {
296
  if ( $module == 0 )
297
  $module = Red_Module::get_first_id();
298
 
299
- $pager = new RE_Pager( $_GET, admin_url( add_query_arg( array( 'sub' => 'groups' ), 'redirection.php' ) ), 'position', 'ASC' );
300
  $items = Red_Group::get_all( $module, $pager );
301
 
302
  $this->render_admin( 'group_list', array( 'groups' => $items, 'pager' => $pager, 'modules' => Red_Module::get_for_select(), 'module' => Red_Module::get( $module ) ) );
@@ -308,7 +308,7 @@ class Redirection extends Redirection_Plugin {
308
  if ( $group == 0 )
309
  $group = Red_Group::get_first_id();
310
 
311
- $pager = new RE_Pager( $_GET, admin_url( add_query_arg( array(), 'redirection.php' ) ), 'position', 'ASC' );
312
  $items = Red_Item::get_by_group( $group, $pager );
313
 
314
  $this->render_admin( 'item_list', array( 'items' => $items, 'pager' => $pager, 'group' => Red_Group::get( $group ), 'groups' => Red_Group::get_for_select(), 'date_format' => get_option( 'date_format' ) ) );
3
  Plugin Name: Redirection
4
  Plugin URI: http://urbangiraffe.com/plugins/redirection/
5
  Description: Manage all your 301 redirects and monitor 404 errors
6
+ Version: 2.2.13
7
  Author: John Godley
8
  Author URI: http://urbangiraffe.com
9
  ============================================================================================================
198
  function inject() {
199
  $options = $this->get_options();
200
 
201
+ if ( isset($_GET['token'] ) && isset( $_GET['page'] ) && isset( $_GET['sub'] ) && $_GET['token'] == $options['token'] && $_GET['page'] == 'tools.php?page=redirection.php' && in_array( $_GET['sub'], array( 'rss', 'xml', 'csv', 'apache' ) ) ) {
202
  include dirname( __FILE__ ).'/models/file_io.php';
203
 
204
  $exporter = new Red_FileIO;
257
 
258
  if ( isset( $_POST['deleteall'] ) && check_admin_referer( 'redirection-process_logs' ) ) {
259
  if ( isset( $_GET['module'] ) )
260
+ RE_Log::delete_all( array( 'module_id' => intval( $_GET['module'] ) ), new RE_Pager( $_GET, admin_url( add_query_arg( array( 'sub' => 'log' ), 'tools.php?page=redirection.php' ) ), 'created', 'DESC', 'log' ) );
261
  else if (isset($_GET['group']))
262
+ RE_Log::delete_all( array( 'group_id' => intval( $_GET['group'] ) ), new RE_Pager( $_GET, admin_url( add_query_arg( array( 'sub' => 'log' ), 'tools.php?page=redirection.php' ) ), 'created', 'DESC', 'log' ) );
263
  else
264
+ RE_Log::delete_all( array(), new RE_Pager( $_GET, admin_url( add_query_arg( array( 'sub' => 'log' ), 'tools.php?page=redirection.php' ) ), 'created', 'DESC', 'log' ) );
265
 
266
  $this->render_message( __( 'Your logs have been deleted', 'redirection' ) );
267
  }
268
 
269
+ $pager = new RE_Pager( $_GET, admin_url( add_query_arg( array( 'sub' => 'log' ), 'tools.php?page=redirection.php' ) ), 'created', 'DESC', 'log' );
270
 
271
  if ( isset( $_GET['module'] ) )
272
  $logs = RE_Log::get_by_module( $pager, intval( $_GET['module'] ) );
296
  if ( $module == 0 )
297
  $module = Red_Module::get_first_id();
298
 
299
+ $pager = new RE_Pager( $_GET, admin_url( add_query_arg( array( 'sub' => 'groups' ), 'tools.php?page=redirection.php' ) ), 'position', 'ASC' );
300
  $items = Red_Group::get_all( $module, $pager );
301
 
302
  $this->render_admin( 'group_list', array( 'groups' => $items, 'pager' => $pager, 'modules' => Red_Module::get_for_select(), 'module' => Red_Module::get( $module ) ) );
308
  if ( $group == 0 )
309
  $group = Red_Group::get_first_id();
310
 
311
+ $pager = new RE_Pager( $_GET, admin_url( add_query_arg( array(), 'tools.php?page=redirection.php' ) ), 'position', 'ASC' );
312
  $items = Red_Item::get_by_group( $group, $pager );
313
 
314
  $this->render_admin( 'item_list', array( 'items' => $items, 'pager' => $pager, 'group' => Red_Group::get( $group ), 'groups' => Red_Group::get_for_select(), 'date_format' => get_option( 'date_format' ) ) );
view/admin/annoy.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  if (!$options['support']) :?>
6
  <div style="text-align: center; width: 94px; height: 32px; float: right; margin: 5px 15px 1px 0; padding: 4px 3px 0px 3px;-moz-border-radius: 5px; -webkit-border-radius: 5px;" id="support-annoy">
7
- <a href="<?php echo admin_url( 'page=redirection.php&amp;sub=support' ); ?>">
8
  <img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="support" />
9
  </a>
10
  </div>
4
 
5
  if (!$options['support']) :?>
6
  <div style="text-align: center; width: 94px; height: 32px; float: right; margin: 5px 15px 1px 0; padding: 4px 3px 0px 3px;-moz-border-radius: 5px; -webkit-border-radius: 5px;" id="support-annoy">
7
+ <a href="<?php echo admin_url( 'tools.php?page=redirection.php&amp;sub=support' ); ?>">
8
  <img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="support" />
9
  </a>
10
  </div>
view/admin/group_item.php CHANGED
@@ -5,7 +5,7 @@
5
 
6
  <div class="count">
7
  <?php if ($group->tracking) : ?>
8
- <a href="<?php echo $this->base (); ?>?page=redirection.php&amp;sub=log&amp;group=<?php echo $group->id ?>"><?php echo $group->hits (); ?></a>
9
  <?php else : ?>
10
  &mdash;
11
  <?php endif; ?>
@@ -13,7 +13,7 @@
13
 
14
  <div class="item">
15
  <input class="check" type="checkbox" name="checkall[]" value="<?php echo $group->id ?>"/>
16
- <a href="<?php echo $this->base (); ?>?page=redirection.php&amp;sub=redirects&amp;id=<?php echo $group->id ?>">
17
  <?php echo esc_html( $group->name ); ?>
18
  </a>
19
 
5
 
6
  <div class="count">
7
  <?php if ($group->tracking) : ?>
8
+ <a href="<?php echo admin_url( 'tools.php?page=redirection.php' ) ?>?&amp;sub=log&amp;group=<?php echo $group->id ?>"><?php echo $group->hits (); ?></a>
9
  <?php else : ?>
10
  &mdash;
11
  <?php endif; ?>
13
 
14
  <div class="item">
15
  <input class="check" type="checkbox" name="checkall[]" value="<?php echo $group->id ?>"/>
16
+ <a href="<?php echo admin_url( 'tools.php?page=redirection.php' ) ?>&amp;sub=redirects&amp;id=<?php echo $group->id ?>">
17
  <?php echo esc_html( $group->name ); ?>
18
  </a>
19
 
view/admin/item.php CHANGED
@@ -9,7 +9,7 @@
9
  </div>
10
 
11
  <div class="count">
12
- <a href="<?php echo $this->base (); ?>?page=redirection.php&amp;sub=log&amp;redirect=<?php echo $redirect->id ?>"><?php echo $redirect->last_count ?></a>
13
  </div>
14
 
15
  <div class="type">
9
  </div>
10
 
11
  <div class="count">
12
+ <a href="<?php echo admin_url( 'tools.php?page=redirection.php' ); ?>&amp;sub=log&amp;redirect=<?php echo $redirect->id ?>"><?php echo $redirect->last_count ?></a>
13
  </div>
14
 
15
  <div class="type">
view/admin/module_item.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php if( !defined( 'ABSPATH' ) ) die( 'No direct access allowed' ); ?>
2
  <td class="logo">
3
- <a href="<?php echo $this->base(); ?>?page=redirection.php&amp;sub=groups&amp;id=<?php echo $module->id ?>">
4
  <?php if( $module->type == 'apache' ) : ?>
5
  <img src="<?php echo $this->url() ?>/images/modules/apache.png" width="55" height="56" alt="Apache"/>
6
  <?php elseif( $module->type == 'wp' ) : ?>
@@ -13,7 +13,7 @@
13
 
14
  <td valign="top">
15
  <h4>
16
- <a href="<?php echo $this->base(); ?>?page=redirection.php&amp;sub=groups&amp;id=<?php echo $module->id ?>"><?php echo esc_html( $module->name ); ?></a>
17
  </h4>
18
 
19
  <?php $module->options(); ?>
@@ -22,17 +22,17 @@
22
  <div class="toolbar">
23
  <strong><?php _e( 'View as', 'redirection' ); ?>:</strong>
24
 
25
- <a href="<?php echo $this->base(); ?>?page=redirection.php&amp;sub=csv&amp;module=<?php echo $module->id ?>&amp;token=<?php echo $token ?>"><?php _e( 'CSV', 'redirection' ); ?></a>
26
- <a href="<?php echo $this->base(); ?>?page=redirection.php&amp;sub=xml&amp;module=<?php echo $module->id ?>&amp;token=<?php echo $token ?>"><?php _e( 'XML', 'redirection' ); ?></a>
27
- <a href="<?php echo $this->base(); ?>?page=redirection.php&amp;sub=apache&amp;module=<?php echo $module->id ?>&amp;token=<?php echo $token ?>"><?php _e( 'Apache', 'redirection' ); ?></a>
28
- <a href="<?php echo $this->base(); ?>?page=redirection.php&amp;sub=rss&amp;module=<?php echo $module->id ?>&amp;token=<?php echo $token ?>"><?php _e( 'RSS', 'redirection' ); ?></a>
29
  </div>
30
  <?php endif; ?>
31
  </td>
32
 
33
- <td class="center"><a href="<?php echo $this->base(); ?>?page=redirection.php&amp;sub=groups&amp;id=<?php echo $module->id ?>"><?php echo $module->groups(); ?></a></td>
34
  <td class="center"><?php echo $module->redirects(); ?></td>
35
- <td class="center"><a href="<?php echo $this->base(); ?>?page=redirection.php&amp;sub=log&amp;module=<?php echo $module->id ?>"><?php echo number_format_i18n( $module->hits() ); ?></a></td>
36
 
37
  <?php $nonce = wp_create_nonce( 'redirection-module_manage-'.$module->id ); ?>
38
 
1
  <?php if( !defined( 'ABSPATH' ) ) die( 'No direct access allowed' ); ?>
2
  <td class="logo">
3
+ <a href="<?php echo admin_url( 'tools.php?page=redirection.php' ); ?>&amp;sub=groups&amp;id=<?php echo $module->id ?>">
4
  <?php if( $module->type == 'apache' ) : ?>
5
  <img src="<?php echo $this->url() ?>/images/modules/apache.png" width="55" height="56" alt="Apache"/>
6
  <?php elseif( $module->type == 'wp' ) : ?>
13
 
14
  <td valign="top">
15
  <h4>
16
+ <a href="<?php echo admin_url( 'tools.php?page=redirection.php' ); ?>&amp;sub=groups&amp;id=<?php echo $module->id ?>"><?php echo esc_html( $module->name ); ?></a>
17
  </h4>
18
 
19
  <?php $module->options(); ?>
22
  <div class="toolbar">
23
  <strong><?php _e( 'View as', 'redirection' ); ?>:</strong>
24
 
25
+ <a href="<?php echo admin_url( 'tools.php?page=redirection.php' ); ?>&amp;sub=csv&amp;module=<?php echo $module->id ?>&amp;token=<?php echo $token ?>"><?php _e( 'CSV', 'redirection' ); ?></a>
26
+ <a href="<?php echo admin_url( 'tools.php?page=redirection.php' ); ?>&amp;sub=xml&amp;module=<?php echo $module->id ?>&amp;token=<?php echo $token ?>"><?php _e( 'XML', 'redirection' ); ?></a>
27
+ <a href="<?php echo admin_url( 'tools.php?page=redirection.php' ); ?>&amp;sub=apache&amp;module=<?php echo $module->id ?>&amp;token=<?php echo $token ?>"><?php _e( 'Apache', 'redirection' ); ?></a>
28
+ <a href="<?php echo admin_url( 'tools.php?page=redirection.php' ); ?>&amp;sub=rss&amp;module=<?php echo $module->id ?>&amp;token=<?php echo $token ?>"><?php _e( 'RSS', 'redirection' ); ?></a>
29
  </div>
30
  <?php endif; ?>
31
  </td>
32
 
33
+ <td class="center"><a href="<?php echo admin_url( 'tools.php?page=redirection.php' ); ?>&amp;sub=groups&amp;id=<?php echo $module->id ?>"><?php echo $module->groups(); ?></a></td>
34
  <td class="center"><?php echo $module->redirects(); ?></td>
35
+ <td class="center"><a href="<?php echo admin_url( 'tools.php?page=redirection.php' ); ?>&amp;sub=log&amp;module=<?php echo $module->id ?>"><?php echo number_format_i18n( $module->hits() ); ?></a></td>
36
 
37
  <?php $nonce = wp_create_nonce( 'redirection-module_manage-'.$module->id ); ?>
38