Version Description
- Add Lithuanian
- Add Belarusian
- Add Czech
- Fix order of redirects, thanks to Nicolas Hatier
Download this release
Release Info
| Developer | johnny5 |
| Plugin | |
| Version | 2.2.11 |
| Comparing to | |
| See all releases | |
Code changes from version 2.2.10 to 2.2.11
- actions/error.php +2 -3
- actions/nothing.php +0 -1
- actions/pass.php +0 -1
- actions/random.php +4 -6
- actions/url.php +2 -2
- ajax.php +43 -43
- fileio/apache.php +26 -26
- fileio/csv.php +16 -16
- fileio/rss.php +6 -6
- fileio/xml.php +14 -14
- js/redirection.js +25 -25
- locale/be_BY.mo +0 -0
- locale/be_BY.po +988 -0
- locale/cs_CZ.mo +0 -0
- locale/cs_CZ.po +1135 -0
- locale/lt_LT.mo +0 -0
- locale/lt_LT.po +928 -0
- locale/nl_NL.mo +0 -0
- locale/nl_NL.po +0 -0
- matches/login.php +8 -8
- matches/referrer.php +10 -10
- matches/url.php +5 -5
- matches/user_agent.php +9 -9
- models/action.php +9 -9
- models/database.php +30 -30
- models/file_io.php +6 -8
- models/group.php +35 -35
- models/htaccess.php +41 -41
- models/log.php +29 -29
- models/match.php +16 -16
- models/module.php +46 -46
- models/monitor.php +6 -6
- models/pager.php +70 -70
- models/redirect.php +57 -57
- modules/404.php +11 -11
- modules/apache.php +21 -21
- modules/wordpress.php +9 -9
- plugin.php +9 -9
- readme.txt +45 -37
- redirection.php +47 -47
- view/admin/add.php +4 -4
- view/admin/annoy.php +2 -2
- view/admin/group_edit.php +1 -1
- view/admin/group_item.php +2 -2
- view/admin/group_list.php +15 -15
- view/admin/item.php +3 -3
- view/admin/item_edit.php +1 -1
- view/admin/item_list.php +17 -17
- view/admin/log.php +7 -7
- view/admin/log_item_details.php +1 -1
- view/admin/module_edit.php +2 -2
- view/admin/module_item.php +4 -4
- view/admin/module_list.php +2 -2
- view/admin/options.php +14 -14
- view/admin/support.php +9 -9
actions/error.php
CHANGED
|
@@ -12,14 +12,13 @@ class Error_Action extends Red_Action
|
|
| 12 |
410 => get_status_header_desc (410)
|
| 13 |
);
|
| 14 |
}
|
| 15 |
-
|
| 16 |
function process_after ()
|
| 17 |
{
|
| 18 |
global $wp_query;
|
| 19 |
$wp_query->is_404 = true;
|
| 20 |
-
|
| 21 |
// Page comments plugin interferes with this
|
| 22 |
remove_filter ('template_redirect', 'paged_comments_alter_source', 12);
|
| 23 |
}
|
| 24 |
}
|
| 25 |
-
?>
|
| 12 |
410 => get_status_header_desc (410)
|
| 13 |
);
|
| 14 |
}
|
| 15 |
+
|
| 16 |
function process_after ()
|
| 17 |
{
|
| 18 |
global $wp_query;
|
| 19 |
$wp_query->is_404 = true;
|
| 20 |
+
|
| 21 |
// Page comments plugin interferes with this
|
| 22 |
remove_filter ('template_redirect', 'paged_comments_alter_source', 12);
|
| 23 |
}
|
| 24 |
}
|
|
|
actions/nothing.php
CHANGED
|
@@ -4,4 +4,3 @@ class Nothing_Action extends Red_Action
|
|
| 4 |
{
|
| 5 |
function can_perform_action () { return false; }
|
| 6 |
}
|
| 7 |
-
?>
|
| 4 |
{
|
| 5 |
function can_perform_action () { return false; }
|
| 6 |
}
|
|
|
actions/pass.php
CHANGED
|
@@ -45,4 +45,3 @@ class Pass_Action extends Red_Action
|
|
| 45 |
return true;
|
| 46 |
}
|
| 47 |
}
|
| 48 |
-
?>
|
| 45 |
return true;
|
| 46 |
}
|
| 47 |
}
|
|
|
actions/random.php
CHANGED
|
@@ -24,7 +24,7 @@ class Random_Action extends Red_Action
|
|
| 24 |
{
|
| 25 |
function can_change_code () { return true; }
|
| 26 |
function can_perform_action () { return false; }
|
| 27 |
-
|
| 28 |
function action_codes ()
|
| 29 |
{
|
| 30 |
return array
|
|
@@ -34,18 +34,16 @@ class Random_Action extends Red_Action
|
|
| 34 |
307 => get_status_header_desc (307)
|
| 35 |
);
|
| 36 |
}
|
| 37 |
-
|
| 38 |
function process_before ($code, $target)
|
| 39 |
{
|
| 40 |
// Pick a random WordPress page
|
| 41 |
global $wpdb;
|
| 42 |
$id = $wpdb->get_var ("SELECT ID FROM {$wpdb->prefix}posts WHERE post_status='publish' AND post_password='' AND post_type='post' ORDER BY RAND() LIMIT 0,1");
|
| 43 |
-
|
| 44 |
$target = str_replace (get_bloginfo ('url'), '', get_permalink ($id));
|
| 45 |
-
|
| 46 |
wp_redirect ($target, $code);
|
| 47 |
exit ();
|
| 48 |
}
|
| 49 |
}
|
| 50 |
-
|
| 51 |
-
?>
|
| 24 |
{
|
| 25 |
function can_change_code () { return true; }
|
| 26 |
function can_perform_action () { return false; }
|
| 27 |
+
|
| 28 |
function action_codes ()
|
| 29 |
{
|
| 30 |
return array
|
| 34 |
307 => get_status_header_desc (307)
|
| 35 |
);
|
| 36 |
}
|
| 37 |
+
|
| 38 |
function process_before ($code, $target)
|
| 39 |
{
|
| 40 |
// Pick a random WordPress page
|
| 41 |
global $wpdb;
|
| 42 |
$id = $wpdb->get_var ("SELECT ID FROM {$wpdb->prefix}posts WHERE post_status='publish' AND post_password='' AND post_type='post' ORDER BY RAND() LIMIT 0,1");
|
| 43 |
+
|
| 44 |
$target = str_replace (get_bloginfo ('url'), '', get_permalink ($id));
|
| 45 |
+
|
| 46 |
wp_redirect ($target, $code);
|
| 47 |
exit ();
|
| 48 |
}
|
| 49 |
}
|
|
|
|
|
|
actions/url.php
CHANGED
|
@@ -4,7 +4,7 @@ class Url_Action extends Red_Action {
|
|
| 4 |
function can_change_code() {
|
| 5 |
return true;
|
| 6 |
}
|
| 7 |
-
|
| 8 |
function action_codes() {
|
| 9 |
return array(
|
| 10 |
301 => get_status_header_desc( 301 ),
|
|
@@ -12,7 +12,7 @@ class Url_Action extends Red_Action {
|
|
| 12 |
307 => get_status_header_desc( 307 )
|
| 13 |
);
|
| 14 |
}
|
| 15 |
-
|
| 16 |
function process_before( $code, $target ) {
|
| 17 |
wp_redirect( $target, $code );
|
| 18 |
die();
|
| 4 |
function can_change_code() {
|
| 5 |
return true;
|
| 6 |
}
|
| 7 |
+
|
| 8 |
function action_codes() {
|
| 9 |
return array(
|
| 10 |
301 => get_status_header_desc( 301 ),
|
| 12 |
307 => get_status_header_desc( 307 )
|
| 13 |
);
|
| 14 |
}
|
| 15 |
+
|
| 16 |
function process_before( $code, $target ) {
|
| 17 |
wp_redirect( $target, $code );
|
| 18 |
die();
|
ajax.php
CHANGED
|
@@ -25,27 +25,27 @@ header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
|
|
| 25 |
|
| 26 |
class RedirectionAjax extends Redirection_Plugin {
|
| 27 |
var $post;
|
| 28 |
-
|
| 29 |
function RedirectionAjax() {
|
| 30 |
$this->register_plugin( 'redirection', __FILE__ );
|
| 31 |
|
| 32 |
add_action( 'init', array( &$this, 'init' ) );
|
| 33 |
}
|
| 34 |
-
|
| 35 |
function init() {
|
| 36 |
if ( current_user_can( 'administrator' ) ) {
|
| 37 |
$this->post = stripslashes_deep( $_POST );
|
| 38 |
-
|
| 39 |
$this->register_ajax( 'red_log_show' );
|
| 40 |
$this->register_ajax( 'red_log_hide' );
|
| 41 |
$this->register_ajax( 'red_log_delete' );
|
| 42 |
-
|
| 43 |
$this->register_ajax( 'red_module_edit' );
|
| 44 |
$this->register_ajax( 'red_module_load' );
|
| 45 |
$this->register_ajax( 'red_module_save' );
|
| 46 |
$this->register_ajax( 'red_module_reset' );
|
| 47 |
$this->register_ajax( 'red_module_delete' );
|
| 48 |
-
|
| 49 |
$this->register_ajax( 'red_group_edit' );
|
| 50 |
$this->register_ajax( 'red_group_load' );
|
| 51 |
$this->register_ajax( 'red_group_save' );
|
|
@@ -66,14 +66,14 @@ class RedirectionAjax extends Redirection_Plugin {
|
|
| 66 |
$this->register_ajax( 'red_redirect_add' );
|
| 67 |
}
|
| 68 |
}
|
| 69 |
-
|
| 70 |
function red_log_show() {
|
| 71 |
$id = intval( $_GET['id'] );
|
| 72 |
-
|
| 73 |
if ( check_ajax_referer( 'redirection-log_'.$id ) ) {
|
| 74 |
$log = RE_Log::get_by_id( $id );
|
| 75 |
$redirect = Red_Item::get_by_id( $log->redirection_id );
|
| 76 |
-
|
| 77 |
$this->render_admin( 'log_item_details', array( 'log' => $log, 'redirect' => $redirect ) );
|
| 78 |
die();
|
| 79 |
}
|
|
@@ -81,7 +81,7 @@ class RedirectionAjax extends Redirection_Plugin {
|
|
| 81 |
|
| 82 |
function red_log_hide() {
|
| 83 |
$id = intval( $_GET['id'] );
|
| 84 |
-
|
| 85 |
if ( check_ajax_referer( 'redirection-log_'.$id ) ) {
|
| 86 |
$log = RE_Log::get_by_id( $id );
|
| 87 |
|
|
@@ -89,7 +89,7 @@ class RedirectionAjax extends Redirection_Plugin {
|
|
| 89 |
die();
|
| 90 |
}
|
| 91 |
}
|
| 92 |
-
|
| 93 |
function red_log_delete() {
|
| 94 |
if ( check_ajax_referer( 'redirection-items' ) ) {
|
| 95 |
if ( preg_match_all( '/=(\d*)/', $this->post['checked'], $items ) > 0) {
|
|
@@ -99,36 +99,36 @@ class RedirectionAjax extends Redirection_Plugin {
|
|
| 99 |
}
|
| 100 |
}
|
| 101 |
}
|
| 102 |
-
|
| 103 |
function red_module_edit() {
|
| 104 |
$id = intval( $_GET['id'] );
|
| 105 |
-
|
| 106 |
if ( check_ajax_referer( 'redirection-module_'.$id ) ) {
|
| 107 |
$module = Red_Module::get( $id );
|
| 108 |
-
|
| 109 |
if ( $module )
|
| 110 |
$this->render_admin( 'module_edit', array( 'module' => $module ) );
|
| 111 |
-
|
| 112 |
die();
|
| 113 |
}
|
| 114 |
}
|
| 115 |
-
|
| 116 |
function red_module_load() {
|
| 117 |
$id = intval( $_GET['id'] );
|
| 118 |
-
|
| 119 |
if ( check_ajax_referer( 'redirection-module_'.$id ) ) {
|
| 120 |
$module = Red_Module::get ($id);
|
| 121 |
if ($module) {
|
| 122 |
global $redirection;
|
| 123 |
$options = $redirection->get_options();
|
| 124 |
-
|
| 125 |
$this->render_admin( 'module_item', array( 'module' => $module, 'token' => $options['token'] ) );
|
| 126 |
}
|
| 127 |
-
|
| 128 |
die();
|
| 129 |
}
|
| 130 |
}
|
| 131 |
-
|
| 132 |
function red_module_save() {
|
| 133 |
$id = intval( $this->post['id'] );
|
| 134 |
|
|
@@ -138,19 +138,19 @@ class RedirectionAjax extends Redirection_Plugin {
|
|
| 138 |
global $redirection;
|
| 139 |
$options = $redirection->get_options();
|
| 140 |
$module->update( $this->post );
|
| 141 |
-
|
| 142 |
$this->render_admin( 'module_item', array( 'module' => $module, 'token' => $options['token'] ) );
|
| 143 |
die();
|
| 144 |
}
|
| 145 |
}
|
| 146 |
}
|
| 147 |
-
|
| 148 |
function red_module_reset() {
|
| 149 |
$id = intval( $_GET['id'] );
|
| 150 |
-
|
| 151 |
if ( check_ajax_referer( 'redirection-module_'.$id ) ) {
|
| 152 |
$module = Red_Module::get( $id );
|
| 153 |
-
|
| 154 |
if ( $module ) {
|
| 155 |
global $redirection;
|
| 156 |
$options = $redirection->get_options();
|
|
@@ -158,11 +158,11 @@ class RedirectionAjax extends Redirection_Plugin {
|
|
| 158 |
$module->reset ();
|
| 159 |
$this->render_admin( 'module_item', array( 'module' => $module, 'token' => $options['token'] ) );
|
| 160 |
}
|
| 161 |
-
|
| 162 |
die();
|
| 163 |
}
|
| 164 |
}
|
| 165 |
-
|
| 166 |
function red_module_delete() {
|
| 167 |
$id = intval( $_GET['id'] );
|
| 168 |
if ( check_ajax_referer( 'redirection-module_'.$id ) ) {
|
|
@@ -173,19 +173,19 @@ class RedirectionAjax extends Redirection_Plugin {
|
|
| 173 |
|
| 174 |
function red_group_edit() {
|
| 175 |
$id = intval( $_GET['id'] );
|
| 176 |
-
|
| 177 |
if ( check_ajax_referer( 'redirection-group_'.$id ) ) {
|
| 178 |
$group = Red_Group::get( $id );
|
| 179 |
if ( $group )
|
| 180 |
$this->render_admin( 'group_edit', array( 'group' => $group, 'modules' => Red_Module::get_for_select() ) );
|
| 181 |
-
|
| 182 |
die();
|
| 183 |
}
|
| 184 |
}
|
| 185 |
-
|
| 186 |
function red_group_load() {
|
| 187 |
$id = intval( $_GET['id'] );
|
| 188 |
-
|
| 189 |
if ( check_ajax_referer( 'redirection-group_'.$id ) ) {
|
| 190 |
$group = Red_Group::get( $id );
|
| 191 |
if ( $group )
|
|
@@ -202,10 +202,10 @@ class RedirectionAjax extends Redirection_Plugin {
|
|
| 202 |
if ( $group ) {
|
| 203 |
$original_module = $group->module_id;
|
| 204 |
$group->update( $this->post );
|
| 205 |
-
|
| 206 |
$this->render_admin( 'group_item', array( 'group' => $group ) );
|
| 207 |
}
|
| 208 |
-
|
| 209 |
die();
|
| 210 |
}
|
| 211 |
}
|
|
@@ -217,12 +217,12 @@ class RedirectionAjax extends Redirection_Plugin {
|
|
| 217 |
$group = Red_Group::get( $group );
|
| 218 |
$group->toggle_status();
|
| 219 |
}
|
| 220 |
-
|
| 221 |
Red_Module::flush( $group->module_id );
|
| 222 |
}
|
| 223 |
}
|
| 224 |
}
|
| 225 |
-
|
| 226 |
function red_group_delete() {
|
| 227 |
if ( check_ajax_referer( 'redirection-items' ) ) {
|
| 228 |
if ( preg_match_all( '/=(\d*)/', $this->post['checked'], $items ) > 0) {
|
|
@@ -232,7 +232,7 @@ class RedirectionAjax extends Redirection_Plugin {
|
|
| 232 |
}
|
| 233 |
}
|
| 234 |
}
|
| 235 |
-
|
| 236 |
function red_group_reset() {
|
| 237 |
if ( check_ajax_referer( 'redirection-items' ) ) {
|
| 238 |
if ( preg_match_all( '/=(\d*)/', $this->post['checked'], $items ) > 0) {
|
|
@@ -243,11 +243,11 @@ class RedirectionAjax extends Redirection_Plugin {
|
|
| 243 |
}
|
| 244 |
}
|
| 245 |
}
|
| 246 |
-
|
| 247 |
function red_group_move() {
|
| 248 |
if ( check_ajax_referer( 'redirection-items' ) ) {
|
| 249 |
$target = intval( $this->post['target'] );
|
| 250 |
-
|
| 251 |
if ( preg_match_all( '/=(\d*)/', $this->post['checked'], $items ) > 0) {
|
| 252 |
foreach ( $items[1] AS $group ) {
|
| 253 |
$redirect = Red_Group::get( $group );
|
|
@@ -270,7 +270,7 @@ class RedirectionAjax extends Redirection_Plugin {
|
|
| 270 |
$redirect = Red_Item::get_by_id( intval( $_GET['id'] ) );
|
| 271 |
if ( $redirect )
|
| 272 |
$this->render_admin( 'item_edit', array( 'redirect' => $redirect, 'groups' => Red_Group::get_for_select() ) );
|
| 273 |
-
|
| 274 |
die();
|
| 275 |
}
|
| 276 |
}
|
|
@@ -280,18 +280,18 @@ class RedirectionAjax extends Redirection_Plugin {
|
|
| 280 |
$redirect = Red_Item::get_by_id( intval( $_GET['id'] ) );
|
| 281 |
if ( $redirect )
|
| 282 |
$this->render_admin( 'item', array( 'redirect' => $redirect, 'date_format' => get_option( 'date_format' ) ) );
|
| 283 |
-
|
| 284 |
die();
|
| 285 |
}
|
| 286 |
}
|
| 287 |
-
|
| 288 |
function red_redirect_save() {
|
| 289 |
$id = intval( $this->post['id'] );
|
| 290 |
|
| 291 |
if ( check_ajax_referer( 'redirection-redirect_save_'.$id ) ) {
|
| 292 |
$redirect = Red_Item::get_by_id( $id );
|
| 293 |
$redirect->update( $this->post );
|
| 294 |
-
|
| 295 |
$this->render_admin( 'item', array( 'redirect' => $redirect, 'date_format' => get_option( 'date_format' ) ) );
|
| 296 |
die();
|
| 297 |
}
|
|
@@ -305,12 +305,12 @@ class RedirectionAjax extends Redirection_Plugin {
|
|
| 305 |
$redirect->toggle_status();
|
| 306 |
}
|
| 307 |
}
|
| 308 |
-
|
| 309 |
$group = Red_Group::get( $redirect->group_id );
|
| 310 |
Red_Module::flush( $group->module_id );
|
| 311 |
}
|
| 312 |
}
|
| 313 |
-
|
| 314 |
function red_redirect_delete() {
|
| 315 |
if ( check_ajax_referer( 'redirection-items' ) ) {
|
| 316 |
if ( preg_match_all( '/=(\d*)/', $this->post['checked'], $items ) > 0) {
|
|
@@ -368,7 +368,7 @@ class RedirectionAjax extends Redirection_Plugin {
|
|
| 368 |
}
|
| 369 |
else
|
| 370 |
$this->render_error (__ ('Sorry, but your redirection was not created', 'redirection'));
|
| 371 |
-
|
| 372 |
die();
|
| 373 |
}
|
| 374 |
}
|
| 25 |
|
| 26 |
class RedirectionAjax extends Redirection_Plugin {
|
| 27 |
var $post;
|
| 28 |
+
|
| 29 |
function RedirectionAjax() {
|
| 30 |
$this->register_plugin( 'redirection', __FILE__ );
|
| 31 |
|
| 32 |
add_action( 'init', array( &$this, 'init' ) );
|
| 33 |
}
|
| 34 |
+
|
| 35 |
function init() {
|
| 36 |
if ( current_user_can( 'administrator' ) ) {
|
| 37 |
$this->post = stripslashes_deep( $_POST );
|
| 38 |
+
|
| 39 |
$this->register_ajax( 'red_log_show' );
|
| 40 |
$this->register_ajax( 'red_log_hide' );
|
| 41 |
$this->register_ajax( 'red_log_delete' );
|
| 42 |
+
|
| 43 |
$this->register_ajax( 'red_module_edit' );
|
| 44 |
$this->register_ajax( 'red_module_load' );
|
| 45 |
$this->register_ajax( 'red_module_save' );
|
| 46 |
$this->register_ajax( 'red_module_reset' );
|
| 47 |
$this->register_ajax( 'red_module_delete' );
|
| 48 |
+
|
| 49 |
$this->register_ajax( 'red_group_edit' );
|
| 50 |
$this->register_ajax( 'red_group_load' );
|
| 51 |
$this->register_ajax( 'red_group_save' );
|
| 66 |
$this->register_ajax( 'red_redirect_add' );
|
| 67 |
}
|
| 68 |
}
|
| 69 |
+
|
| 70 |
function red_log_show() {
|
| 71 |
$id = intval( $_GET['id'] );
|
| 72 |
+
|
| 73 |
if ( check_ajax_referer( 'redirection-log_'.$id ) ) {
|
| 74 |
$log = RE_Log::get_by_id( $id );
|
| 75 |
$redirect = Red_Item::get_by_id( $log->redirection_id );
|
| 76 |
+
|
| 77 |
$this->render_admin( 'log_item_details', array( 'log' => $log, 'redirect' => $redirect ) );
|
| 78 |
die();
|
| 79 |
}
|
| 81 |
|
| 82 |
function red_log_hide() {
|
| 83 |
$id = intval( $_GET['id'] );
|
| 84 |
+
|
| 85 |
if ( check_ajax_referer( 'redirection-log_'.$id ) ) {
|
| 86 |
$log = RE_Log::get_by_id( $id );
|
| 87 |
|
| 89 |
die();
|
| 90 |
}
|
| 91 |
}
|
| 92 |
+
|
| 93 |
function red_log_delete() {
|
| 94 |
if ( check_ajax_referer( 'redirection-items' ) ) {
|
| 95 |
if ( preg_match_all( '/=(\d*)/', $this->post['checked'], $items ) > 0) {
|
| 99 |
}
|
| 100 |
}
|
| 101 |
}
|
| 102 |
+
|
| 103 |
function red_module_edit() {
|
| 104 |
$id = intval( $_GET['id'] );
|
| 105 |
+
|
| 106 |
if ( check_ajax_referer( 'redirection-module_'.$id ) ) {
|
| 107 |
$module = Red_Module::get( $id );
|
| 108 |
+
|
| 109 |
if ( $module )
|
| 110 |
$this->render_admin( 'module_edit', array( 'module' => $module ) );
|
| 111 |
+
|
| 112 |
die();
|
| 113 |
}
|
| 114 |
}
|
| 115 |
+
|
| 116 |
function red_module_load() {
|
| 117 |
$id = intval( $_GET['id'] );
|
| 118 |
+
|
| 119 |
if ( check_ajax_referer( 'redirection-module_'.$id ) ) {
|
| 120 |
$module = Red_Module::get ($id);
|
| 121 |
if ($module) {
|
| 122 |
global $redirection;
|
| 123 |
$options = $redirection->get_options();
|
| 124 |
+
|
| 125 |
$this->render_admin( 'module_item', array( 'module' => $module, 'token' => $options['token'] ) );
|
| 126 |
}
|
| 127 |
+
|
| 128 |
die();
|
| 129 |
}
|
| 130 |
}
|
| 131 |
+
|
| 132 |
function red_module_save() {
|
| 133 |
$id = intval( $this->post['id'] );
|
| 134 |
|
| 138 |
global $redirection;
|
| 139 |
$options = $redirection->get_options();
|
| 140 |
$module->update( $this->post );
|
| 141 |
+
|
| 142 |
$this->render_admin( 'module_item', array( 'module' => $module, 'token' => $options['token'] ) );
|
| 143 |
die();
|
| 144 |
}
|
| 145 |
}
|
| 146 |
}
|
| 147 |
+
|
| 148 |
function red_module_reset() {
|
| 149 |
$id = intval( $_GET['id'] );
|
| 150 |
+
|
| 151 |
if ( check_ajax_referer( 'redirection-module_'.$id ) ) {
|
| 152 |
$module = Red_Module::get( $id );
|
| 153 |
+
|
| 154 |
if ( $module ) {
|
| 155 |
global $redirection;
|
| 156 |
$options = $redirection->get_options();
|
| 158 |
$module->reset ();
|
| 159 |
$this->render_admin( 'module_item', array( 'module' => $module, 'token' => $options['token'] ) );
|
| 160 |
}
|
| 161 |
+
|
| 162 |
die();
|
| 163 |
}
|
| 164 |
}
|
| 165 |
+
|
| 166 |
function red_module_delete() {
|
| 167 |
$id = intval( $_GET['id'] );
|
| 168 |
if ( check_ajax_referer( 'redirection-module_'.$id ) ) {
|
| 173 |
|
| 174 |
function red_group_edit() {
|
| 175 |
$id = intval( $_GET['id'] );
|
| 176 |
+
|
| 177 |
if ( check_ajax_referer( 'redirection-group_'.$id ) ) {
|
| 178 |
$group = Red_Group::get( $id );
|
| 179 |
if ( $group )
|
| 180 |
$this->render_admin( 'group_edit', array( 'group' => $group, 'modules' => Red_Module::get_for_select() ) );
|
| 181 |
+
|
| 182 |
die();
|
| 183 |
}
|
| 184 |
}
|
| 185 |
+
|
| 186 |
function red_group_load() {
|
| 187 |
$id = intval( $_GET['id'] );
|
| 188 |
+
|
| 189 |
if ( check_ajax_referer( 'redirection-group_'.$id ) ) {
|
| 190 |
$group = Red_Group::get( $id );
|
| 191 |
if ( $group )
|
| 202 |
if ( $group ) {
|
| 203 |
$original_module = $group->module_id;
|
| 204 |
$group->update( $this->post );
|
| 205 |
+
|
| 206 |
$this->render_admin( 'group_item', array( 'group' => $group ) );
|
| 207 |
}
|
| 208 |
+
|
| 209 |
die();
|
| 210 |
}
|
| 211 |
}
|
| 217 |
$group = Red_Group::get( $group );
|
| 218 |
$group->toggle_status();
|
| 219 |
}
|
| 220 |
+
|
| 221 |
Red_Module::flush( $group->module_id );
|
| 222 |
}
|
| 223 |
}
|
| 224 |
}
|
| 225 |
+
|
| 226 |
function red_group_delete() {
|
| 227 |
if ( check_ajax_referer( 'redirection-items' ) ) {
|
| 228 |
if ( preg_match_all( '/=(\d*)/', $this->post['checked'], $items ) > 0) {
|
| 232 |
}
|
| 233 |
}
|
| 234 |
}
|
| 235 |
+
|
| 236 |
function red_group_reset() {
|
| 237 |
if ( check_ajax_referer( 'redirection-items' ) ) {
|
| 238 |
if ( preg_match_all( '/=(\d*)/', $this->post['checked'], $items ) > 0) {
|
| 243 |
}
|
| 244 |
}
|
| 245 |
}
|
| 246 |
+
|
| 247 |
function red_group_move() {
|
| 248 |
if ( check_ajax_referer( 'redirection-items' ) ) {
|
| 249 |
$target = intval( $this->post['target'] );
|
| 250 |
+
|
| 251 |
if ( preg_match_all( '/=(\d*)/', $this->post['checked'], $items ) > 0) {
|
| 252 |
foreach ( $items[1] AS $group ) {
|
| 253 |
$redirect = Red_Group::get( $group );
|
| 270 |
$redirect = Red_Item::get_by_id( intval( $_GET['id'] ) );
|
| 271 |
if ( $redirect )
|
| 272 |
$this->render_admin( 'item_edit', array( 'redirect' => $redirect, 'groups' => Red_Group::get_for_select() ) );
|
| 273 |
+
|
| 274 |
die();
|
| 275 |
}
|
| 276 |
}
|
| 280 |
$redirect = Red_Item::get_by_id( intval( $_GET['id'] ) );
|
| 281 |
if ( $redirect )
|
| 282 |
$this->render_admin( 'item', array( 'redirect' => $redirect, 'date_format' => get_option( 'date_format' ) ) );
|
| 283 |
+
|
| 284 |
die();
|
| 285 |
}
|
| 286 |
}
|
| 287 |
+
|
| 288 |
function red_redirect_save() {
|
| 289 |
$id = intval( $this->post['id'] );
|
| 290 |
|
| 291 |
if ( check_ajax_referer( 'redirection-redirect_save_'.$id ) ) {
|
| 292 |
$redirect = Red_Item::get_by_id( $id );
|
| 293 |
$redirect->update( $this->post );
|
| 294 |
+
|
| 295 |
$this->render_admin( 'item', array( 'redirect' => $redirect, 'date_format' => get_option( 'date_format' ) ) );
|
| 296 |
die();
|
| 297 |
}
|
| 305 |
$redirect->toggle_status();
|
| 306 |
}
|
| 307 |
}
|
| 308 |
+
|
| 309 |
$group = Red_Group::get( $redirect->group_id );
|
| 310 |
Red_Module::flush( $group->module_id );
|
| 311 |
}
|
| 312 |
}
|
| 313 |
+
|
| 314 |
function red_redirect_delete() {
|
| 315 |
if ( check_ajax_referer( 'redirection-items' ) ) {
|
| 316 |
if ( preg_match_all( '/=(\d*)/', $this->post['checked'], $items ) > 0) {
|
| 368 |
}
|
| 369 |
else
|
| 370 |
$this->render_error (__ ('Sorry, but your redirection was not created', 'redirection'));
|
| 371 |
+
|
| 372 |
die();
|
| 373 |
}
|
| 374 |
}
|
fileio/apache.php
CHANGED
|
@@ -20,37 +20,37 @@ if (!function_exists ('strpbrk'))
|
|
| 20 |
return false;
|
| 21 |
}
|
| 22 |
return substr($haystack, $pos);
|
| 23 |
-
}
|
| 24 |
}
|
| 25 |
|
| 26 |
class Red_Apache_File extends Red_FileIO
|
| 27 |
{
|
| 28 |
var $htaccess;
|
| 29 |
-
|
| 30 |
function collect ($module)
|
| 31 |
{
|
| 32 |
include_once (dirname (__FILE__).'/../models/htaccess.php');
|
| 33 |
|
| 34 |
$this->htaccess = new Red_Htaccess ($module);
|
| 35 |
$pager = new RE_Pager ($_GET, $_SERVER['REQUEST_URI'], 'name', 'DESC', 'log');
|
| 36 |
-
|
| 37 |
$pager->per_page = 0;
|
| 38 |
$this->name = $module->name;
|
| 39 |
$this->id = $module->id;
|
| 40 |
-
|
| 41 |
// Get the items
|
| 42 |
$items = Red_Item::get_by_module ($pager, $module->id);
|
| 43 |
-
|
| 44 |
foreach ($items AS $item)
|
| 45 |
$this->htaccess->add ($item);
|
| 46 |
-
|
| 47 |
return true;
|
| 48 |
}
|
| 49 |
-
|
| 50 |
function feed ()
|
| 51 |
{
|
| 52 |
$filename = sprintf ('module_%d.htaccess', $this->id);
|
| 53 |
-
|
| 54 |
header ("Content-Type: application/octet-stream");
|
| 55 |
header ("Cache-Control: no-cache, must-revalidate");
|
| 56 |
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
|
@@ -58,7 +58,7 @@ class Red_Apache_File extends Red_FileIO
|
|
| 58 |
|
| 59 |
echo $this->htaccess->generate ($this->name);
|
| 60 |
}
|
| 61 |
-
|
| 62 |
function load ($group, $data)
|
| 63 |
{
|
| 64 |
// Remove any comments
|
|
@@ -83,7 +83,7 @@ class Red_Apache_File extends Red_FileIO
|
|
| 83 |
else if (preg_match ('@Redirectmatch\s+(.*?)\s+(.*?)@i', $line, $matches) > 0)
|
| 84 |
$items[] = array ('source' => $this->decode_url ($matches[1]), 'target' => $this->decode_url ($matches[2]), 'code' => 302, 'regex' => true);
|
| 85 |
}
|
| 86 |
-
|
| 87 |
// Add items to group
|
| 88 |
if (count ($items) > 0)
|
| 89 |
{
|
|
@@ -94,29 +94,29 @@ class Red_Apache_File extends Red_FileIO
|
|
| 94 |
$item['match'] = 'url';
|
| 95 |
if ($item['code'] == 0)
|
| 96 |
$item['red_action'] = 'pass';
|
| 97 |
-
|
| 98 |
Red_Item::create ($item);
|
| 99 |
}
|
| 100 |
-
|
| 101 |
return count ($items);
|
| 102 |
}
|
| 103 |
}
|
| 104 |
-
|
| 105 |
return 0;
|
| 106 |
}
|
| 107 |
-
|
| 108 |
function decode_url ($url)
|
| 109 |
{
|
| 110 |
$url = rawurldecode ($url);
|
| 111 |
$url = str_replace ('\\.', '.', $url);
|
| 112 |
return $url;
|
| 113 |
}
|
| 114 |
-
|
| 115 |
function is_str_regex ($url)
|
| 116 |
{
|
| 117 |
$regex = '()[]$^?+.';
|
| 118 |
$escape = false;
|
| 119 |
-
|
| 120 |
for ($x = 0; $x < strlen ($url); $x++)
|
| 121 |
{
|
| 122 |
if ($url{$x} == '\\')
|
|
@@ -126,40 +126,40 @@ class Red_Apache_File extends Red_FileIO
|
|
| 126 |
else
|
| 127 |
$escape = false;
|
| 128 |
}
|
| 129 |
-
|
| 130 |
return false;
|
| 131 |
}
|
| 132 |
-
|
| 133 |
function is_regex ($url)
|
| 134 |
{
|
| 135 |
if ($this->is_str_regex ($url))
|
| 136 |
{
|
| 137 |
$tmp = ltrim ($url, '^');
|
| 138 |
$tmp = rtrim ($tmp, '$');
|
| 139 |
-
|
| 140 |
if ($this->is_str_regex ($tmp))
|
| 141 |
return true;
|
| 142 |
}
|
| 143 |
-
|
| 144 |
return false;
|
| 145 |
}
|
| 146 |
-
|
| 147 |
function regex_url ($url)
|
| 148 |
{
|
| 149 |
if ($this->is_str_regex ($url))
|
| 150 |
{
|
| 151 |
$tmp = ltrim ($url, '^');
|
| 152 |
$tmp = rtrim ($tmp, '$');
|
| 153 |
-
|
| 154 |
if ($this->is_str_regex ($tmp) == false)
|
| 155 |
return '/'.$this->decode_url ($tmp);
|
| 156 |
-
|
| 157 |
return '/'.$this->decode_url ($url);
|
| 158 |
}
|
| 159 |
-
|
| 160 |
return $this->decode_url ($url);
|
| 161 |
}
|
| 162 |
-
|
| 163 |
function get_code ($code)
|
| 164 |
{
|
| 165 |
if (strpos ($code, '301') !== false || stripos ($code, 'permanent') !== false)
|
|
@@ -175,4 +175,4 @@ class Red_Apache_File extends Red_FileIO
|
|
| 175 |
return 0;
|
| 176 |
}
|
| 177 |
}
|
| 178 |
-
?>
|
| 20 |
return false;
|
| 21 |
}
|
| 22 |
return substr($haystack, $pos);
|
| 23 |
+
}
|
| 24 |
}
|
| 25 |
|
| 26 |
class Red_Apache_File extends Red_FileIO
|
| 27 |
{
|
| 28 |
var $htaccess;
|
| 29 |
+
|
| 30 |
function collect ($module)
|
| 31 |
{
|
| 32 |
include_once (dirname (__FILE__).'/../models/htaccess.php');
|
| 33 |
|
| 34 |
$this->htaccess = new Red_Htaccess ($module);
|
| 35 |
$pager = new RE_Pager ($_GET, $_SERVER['REQUEST_URI'], 'name', 'DESC', 'log');
|
| 36 |
+
|
| 37 |
$pager->per_page = 0;
|
| 38 |
$this->name = $module->name;
|
| 39 |
$this->id = $module->id;
|
| 40 |
+
|
| 41 |
// Get the items
|
| 42 |
$items = Red_Item::get_by_module ($pager, $module->id);
|
| 43 |
+
|
| 44 |
foreach ($items AS $item)
|
| 45 |
$this->htaccess->add ($item);
|
| 46 |
+
|
| 47 |
return true;
|
| 48 |
}
|
| 49 |
+
|
| 50 |
function feed ()
|
| 51 |
{
|
| 52 |
$filename = sprintf ('module_%d.htaccess', $this->id);
|
| 53 |
+
|
| 54 |
header ("Content-Type: application/octet-stream");
|
| 55 |
header ("Cache-Control: no-cache, must-revalidate");
|
| 56 |
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
| 58 |
|
| 59 |
echo $this->htaccess->generate ($this->name);
|
| 60 |
}
|
| 61 |
+
|
| 62 |
function load ($group, $data)
|
| 63 |
{
|
| 64 |
// Remove any comments
|
| 83 |
else if (preg_match ('@Redirectmatch\s+(.*?)\s+(.*?)@i', $line, $matches) > 0)
|
| 84 |
$items[] = array ('source' => $this->decode_url ($matches[1]), 'target' => $this->decode_url ($matches[2]), 'code' => 302, 'regex' => true);
|
| 85 |
}
|
| 86 |
+
|
| 87 |
// Add items to group
|
| 88 |
if (count ($items) > 0)
|
| 89 |
{
|
| 94 |
$item['match'] = 'url';
|
| 95 |
if ($item['code'] == 0)
|
| 96 |
$item['red_action'] = 'pass';
|
| 97 |
+
|
| 98 |
Red_Item::create ($item);
|
| 99 |
}
|
| 100 |
+
|
| 101 |
return count ($items);
|
| 102 |
}
|
| 103 |
}
|
| 104 |
+
|
| 105 |
return 0;
|
| 106 |
}
|
| 107 |
+
|
| 108 |
function decode_url ($url)
|
| 109 |
{
|
| 110 |
$url = rawurldecode ($url);
|
| 111 |
$url = str_replace ('\\.', '.', $url);
|
| 112 |
return $url;
|
| 113 |
}
|
| 114 |
+
|
| 115 |
function is_str_regex ($url)
|
| 116 |
{
|
| 117 |
$regex = '()[]$^?+.';
|
| 118 |
$escape = false;
|
| 119 |
+
|
| 120 |
for ($x = 0; $x < strlen ($url); $x++)
|
| 121 |
{
|
| 122 |
if ($url{$x} == '\\')
|
| 126 |
else
|
| 127 |
$escape = false;
|
| 128 |
}
|
| 129 |
+
|
| 130 |
return false;
|
| 131 |
}
|
| 132 |
+
|
| 133 |
function is_regex ($url)
|
| 134 |
{
|
| 135 |
if ($this->is_str_regex ($url))
|
| 136 |
{
|
| 137 |
$tmp = ltrim ($url, '^');
|
| 138 |
$tmp = rtrim ($tmp, '$');
|
| 139 |
+
|
| 140 |
if ($this->is_str_regex ($tmp))
|
| 141 |
return true;
|
| 142 |
}
|
| 143 |
+
|
| 144 |
return false;
|
| 145 |
}
|
| 146 |
+
|
| 147 |
function regex_url ($url)
|
| 148 |
{
|
| 149 |
if ($this->is_str_regex ($url))
|
| 150 |
{
|
| 151 |
$tmp = ltrim ($url, '^');
|
| 152 |
$tmp = rtrim ($tmp, '$');
|
| 153 |
+
|
| 154 |
if ($this->is_str_regex ($tmp) == false)
|
| 155 |
return '/'.$this->decode_url ($tmp);
|
| 156 |
+
|
| 157 |
return '/'.$this->decode_url ($url);
|
| 158 |
}
|
| 159 |
+
|
| 160 |
return $this->decode_url ($url);
|
| 161 |
}
|
| 162 |
+
|
| 163 |
function get_code ($code)
|
| 164 |
{
|
| 165 |
if (strpos ($code, '301') !== false || stripos ($code, 'permanent') !== false)
|
| 175 |
return 0;
|
| 176 |
}
|
| 177 |
}
|
| 178 |
+
?>
|
fileio/csv.php
CHANGED
|
@@ -7,7 +7,7 @@ class Red_Csv_File extends Red_FileIO
|
|
| 7 |
$pager = new RE_Pager ($_GET, $_SERVER['REQUEST_URI'], 'name', 'DESC', 'log');
|
| 8 |
$pager->per_page = 0;
|
| 9 |
$this->id = $module->id;
|
| 10 |
-
|
| 11 |
$items = Red_Item::get_by_module ($pager, $module->id);
|
| 12 |
if (count ($items) > 0)
|
| 13 |
{
|
|
@@ -15,11 +15,11 @@ class Red_Csv_File extends Red_FileIO
|
|
| 15 |
$this->items[] = array ('source' => $item->url, 'target' => ($item->action_type == 'url' ? $item->action_data : ''), 'last_count' => $item->last_count);
|
| 16 |
}
|
| 17 |
}
|
| 18 |
-
|
| 19 |
function feed ($filename = '', $heading = '')
|
| 20 |
{
|
| 21 |
$filename = sprintf (__ ('module_%d.csv', 'redirection'), $this->id);
|
| 22 |
-
|
| 23 |
header ("Content-Type: text/csv");
|
| 24 |
header ("Cache-Control: no-cache, must-revalidate");
|
| 25 |
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
|
@@ -28,12 +28,12 @@ class Red_Csv_File extends Red_FileIO
|
|
| 28 |
if (count ($this->items) > 0)
|
| 29 |
{
|
| 30 |
echo "source,target,hits\r\n";
|
| 31 |
-
|
| 32 |
foreach ($this->items AS $line)
|
| 33 |
echo implode (",", array_map (array (&$this, 'escape'), $line))."\r\n";
|
| 34 |
}
|
| 35 |
}
|
| 36 |
-
|
| 37 |
function escape ($value)
|
| 38 |
{
|
| 39 |
// Escape any special values
|
|
@@ -51,8 +51,8 @@ class Red_Csv_File extends Red_FileIO
|
|
| 51 |
$value = '"'.$value.'"';
|
| 52 |
return $value;
|
| 53 |
}
|
| 54 |
-
|
| 55 |
-
function parse_csv ($string, $separator = ',')
|
| 56 |
{
|
| 57 |
$string = str_replace('""', "'", $string);
|
| 58 |
$bits = explode ('"',$string);
|
|
@@ -62,23 +62,23 @@ class Red_Csv_File extends Red_FileIO
|
|
| 62 |
{
|
| 63 |
if (($i % 2) == 1)
|
| 64 |
$elements[] = $bits[$i];
|
| 65 |
-
else
|
| 66 |
{
|
| 67 |
$rest = $bits[$i];
|
| 68 |
$rest = preg_replace ('/^'.$separator.'/', '', $rest);
|
| 69 |
$rest = preg_replace ('/'.$separator.'$/', '', $rest);
|
| 70 |
-
|
| 71 |
$elements = array_merge ($elements, explode ($separator, $rest));
|
| 72 |
}
|
| 73 |
}
|
| 74 |
|
| 75 |
return $elements;
|
| 76 |
}
|
| 77 |
-
|
| 78 |
function load( $group, $data, $filename ) {
|
| 79 |
$count = 0;
|
| 80 |
$file = fopen( $filename, 'r' );
|
| 81 |
-
|
| 82 |
if ( $file ) {
|
| 83 |
while ( ( $csv = fgetcsv( $file, 1000, ',' ) ) ) {
|
| 84 |
if ( $csv[0] != 'source' && $csv[1] != 'target') {
|
|
@@ -90,7 +90,7 @@ class Red_Csv_File extends Red_FileIO
|
|
| 90 |
'match' => 'url',
|
| 91 |
'red_action' => 'url'
|
| 92 |
) );
|
| 93 |
-
|
| 94 |
$count++;
|
| 95 |
}
|
| 96 |
}
|
|
@@ -98,12 +98,12 @@ class Red_Csv_File extends Red_FileIO
|
|
| 98 |
|
| 99 |
return $count;
|
| 100 |
}
|
| 101 |
-
|
| 102 |
function is_regex ($url)
|
| 103 |
{
|
| 104 |
$regex = '()[]$^?+';
|
| 105 |
$escape = false;
|
| 106 |
-
|
| 107 |
for ($x = 0; $x < strlen ($url); $x++)
|
| 108 |
{
|
| 109 |
if ($url{$x} == '\\')
|
|
@@ -113,8 +113,8 @@ class Red_Csv_File extends Red_FileIO
|
|
| 113 |
else
|
| 114 |
$escape = false;
|
| 115 |
}
|
| 116 |
-
|
| 117 |
return false;
|
| 118 |
}
|
| 119 |
}
|
| 120 |
-
?>
|
| 7 |
$pager = new RE_Pager ($_GET, $_SERVER['REQUEST_URI'], 'name', 'DESC', 'log');
|
| 8 |
$pager->per_page = 0;
|
| 9 |
$this->id = $module->id;
|
| 10 |
+
|
| 11 |
$items = Red_Item::get_by_module ($pager, $module->id);
|
| 12 |
if (count ($items) > 0)
|
| 13 |
{
|
| 15 |
$this->items[] = array ('source' => $item->url, 'target' => ($item->action_type == 'url' ? $item->action_data : ''), 'last_count' => $item->last_count);
|
| 16 |
}
|
| 17 |
}
|
| 18 |
+
|
| 19 |
function feed ($filename = '', $heading = '')
|
| 20 |
{
|
| 21 |
$filename = sprintf (__ ('module_%d.csv', 'redirection'), $this->id);
|
| 22 |
+
|
| 23 |
header ("Content-Type: text/csv");
|
| 24 |
header ("Cache-Control: no-cache, must-revalidate");
|
| 25 |
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
| 28 |
if (count ($this->items) > 0)
|
| 29 |
{
|
| 30 |
echo "source,target,hits\r\n";
|
| 31 |
+
|
| 32 |
foreach ($this->items AS $line)
|
| 33 |
echo implode (",", array_map (array (&$this, 'escape'), $line))."\r\n";
|
| 34 |
}
|
| 35 |
}
|
| 36 |
+
|
| 37 |
function escape ($value)
|
| 38 |
{
|
| 39 |
// Escape any special values
|
| 51 |
$value = '"'.$value.'"';
|
| 52 |
return $value;
|
| 53 |
}
|
| 54 |
+
|
| 55 |
+
function parse_csv ($string, $separator = ',')
|
| 56 |
{
|
| 57 |
$string = str_replace('""', "'", $string);
|
| 58 |
$bits = explode ('"',$string);
|
| 62 |
{
|
| 63 |
if (($i % 2) == 1)
|
| 64 |
$elements[] = $bits[$i];
|
| 65 |
+
else
|
| 66 |
{
|
| 67 |
$rest = $bits[$i];
|
| 68 |
$rest = preg_replace ('/^'.$separator.'/', '', $rest);
|
| 69 |
$rest = preg_replace ('/'.$separator.'$/', '', $rest);
|
| 70 |
+
|
| 71 |
$elements = array_merge ($elements, explode ($separator, $rest));
|
| 72 |
}
|
| 73 |
}
|
| 74 |
|
| 75 |
return $elements;
|
| 76 |
}
|
| 77 |
+
|
| 78 |
function load( $group, $data, $filename ) {
|
| 79 |
$count = 0;
|
| 80 |
$file = fopen( $filename, 'r' );
|
| 81 |
+
|
| 82 |
if ( $file ) {
|
| 83 |
while ( ( $csv = fgetcsv( $file, 1000, ',' ) ) ) {
|
| 84 |
if ( $csv[0] != 'source' && $csv[1] != 'target') {
|
| 90 |
'match' => 'url',
|
| 91 |
'red_action' => 'url'
|
| 92 |
) );
|
| 93 |
+
|
| 94 |
$count++;
|
| 95 |
}
|
| 96 |
}
|
| 98 |
|
| 99 |
return $count;
|
| 100 |
}
|
| 101 |
+
|
| 102 |
function is_regex ($url)
|
| 103 |
{
|
| 104 |
$regex = '()[]$^?+';
|
| 105 |
$escape = false;
|
| 106 |
+
|
| 107 |
for ($x = 0; $x < strlen ($url); $x++)
|
| 108 |
{
|
| 109 |
if ($url{$x} == '\\')
|
| 113 |
else
|
| 114 |
$escape = false;
|
| 115 |
}
|
| 116 |
+
|
| 117 |
return false;
|
| 118 |
}
|
| 119 |
}
|
| 120 |
+
?>
|
fileio/rss.php
CHANGED
|
@@ -3,16 +3,16 @@
|
|
| 3 |
class Red_Rss_File extends Red_FileIO
|
| 4 |
{
|
| 5 |
var $title;
|
| 6 |
-
|
| 7 |
function collect ($module)
|
| 8 |
{
|
| 9 |
$pager = new RE_Pager ($_GET, $_SERVER['REQUEST_URI'], 'created', 'DESC', 'log');
|
| 10 |
$pager->per_page = 100;
|
| 11 |
-
|
| 12 |
$this->name = $module->name;
|
| 13 |
$this->items = RE_Log::get_by_module ($pager, $module->id);
|
| 14 |
}
|
| 15 |
-
|
| 16 |
function feed ()
|
| 17 |
{
|
| 18 |
$title = sprintf ('%s log', $this->name);
|
|
@@ -20,7 +20,7 @@ class Red_Rss_File extends Red_FileIO
|
|
| 20 |
header ('Content-type: text/xml; charset='.get_option ('blog_charset'), true);
|
| 21 |
echo '<?xml version="1.0" encoding="'.get_option ('blog_charset').'"?'.">\r\n";
|
| 22 |
?>
|
| 23 |
-
<rss version="2.0"
|
| 24 |
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
| 25 |
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
|
| 26 |
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
|
@@ -50,5 +50,5 @@ class Red_Rss_File extends Red_FileIO
|
|
| 50 |
die();
|
| 51 |
}
|
| 52 |
}
|
| 53 |
-
|
| 54 |
-
?>
|
| 3 |
class Red_Rss_File extends Red_FileIO
|
| 4 |
{
|
| 5 |
var $title;
|
| 6 |
+
|
| 7 |
function collect ($module)
|
| 8 |
{
|
| 9 |
$pager = new RE_Pager ($_GET, $_SERVER['REQUEST_URI'], 'created', 'DESC', 'log');
|
| 10 |
$pager->per_page = 100;
|
| 11 |
+
|
| 12 |
$this->name = $module->name;
|
| 13 |
$this->items = RE_Log::get_by_module ($pager, $module->id);
|
| 14 |
}
|
| 15 |
+
|
| 16 |
function feed ()
|
| 17 |
{
|
| 18 |
$title = sprintf ('%s log', $this->name);
|
| 20 |
header ('Content-type: text/xml; charset='.get_option ('blog_charset'), true);
|
| 21 |
echo '<?xml version="1.0" encoding="'.get_option ('blog_charset').'"?'.">\r\n";
|
| 22 |
?>
|
| 23 |
+
<rss version="2.0"
|
| 24 |
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
| 25 |
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
|
| 26 |
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
| 50 |
die();
|
| 51 |
}
|
| 52 |
}
|
| 53 |
+
|
| 54 |
+
?>
|
fileio/xml.php
CHANGED
|
@@ -8,7 +8,7 @@ class Red_Xml_File extends Red_FileIO
|
|
| 8 |
$this->id = $module->id;
|
| 9 |
$this->type = $module->type;
|
| 10 |
$this->options = unserialize ($module->options);
|
| 11 |
-
|
| 12 |
if (!is_array ($this->options))
|
| 13 |
$this->options = array ();
|
| 14 |
|
|
@@ -23,7 +23,7 @@ class Red_Xml_File extends Red_FileIO
|
|
| 23 |
}
|
| 24 |
else
|
| 25 |
$this->groups = array ();
|
| 26 |
-
|
| 27 |
return true;
|
| 28 |
}
|
| 29 |
|
|
@@ -58,10 +58,10 @@ class Red_Xml_File extends Red_FileIO
|
|
| 58 |
<?php endforeach; ?>
|
| 59 |
<?php endif; ?>
|
| 60 |
</module>
|
| 61 |
-
</redirection>
|
| 62 |
<?php
|
| 63 |
}
|
| 64 |
-
|
| 65 |
function output_item ($item)
|
| 66 |
{
|
| 67 |
$data = unserialize ($item->action_data);
|
|
@@ -95,7 +95,7 @@ class Red_Xml_File extends Red_FileIO
|
|
| 95 |
if (function_exists ('simplexml_load_string'))
|
| 96 |
{
|
| 97 |
global $wpdb;
|
| 98 |
-
|
| 99 |
$xml = simplexml_load_string ($data);
|
| 100 |
|
| 101 |
// Extract module
|
|
@@ -104,24 +104,24 @@ class Red_Xml_File extends Red_FileIO
|
|
| 104 |
'type' => (string)$xml->module['type'],
|
| 105 |
'name' => sprintf (__ ('%s imported on %s at %s', 'redirection'), (string)$xml->module['name'], date ('M d Y'), date ('H:i'))
|
| 106 |
);
|
| 107 |
-
|
| 108 |
if (isset ($xml->module->options))
|
| 109 |
{
|
| 110 |
foreach ($xml->module->options->option AS $option)
|
| 111 |
$options[(string)$option['name']] = trim ((string)$option);
|
| 112 |
-
|
| 113 |
$moduledata['options'] = $options;
|
| 114 |
}
|
| 115 |
|
| 116 |
$module = Red_Module::create ($moduledata);
|
| 117 |
-
|
| 118 |
// Look at groups
|
| 119 |
if (count ($xml->module->group) > 0)
|
| 120 |
{
|
| 121 |
foreach ($xml->module->group AS $group)
|
| 122 |
{
|
| 123 |
$id = Red_Group::create (array ('module_id' => $module, 'name' => (string)$group['name'], 'status' => (string)$group['status'], 'position' => (string)$group['position']));
|
| 124 |
-
|
| 125 |
// Look at items
|
| 126 |
if (count ($group->item) > 0)
|
| 127 |
{
|
|
@@ -132,12 +132,12 @@ class Red_Xml_File extends Red_FileIO
|
|
| 132 |
{
|
| 133 |
foreach ($item->action->option AS $option)
|
| 134 |
$actiondata[(string)$option['key']] = trim ((string)$option);
|
| 135 |
-
|
| 136 |
$actiondata = serialize ($actiondata);
|
| 137 |
}
|
| 138 |
else
|
| 139 |
$actiondata = trim ((string)$item->action);
|
| 140 |
-
|
| 141 |
$data = array
|
| 142 |
(
|
| 143 |
'group_id' => $id,
|
|
@@ -150,10 +150,10 @@ class Red_Xml_File extends Red_FileIO
|
|
| 150 |
'action_code' => (string)$item->action['code'],
|
| 151 |
'action_data' => $actiondata
|
| 152 |
);
|
| 153 |
-
|
| 154 |
foreach ($data AS $key => $value)
|
| 155 |
$data[$key] = "'".$wpdb->escape ($value)."'";
|
| 156 |
-
|
| 157 |
// Easier to insert it directly here
|
| 158 |
$wpdb->query ("INSERT INTO {$wpdb->prefix}redirection_items (".implode (',', array_keys ($data)).") VALUES (".implode (',', $data).")");
|
| 159 |
$count++;
|
|
@@ -171,4 +171,4 @@ class Red_Xml_File extends Red_FileIO
|
|
| 171 |
return $count;
|
| 172 |
}
|
| 173 |
}
|
| 174 |
-
?>
|
| 8 |
$this->id = $module->id;
|
| 9 |
$this->type = $module->type;
|
| 10 |
$this->options = unserialize ($module->options);
|
| 11 |
+
|
| 12 |
if (!is_array ($this->options))
|
| 13 |
$this->options = array ();
|
| 14 |
|
| 23 |
}
|
| 24 |
else
|
| 25 |
$this->groups = array ();
|
| 26 |
+
|
| 27 |
return true;
|
| 28 |
}
|
| 29 |
|
| 58 |
<?php endforeach; ?>
|
| 59 |
<?php endif; ?>
|
| 60 |
</module>
|
| 61 |
+
</redirection>
|
| 62 |
<?php
|
| 63 |
}
|
| 64 |
+
|
| 65 |
function output_item ($item)
|
| 66 |
{
|
| 67 |
$data = unserialize ($item->action_data);
|
| 95 |
if (function_exists ('simplexml_load_string'))
|
| 96 |
{
|
| 97 |
global $wpdb;
|
| 98 |
+
|
| 99 |
$xml = simplexml_load_string ($data);
|
| 100 |
|
| 101 |
// Extract module
|
| 104 |
'type' => (string)$xml->module['type'],
|
| 105 |
'name' => sprintf (__ ('%s imported on %s at %s', 'redirection'), (string)$xml->module['name'], date ('M d Y'), date ('H:i'))
|
| 106 |
);
|
| 107 |
+
|
| 108 |
if (isset ($xml->module->options))
|
| 109 |
{
|
| 110 |
foreach ($xml->module->options->option AS $option)
|
| 111 |
$options[(string)$option['name']] = trim ((string)$option);
|
| 112 |
+
|
| 113 |
$moduledata['options'] = $options;
|
| 114 |
}
|
| 115 |
|
| 116 |
$module = Red_Module::create ($moduledata);
|
| 117 |
+
|
| 118 |
// Look at groups
|
| 119 |
if (count ($xml->module->group) > 0)
|
| 120 |
{
|
| 121 |
foreach ($xml->module->group AS $group)
|
| 122 |
{
|
| 123 |
$id = Red_Group::create (array ('module_id' => $module, 'name' => (string)$group['name'], 'status' => (string)$group['status'], 'position' => (string)$group['position']));
|
| 124 |
+
|
| 125 |
// Look at items
|
| 126 |
if (count ($group->item) > 0)
|
| 127 |
{
|
| 132 |
{
|
| 133 |
foreach ($item->action->option AS $option)
|
| 134 |
$actiondata[(string)$option['key']] = trim ((string)$option);
|
| 135 |
+
|
| 136 |
$actiondata = serialize ($actiondata);
|
| 137 |
}
|
| 138 |
else
|
| 139 |
$actiondata = trim ((string)$item->action);
|
| 140 |
+
|
| 141 |
$data = array
|
| 142 |
(
|
| 143 |
'group_id' => $id,
|
| 150 |
'action_code' => (string)$item->action['code'],
|
| 151 |
'action_data' => $actiondata
|
| 152 |
);
|
| 153 |
+
|
| 154 |
foreach ($data AS $key => $value)
|
| 155 |
$data[$key] = "'".$wpdb->escape ($value)."'";
|
| 156 |
+
|
| 157 |
// Easier to insert it directly here
|
| 158 |
$wpdb->query ("INSERT INTO {$wpdb->prefix}redirection_items (".implode (',', array_keys ($data)).") VALUES (".implode (',', $data).")");
|
| 159 |
$count++;
|
| 171 |
return $count;
|
| 172 |
}
|
| 173 |
}
|
| 174 |
+
?>
|
js/redirection.js
CHANGED
|
@@ -35,7 +35,7 @@ var Redirection;
|
|
| 35 |
function sort_order_save( type ) {
|
| 36 |
if ( confirm( opts.are_you_sure ) ) {
|
| 37 |
$( '#loading' ).show();
|
| 38 |
-
|
| 39 |
$.post( opts.ajaxurl, {
|
| 40 |
action: 'red_' + type + '_saveorder',
|
| 41 |
page: opts.page,
|
|
@@ -53,7 +53,7 @@ var Redirection;
|
|
| 53 |
|
| 54 |
return false;
|
| 55 |
}
|
| 56 |
-
|
| 57 |
function sort_order() {
|
| 58 |
$( '#items' ).sortable();
|
| 59 |
$( '#toggle_sort_on' ).hide();
|
|
@@ -84,7 +84,7 @@ var Redirection;
|
|
| 84 |
|
| 85 |
return false;
|
| 86 |
}
|
| 87 |
-
|
| 88 |
function select_all() {
|
| 89 |
$( '.item :checkbox' ).each(function () {
|
| 90 |
this.checked = (this.checked ? '' : 'checked');
|
|
@@ -99,14 +99,14 @@ var Redirection;
|
|
| 99 |
if ( checked.length > 0 ) {
|
| 100 |
if ( confirm( opts.are_you_sure ) ) {
|
| 101 |
var urltype = 'red_redirect_delete';
|
| 102 |
-
|
| 103 |
if ( type == 'group' )
|
| 104 |
urltype = 'red_group_delete';
|
| 105 |
else if ( type == 'log' )
|
| 106 |
urltype = 'red_log_delete';
|
| 107 |
|
| 108 |
$( '#loading' ).show();
|
| 109 |
-
|
| 110 |
$.post( opts.ajaxurl, {
|
| 111 |
checked: checked.serialize(),
|
| 112 |
action: urltype,
|
|
@@ -125,11 +125,11 @@ var Redirection;
|
|
| 125 |
|
| 126 |
return false;
|
| 127 |
}
|
| 128 |
-
|
| 129 |
function form_loader( element, type, reset_func ) {
|
| 130 |
var item = $( element ).parents( type )
|
| 131 |
var href = element.href;
|
| 132 |
-
|
| 133 |
if ( href.indexOf( 'admin-ajax.php' ) == -1 )
|
| 134 |
href = opts.ajaxurl + '?action=red_redirect_edit&id=' + item.attr( 'id' ).substr( 5 ) + '&_ajax_nonce=' + opts.nonce;
|
| 135 |
|
|
@@ -139,34 +139,34 @@ var Redirection;
|
|
| 139 |
// Setup cancel handler
|
| 140 |
$( item ).find( 'input[name=cancel]').click( function() {
|
| 141 |
$( item ).find( '.loader' ).show();
|
| 142 |
-
|
| 143 |
$( item ).load( href.replace( '_edit', '_load' ), function () {
|
| 144 |
reset_func( type );
|
| 145 |
});
|
| 146 |
-
|
| 147 |
return false;
|
| 148 |
});
|
| 149 |
-
|
| 150 |
var changestatus = null;
|
| 151 |
-
|
| 152 |
// Form handler
|
| 153 |
$( item ).find( 'form' ).ajaxForm( {
|
| 154 |
beforeSubmit: function( data, form ) {
|
| 155 |
$( item ).find( '.loader' ).show();
|
| 156 |
-
|
| 157 |
if ( form.find( 'input[name=status]' ).length > 0 )
|
| 158 |
changestatus = form.find( 'input[name=status]' ).attr( 'checked' );
|
| 159 |
},
|
| 160 |
success: function( response ) {
|
| 161 |
$( item ).html( response );
|
| 162 |
-
|
| 163 |
if ( changestatus !== null ) {
|
| 164 |
if ( changestatus === true )
|
| 165 |
$( item ).removeClass( 'disabled' );
|
| 166 |
else
|
| 167 |
$( item ).addClass( 'disabled' );
|
| 168 |
}
|
| 169 |
-
|
| 170 |
reset_func( type );
|
| 171 |
}
|
| 172 |
});
|
|
@@ -174,7 +174,7 @@ var Redirection;
|
|
| 174 |
|
| 175 |
return false;
|
| 176 |
}
|
| 177 |
-
|
| 178 |
function modules() {
|
| 179 |
// Edit module
|
| 180 |
$( 'a.edit' ).unbind( 'click' ).click( function() {
|
|
@@ -208,16 +208,16 @@ var Redirection;
|
|
| 208 |
return false;
|
| 209 |
});
|
| 210 |
}
|
| 211 |
-
|
| 212 |
function edit_items( type ) {
|
| 213 |
$( 'a.redirection-edit' ).unbind( 'click' ).click(function() { return form_loader( this, 'li', edit_items ) } );
|
| 214 |
-
|
| 215 |
$( 'a.select-all' ).unbind( 'click' ).click(function() { return select_all(); } );
|
| 216 |
$( 'a.toggle-all' ).unbind( 'click' ).click(function() { return do_items( type, 'toggle' ); });
|
| 217 |
$( 'a.reset-all' ).unbind( 'click' ).click(function() { return do_items( type, 'reset' ); });
|
| 218 |
$( 'a.delete-all' ).unbind( 'click' ).click(function() { return delete_all( type ); });
|
| 219 |
$( 'input.move-all' ).unbind( 'click' ).click(function() { return move_all( type ); });
|
| 220 |
-
|
| 221 |
$( 'a.sort-on' ).unbind( 'click' ).click(function() { return sort_order(); });
|
| 222 |
$( 'a.sort-save' ).unbind( 'click' ).click(function() { return sort_order_save( type ); });
|
| 223 |
}
|
|
@@ -226,10 +226,10 @@ var Redirection;
|
|
| 226 |
$( '.show-log' ).unbind( 'click' ).click( function() {
|
| 227 |
var item = $( this ).parents( 'tr' )
|
| 228 |
var href = this.href;
|
| 229 |
-
|
| 230 |
// Set loading icon
|
| 231 |
$( item ).find( '.info' ).html( opts.progress );
|
| 232 |
-
|
| 233 |
// Load info
|
| 234 |
$( item ).find( '.info' ).load( this.href, function() {
|
| 235 |
// Setup cancel handler
|
|
@@ -237,11 +237,11 @@ var Redirection;
|
|
| 237 |
$( item ).find( '.info' ).load( href.replace( 'red_log_show', 'red_log_hide' ), function () {
|
| 238 |
logs();
|
| 239 |
});
|
| 240 |
-
|
| 241 |
return false;
|
| 242 |
});
|
| 243 |
} );
|
| 244 |
-
|
| 245 |
return false;
|
| 246 |
});
|
| 247 |
|
|
@@ -270,7 +270,7 @@ var Redirection;
|
|
| 270 |
});
|
| 271 |
});
|
| 272 |
}
|
| 273 |
-
|
| 274 |
var api = {
|
| 275 |
logs: logs,
|
| 276 |
edit_items: edit_items,
|
|
@@ -279,11 +279,11 @@ var Redirection;
|
|
| 279 |
|
| 280 |
return api;
|
| 281 |
}
|
| 282 |
-
|
| 283 |
$( document ).ready( function() {
|
| 284 |
$( '#support-annoy' ).animate( { opacity: 0.2, backgroundColor: 'red' } ).animate( { opacity: 1, backgroundColor: 'yellow' } );
|
| 285 |
} );
|
| 286 |
-
|
| 287 |
})(jQuery);
|
| 288 |
|
| 289 |
function update_user_agent (item,box)
|
| 35 |
function sort_order_save( type ) {
|
| 36 |
if ( confirm( opts.are_you_sure ) ) {
|
| 37 |
$( '#loading' ).show();
|
| 38 |
+
|
| 39 |
$.post( opts.ajaxurl, {
|
| 40 |
action: 'red_' + type + '_saveorder',
|
| 41 |
page: opts.page,
|
| 53 |
|
| 54 |
return false;
|
| 55 |
}
|
| 56 |
+
|
| 57 |
function sort_order() {
|
| 58 |
$( '#items' ).sortable();
|
| 59 |
$( '#toggle_sort_on' ).hide();
|
| 84 |
|
| 85 |
return false;
|
| 86 |
}
|
| 87 |
+
|
| 88 |
function select_all() {
|
| 89 |
$( '.item :checkbox' ).each(function () {
|
| 90 |
this.checked = (this.checked ? '' : 'checked');
|
| 99 |
if ( checked.length > 0 ) {
|
| 100 |
if ( confirm( opts.are_you_sure ) ) {
|
| 101 |
var urltype = 'red_redirect_delete';
|
| 102 |
+
|
| 103 |
if ( type == 'group' )
|
| 104 |
urltype = 'red_group_delete';
|
| 105 |
else if ( type == 'log' )
|
| 106 |
urltype = 'red_log_delete';
|
| 107 |
|
| 108 |
$( '#loading' ).show();
|
| 109 |
+
|
| 110 |
$.post( opts.ajaxurl, {
|
| 111 |
checked: checked.serialize(),
|
| 112 |
action: urltype,
|
| 125 |
|
| 126 |
return false;
|
| 127 |
}
|
| 128 |
+
|
| 129 |
function form_loader( element, type, reset_func ) {
|
| 130 |
var item = $( element ).parents( type )
|
| 131 |
var href = element.href;
|
| 132 |
+
|
| 133 |
if ( href.indexOf( 'admin-ajax.php' ) == -1 )
|
| 134 |
href = opts.ajaxurl + '?action=red_redirect_edit&id=' + item.attr( 'id' ).substr( 5 ) + '&_ajax_nonce=' + opts.nonce;
|
| 135 |
|
| 139 |
// Setup cancel handler
|
| 140 |
$( item ).find( 'input[name=cancel]').click( function() {
|
| 141 |
$( item ).find( '.loader' ).show();
|
| 142 |
+
|
| 143 |
$( item ).load( href.replace( '_edit', '_load' ), function () {
|
| 144 |
reset_func( type );
|
| 145 |
});
|
| 146 |
+
|
| 147 |
return false;
|
| 148 |
});
|
| 149 |
+
|
| 150 |
var changestatus = null;
|
| 151 |
+
|
| 152 |
// Form handler
|
| 153 |
$( item ).find( 'form' ).ajaxForm( {
|
| 154 |
beforeSubmit: function( data, form ) {
|
| 155 |
$( item ).find( '.loader' ).show();
|
| 156 |
+
|
| 157 |
if ( form.find( 'input[name=status]' ).length > 0 )
|
| 158 |
changestatus = form.find( 'input[name=status]' ).attr( 'checked' );
|
| 159 |
},
|
| 160 |
success: function( response ) {
|
| 161 |
$( item ).html( response );
|
| 162 |
+
|
| 163 |
if ( changestatus !== null ) {
|
| 164 |
if ( changestatus === true )
|
| 165 |
$( item ).removeClass( 'disabled' );
|
| 166 |
else
|
| 167 |
$( item ).addClass( 'disabled' );
|
| 168 |
}
|
| 169 |
+
|
| 170 |
reset_func( type );
|
| 171 |
}
|
| 172 |
});
|
| 174 |
|
| 175 |
return false;
|
| 176 |
}
|
| 177 |
+
|
| 178 |
function modules() {
|
| 179 |
// Edit module
|
| 180 |
$( 'a.edit' ).unbind( 'click' ).click( function() {
|
| 208 |
return false;
|
| 209 |
});
|
| 210 |
}
|
| 211 |
+
|
| 212 |
function edit_items( type ) {
|
| 213 |
$( 'a.redirection-edit' ).unbind( 'click' ).click(function() { return form_loader( this, 'li', edit_items ) } );
|
| 214 |
+
|
| 215 |
$( 'a.select-all' ).unbind( 'click' ).click(function() { return select_all(); } );
|
| 216 |
$( 'a.toggle-all' ).unbind( 'click' ).click(function() { return do_items( type, 'toggle' ); });
|
| 217 |
$( 'a.reset-all' ).unbind( 'click' ).click(function() { return do_items( type, 'reset' ); });
|
| 218 |
$( 'a.delete-all' ).unbind( 'click' ).click(function() { return delete_all( type ); });
|
| 219 |
$( 'input.move-all' ).unbind( 'click' ).click(function() { return move_all( type ); });
|
| 220 |
+
|
| 221 |
$( 'a.sort-on' ).unbind( 'click' ).click(function() { return sort_order(); });
|
| 222 |
$( 'a.sort-save' ).unbind( 'click' ).click(function() { return sort_order_save( type ); });
|
| 223 |
}
|
| 226 |
$( '.show-log' ).unbind( 'click' ).click( function() {
|
| 227 |
var item = $( this ).parents( 'tr' )
|
| 228 |
var href = this.href;
|
| 229 |
+
|
| 230 |
// Set loading icon
|
| 231 |
$( item ).find( '.info' ).html( opts.progress );
|
| 232 |
+
|
| 233 |
// Load info
|
| 234 |
$( item ).find( '.info' ).load( this.href, function() {
|
| 235 |
// Setup cancel handler
|
| 237 |
$( item ).find( '.info' ).load( href.replace( 'red_log_show', 'red_log_hide' ), function () {
|
| 238 |
logs();
|
| 239 |
});
|
| 240 |
+
|
| 241 |
return false;
|
| 242 |
});
|
| 243 |
} );
|
| 244 |
+
|
| 245 |
return false;
|
| 246 |
});
|
| 247 |
|
| 270 |
});
|
| 271 |
});
|
| 272 |
}
|
| 273 |
+
|
| 274 |
var api = {
|
| 275 |
logs: logs,
|
| 276 |
edit_items: edit_items,
|
| 279 |
|
| 280 |
return api;
|
| 281 |
}
|
| 282 |
+
|
| 283 |
$( document ).ready( function() {
|
| 284 |
$( '#support-annoy' ).animate( { opacity: 0.2, backgroundColor: 'red' } ).animate( { opacity: 1, backgroundColor: 'yellow' } );
|
| 285 |
} );
|
| 286 |
+
|
| 287 |
})(jQuery);
|
| 288 |
|
| 289 |
function update_user_agent (item,box)
|
locale/be_BY.mo
ADDED
|
Binary file
|
locale/be_BY.po
ADDED
|
@@ -0,0 +1,988 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SOME DESCRIPTIVE TITLE.
|
| 2 |
+
# Copyright (C) 2009 Grib <grib69@gmail.com>
|
| 3 |
+
# This file is distributed under the same license as the PACKAGE package.
|
| 4 |
+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
| 5 |
+
#
|
| 6 |
+
msgid ""
|
| 7 |
+
msgstr ""
|
| 8 |
+
"Project-Id-Version: Redirection 2.1.20\n"
|
| 9 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/redirection\n"
|
| 10 |
+
"POT-Creation-Date: 2011-07-17 10:14:58+00:00\n"
|
| 11 |
+
"PO-Revision-Date: 2011-11-04 09:20+0200\n"
|
| 12 |
+
"Language-Team: Web Geeks\n"
|
| 13 |
+
"Last-Translator: \n"
|
| 14 |
+
"MIME-Version: 1.0\n"
|
| 15 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
| 16 |
+
"Content-Transfer-Encoding: 8bit\n"
|
| 17 |
+
"Plural-Forms: nplurals=3; plural=n%100/10==1 ? 2 : n%10==1 ? 0 : (n+9)%10>3 ? 2 : 1;\n"
|
| 18 |
+
"X-Poedit-Language: Belarusian\n"
|
| 19 |
+
"X-Poedit-Country: BELARUS\n"
|
| 20 |
+
|
| 21 |
+
#: fileio/csv.php:21
|
| 22 |
+
msgid "module_%d.csv"
|
| 23 |
+
msgstr "module_%d.csv"
|
| 24 |
+
|
| 25 |
+
#: fileio/xml.php:32
|
| 26 |
+
msgid "module_%d.xml"
|
| 27 |
+
msgstr "module_%d.xml"
|
| 28 |
+
|
| 29 |
+
#: fileio/xml.php:105
|
| 30 |
+
msgid "%s imported on %s at %s"
|
| 31 |
+
msgstr "%s імпартавана %s у %s"
|
| 32 |
+
|
| 33 |
+
#: fileio/xml.php:168
|
| 34 |
+
msgid "XML importing is only available with PHP5 - you have PHP4."
|
| 35 |
+
msgstr "Імпарт XML даступны толькі з PHP5, у вас усталяваны PHP4"
|
| 36 |
+
|
| 37 |
+
#: view/admin/group_list.php:6
|
| 38 |
+
msgid "Groups for module"
|
| 39 |
+
msgstr "Групы для модуля"
|
| 40 |
+
|
| 41 |
+
#: view/admin/group_list.php:16
|
| 42 |
+
#: view/admin/log.php:38
|
| 43 |
+
msgid "Module"
|
| 44 |
+
msgstr "Модуль"
|
| 45 |
+
|
| 46 |
+
#: view/admin/group_list.php:21
|
| 47 |
+
#: view/admin/log.php:16
|
| 48 |
+
#: view/admin/log.php:23
|
| 49 |
+
#: view/admin/item_list.php:29
|
| 50 |
+
msgid "Search"
|
| 51 |
+
msgstr "Пошук"
|
| 52 |
+
|
| 53 |
+
#: view/admin/group_list.php:26
|
| 54 |
+
msgid "go"
|
| 55 |
+
msgstr "наперад"
|
| 56 |
+
|
| 57 |
+
#: view/admin/group_list.php:36
|
| 58 |
+
#: view/admin/item_list.php:42
|
| 59 |
+
#: view/admin/module_list.php:17
|
| 60 |
+
msgid "Hits"
|
| 61 |
+
msgstr "Лічыльнік"
|
| 62 |
+
|
| 63 |
+
#: view/admin/group_list.php:37
|
| 64 |
+
#: view/admin/group_list.php:100
|
| 65 |
+
#: view/admin/module_edit.php:18
|
| 66 |
+
#: view/admin/module_list.php:42
|
| 67 |
+
#: view/admin/group_edit.php:6
|
| 68 |
+
msgid "Name"
|
| 69 |
+
msgstr "Назва"
|
| 70 |
+
|
| 71 |
+
#: view/admin/group_list.php:59
|
| 72 |
+
#: view/admin/item_list.php:67
|
| 73 |
+
msgid "Select All"
|
| 74 |
+
msgstr "Абраць усё"
|
| 75 |
+
|
| 76 |
+
#: view/admin/group_list.php:60
|
| 77 |
+
#: view/admin/item_list.php:68
|
| 78 |
+
msgid "Toggle"
|
| 79 |
+
msgstr "Вкл/Выкл"
|
| 80 |
+
|
| 81 |
+
#: view/admin/group_list.php:61
|
| 82 |
+
#: view/admin/item_list.php:69
|
| 83 |
+
msgid "Reset Hits"
|
| 84 |
+
msgstr "Абнуліць лічыльнік"
|
| 85 |
+
|
| 86 |
+
#: view/admin/group_list.php:62
|
| 87 |
+
#: view/admin/log.php:30
|
| 88 |
+
#: view/admin/item_list.php:70
|
| 89 |
+
#: view/admin/options.php:120
|
| 90 |
+
msgid "Delete"
|
| 91 |
+
msgstr "Выдаліць"
|
| 92 |
+
|
| 93 |
+
#: view/admin/group_list.php:64
|
| 94 |
+
#: view/admin/item_list.php:72
|
| 95 |
+
msgid "Move To"
|
| 96 |
+
msgstr "Перамясціць"
|
| 97 |
+
|
| 98 |
+
#: view/admin/group_list.php:69
|
| 99 |
+
#: view/admin/item_list.php:34
|
| 100 |
+
#: view/admin/item_list.php:77
|
| 101 |
+
msgid "Go"
|
| 102 |
+
msgstr "Наперад"
|
| 103 |
+
|
| 104 |
+
#: view/admin/group_list.php:75
|
| 105 |
+
#: view/admin/item_list.php:83
|
| 106 |
+
msgid "re-order"
|
| 107 |
+
msgstr "памяняць месцамі"
|
| 108 |
+
|
| 109 |
+
#: view/admin/group_list.php:76
|
| 110 |
+
#: view/admin/item_list.php:84
|
| 111 |
+
msgid "save order"
|
| 112 |
+
msgstr "захаваць парадак"
|
| 113 |
+
|
| 114 |
+
#: view/admin/group_list.php:89
|
| 115 |
+
msgid "You have no groups in this module."
|
| 116 |
+
msgstr "Няма груп у дадзеным модулі"
|
| 117 |
+
|
| 118 |
+
#: view/admin/group_list.php:94
|
| 119 |
+
msgid "Add Group"
|
| 120 |
+
msgstr "Дадаць групу"
|
| 121 |
+
|
| 122 |
+
#: view/admin/group_list.php:105
|
| 123 |
+
msgid "Add"
|
| 124 |
+
msgstr "Дадаць"
|
| 125 |
+
|
| 126 |
+
#: view/admin/group_list.php:117
|
| 127 |
+
#: view/admin/log.php:112
|
| 128 |
+
#: view/admin/item_list.php:112
|
| 129 |
+
#: redirection.php:116
|
| 130 |
+
msgid "No items have been selected"
|
| 131 |
+
msgstr "Нічога не абрана"
|
| 132 |
+
|
| 133 |
+
#: view/admin/group_list.php:118
|
| 134 |
+
#: view/admin/log.php:113
|
| 135 |
+
#: view/admin/item_list.php:113
|
| 136 |
+
#: redirection.php:115
|
| 137 |
+
msgid "Are you sure?"
|
| 138 |
+
msgstr "Вы ўпэўнены?"
|
| 139 |
+
|
| 140 |
+
#: view/admin/submenu.php:6
|
| 141 |
+
msgid "Redirects"
|
| 142 |
+
msgstr "Перанакіраванні"
|
| 143 |
+
|
| 144 |
+
#: view/admin/submenu.php:11
|
| 145 |
+
#: view/admin/module_list.php:15
|
| 146 |
+
msgid "Groups"
|
| 147 |
+
msgstr "Групы"
|
| 148 |
+
|
| 149 |
+
#: view/admin/submenu.php:16
|
| 150 |
+
#: view/admin/module_list.php:6
|
| 151 |
+
msgid "Modules"
|
| 152 |
+
msgstr "Модулі"
|
| 153 |
+
|
| 154 |
+
#: view/admin/submenu.php:21
|
| 155 |
+
msgid "Log"
|
| 156 |
+
msgstr "Часопіс"
|
| 157 |
+
|
| 158 |
+
#: view/admin/submenu.php:26
|
| 159 |
+
#: view/admin/options.php:6
|
| 160 |
+
msgid "Options"
|
| 161 |
+
msgstr "Налады"
|
| 162 |
+
|
| 163 |
+
#: view/admin/submenu.php:31
|
| 164 |
+
msgid "Support"
|
| 165 |
+
msgstr "Падтрымка"
|
| 166 |
+
|
| 167 |
+
#: view/admin/module_item.php:23
|
| 168 |
+
msgid "View as"
|
| 169 |
+
msgstr "Паглядзець як"
|
| 170 |
+
|
| 171 |
+
#: view/admin/module_item.php:25
|
| 172 |
+
msgid "CSV"
|
| 173 |
+
msgstr "CSV"
|
| 174 |
+
|
| 175 |
+
#: view/admin/module_item.php:26
|
| 176 |
+
msgid "XML"
|
| 177 |
+
msgstr "XML"
|
| 178 |
+
|
| 179 |
+
#: view/admin/module_item.php:27
|
| 180 |
+
#: models/module.php:160
|
| 181 |
+
#: models/database.php:95
|
| 182 |
+
msgid "Apache"
|
| 183 |
+
msgstr "Apache"
|
| 184 |
+
|
| 185 |
+
#: view/admin/module_item.php:28
|
| 186 |
+
msgid "RSS"
|
| 187 |
+
msgstr "RSS"
|
| 188 |
+
|
| 189 |
+
#: view/admin/module_item.php:41
|
| 190 |
+
msgid "edit"
|
| 191 |
+
msgstr "кіраваць"
|
| 192 |
+
|
| 193 |
+
#: view/admin/module_item.php:43
|
| 194 |
+
msgid "delete"
|
| 195 |
+
msgstr "выдаліць"
|
| 196 |
+
|
| 197 |
+
#: view/admin/module_item.php:45
|
| 198 |
+
msgid "reset"
|
| 199 |
+
msgstr "скінуць"
|
| 200 |
+
|
| 201 |
+
#: view/admin/log.php:6
|
| 202 |
+
msgid "Redirection Log"
|
| 203 |
+
msgstr "Часопіс перанакіраванняў"
|
| 204 |
+
|
| 205 |
+
#: view/admin/log.php:29
|
| 206 |
+
msgid "Bulk Actions"
|
| 207 |
+
msgstr "Масавыя дзеянні"
|
| 208 |
+
|
| 209 |
+
#: view/admin/log.php:33
|
| 210 |
+
msgid "Apply"
|
| 211 |
+
msgstr "Ужыць"
|
| 212 |
+
|
| 213 |
+
#: view/admin/log.php:43
|
| 214 |
+
#: view/admin/item_list.php:24
|
| 215 |
+
#: view/admin/add.php:36
|
| 216 |
+
msgid "Group"
|
| 217 |
+
msgstr "Група"
|
| 218 |
+
|
| 219 |
+
#: view/admin/log.php:49
|
| 220 |
+
msgid "Filter"
|
| 221 |
+
msgstr "Фільтр"
|
| 222 |
+
|
| 223 |
+
#: view/admin/log.php:67
|
| 224 |
+
msgid "Date"
|
| 225 |
+
msgstr "Дата"
|
| 226 |
+
|
| 227 |
+
#: view/admin/log.php:68
|
| 228 |
+
#: view/admin/log_item_details.php:4
|
| 229 |
+
#: view/admin/item_edit.php:15
|
| 230 |
+
#: view/admin/add.php:12
|
| 231 |
+
msgid "Source URL"
|
| 232 |
+
msgstr "URL крыніцы"
|
| 233 |
+
|
| 234 |
+
#: view/admin/log.php:69
|
| 235 |
+
#: matches/referrer.php:40
|
| 236 |
+
msgid "Referrer"
|
| 237 |
+
msgstr "Реферер"
|
| 238 |
+
|
| 239 |
+
#: view/admin/log.php:70
|
| 240 |
+
msgid "IP"
|
| 241 |
+
msgstr "IP"
|
| 242 |
+
|
| 243 |
+
#: view/admin/log.php:85
|
| 244 |
+
msgid "There are no logs to display!"
|
| 245 |
+
msgstr "Часопісы адсутнічаюць!"
|
| 246 |
+
|
| 247 |
+
#: view/admin/log.php:94
|
| 248 |
+
msgid "Process Current Logs"
|
| 249 |
+
msgstr "Дзеянні з бягучым часопісам"
|
| 250 |
+
|
| 251 |
+
#: view/admin/log.php:95
|
| 252 |
+
msgid "These actions will affect all currently available logs (i.e. your search phrase will restrict the log items)."
|
| 253 |
+
msgstr "Гэтыя дзеянні крануць усіх наяўных у наш час часопісаў (пошук па часопісе будзе абмежаваны)"
|
| 254 |
+
|
| 255 |
+
#: view/admin/log.php:100
|
| 256 |
+
msgid "Delete Logs"
|
| 257 |
+
msgstr "Выдаліць часопісы"
|
| 258 |
+
|
| 259 |
+
#: view/admin/item_list.php:7
|
| 260 |
+
msgid "Redirections for group"
|
| 261 |
+
msgstr "Перанакіраванне для групы"
|
| 262 |
+
|
| 263 |
+
#: view/admin/item_list.php:41
|
| 264 |
+
msgid "Last Access"
|
| 265 |
+
msgstr "Апошні"
|
| 266 |
+
|
| 267 |
+
#: view/admin/item_list.php:43
|
| 268 |
+
#: view/admin/module_list.php:46
|
| 269 |
+
msgid "Type"
|
| 270 |
+
msgstr "Тып"
|
| 271 |
+
|
| 272 |
+
#: view/admin/item_list.php:44
|
| 273 |
+
msgid "URL"
|
| 274 |
+
msgstr "URL"
|
| 275 |
+
|
| 276 |
+
#: view/admin/item_list.php:44
|
| 277 |
+
msgid "Position"
|
| 278 |
+
msgstr "Сартаванне"
|
| 279 |
+
|
| 280 |
+
#: view/admin/item_list.php:88
|
| 281 |
+
msgid "You have no redirections."
|
| 282 |
+
msgstr "Няма перанакіраванняў"
|
| 283 |
+
|
| 284 |
+
#: view/admin/log_item_details.php:9
|
| 285 |
+
msgid "Redirect to"
|
| 286 |
+
msgstr "Перанакіраваць на"
|
| 287 |
+
|
| 288 |
+
#: view/admin/log_item_details.php:15
|
| 289 |
+
msgid "Redirected by"
|
| 290 |
+
msgstr "Перанакіравана"
|
| 291 |
+
|
| 292 |
+
#: view/admin/log_item_details.php:16
|
| 293 |
+
msgid "for"
|
| 294 |
+
msgstr "для"
|
| 295 |
+
|
| 296 |
+
#: view/admin/log_item_details.php:20
|
| 297 |
+
#: matches/user_agent.php:43
|
| 298 |
+
msgid "User Agent"
|
| 299 |
+
msgstr "User-Agent"
|
| 300 |
+
|
| 301 |
+
#: view/admin/item.php:27
|
| 302 |
+
#: view/admin/group_item.php:23
|
| 303 |
+
msgid "disabled"
|
| 304 |
+
msgstr "адключана"
|
| 305 |
+
|
| 306 |
+
#: view/admin/item_edit.php:3
|
| 307 |
+
msgid "%s by matching %s"
|
| 308 |
+
msgstr "%s супастаўленне %s"
|
| 309 |
+
|
| 310 |
+
#: view/admin/item_edit.php:7
|
| 311 |
+
msgid "Title"
|
| 312 |
+
msgstr "Назва"
|
| 313 |
+
|
| 314 |
+
#: view/admin/item_edit.php:10
|
| 315 |
+
msgid "optional"
|
| 316 |
+
msgstr "не абавязкова"
|
| 317 |
+
|
| 318 |
+
#: view/admin/item_edit.php:18
|
| 319 |
+
#: matches/referrer.php:43
|
| 320 |
+
msgid "Regex"
|
| 321 |
+
msgstr "Рэгулярны выраз"
|
| 322 |
+
|
| 323 |
+
#: view/admin/item_edit.php:27
|
| 324 |
+
#: view/admin/module_edit.php:27
|
| 325 |
+
#: view/admin/group_edit.php:20
|
| 326 |
+
msgid "Save"
|
| 327 |
+
msgstr "Захаваць"
|
| 328 |
+
|
| 329 |
+
#: view/admin/item_edit.php:28
|
| 330 |
+
#: view/admin/module_edit.php:28
|
| 331 |
+
#: view/admin/group_edit.php:21
|
| 332 |
+
msgid "Cancel"
|
| 333 |
+
msgstr "Адмена"
|
| 334 |
+
|
| 335 |
+
#: view/admin/add.php:3
|
| 336 |
+
msgid "Add new redirection"
|
| 337 |
+
msgstr "Дадаць новае перанакіраванне"
|
| 338 |
+
|
| 339 |
+
#: view/admin/add.php:6
|
| 340 |
+
msgid "Your redirection has been added."
|
| 341 |
+
msgstr "Ваша правіла перанакіравання дададзена."
|
| 342 |
+
|
| 343 |
+
#: view/admin/add.php:16
|
| 344 |
+
msgid "Match"
|
| 345 |
+
msgstr "Супадзенне"
|
| 346 |
+
|
| 347 |
+
#: view/admin/add.php:22
|
| 348 |
+
msgid "Action"
|
| 349 |
+
msgstr "Дзеянне"
|
| 350 |
+
|
| 351 |
+
#: view/admin/add.php:27
|
| 352 |
+
msgid "Regular expression"
|
| 353 |
+
msgstr "Рэгулярны выраз"
|
| 354 |
+
|
| 355 |
+
#: view/admin/add.php:31
|
| 356 |
+
#: matches/url.php:32
|
| 357 |
+
msgid "Target URL"
|
| 358 |
+
msgstr "URL прызначэнні"
|
| 359 |
+
|
| 360 |
+
#: view/admin/add.php:43
|
| 361 |
+
msgid "Add Redirection"
|
| 362 |
+
msgstr "Дадаць перанакіраванне"
|
| 363 |
+
|
| 364 |
+
#: view/admin/group_item.php:3
|
| 365 |
+
msgid "edit group"
|
| 366 |
+
msgstr "кіраваць групу"
|
| 367 |
+
|
| 368 |
+
#: view/admin/module_list.php:14
|
| 369 |
+
msgid "Details"
|
| 370 |
+
msgstr "Дэталі"
|
| 371 |
+
|
| 372 |
+
#: view/admin/module_list.php:16
|
| 373 |
+
msgid "Items"
|
| 374 |
+
msgstr "Элементы"
|
| 375 |
+
|
| 376 |
+
#: view/admin/module_list.php:18
|
| 377 |
+
msgid "Operations"
|
| 378 |
+
msgstr "Дзеянні"
|
| 379 |
+
|
| 380 |
+
#: view/admin/module_list.php:27
|
| 381 |
+
msgid "Note: Hits are dependant on log entries"
|
| 382 |
+
msgstr "Нататка: сведчанні лічыльніка залежаць ад запісаў у часопісе"
|
| 383 |
+
|
| 384 |
+
#: view/admin/module_list.php:29
|
| 385 |
+
msgid "You have no modules defined yet"
|
| 386 |
+
msgstr "Вы не вызначылі модулі"
|
| 387 |
+
|
| 388 |
+
#: view/admin/module_list.php:34
|
| 389 |
+
msgid "Add Module"
|
| 390 |
+
msgstr "Дадаць модуль"
|
| 391 |
+
|
| 392 |
+
#: view/admin/module_list.php:35
|
| 393 |
+
msgid "A module is a controlling element that determines how redirections are handled. Elements in a WordPress module are handled by WordPress, elements in an Apache module are handled by <code>.htaccess</code>, and elements in a 404 module affect how 404 errors are logged."
|
| 394 |
+
msgstr "Модуль уяўляе сабою элемент кіравання, які вызначае як апрацоўваюцца перанакіраванні. Элементы модуля WordPress апрацоўваюцца WordPress, элементы модуля Apache апрацоўваюцца файлам <code>.htaccess</code> і элементы модуля 404 уплываюць на журналяванне памылак 404"
|
| 395 |
+
|
| 396 |
+
#: view/admin/module_list.php:55
|
| 397 |
+
msgid "Create"
|
| 398 |
+
msgstr "Стварыць"
|
| 399 |
+
|
| 400 |
+
#: view/admin/support.php:5
|
| 401 |
+
msgid "Redirection Support"
|
| 402 |
+
msgstr "Падтрымка"
|
| 403 |
+
|
| 404 |
+
#: view/admin/support.php:9
|
| 405 |
+
msgid "Redirection is free to use - life is wonderful and lovely! However, it has required a great deal of time and effort to develop and if it has been useful you can help support this development by <strong>making a small donation</strong>."
|
| 406 |
+
msgstr "Гэта ўбудова абсалютна вольны для выкарыстання - жыццё выдатная і дзіўная! Тым не менш, ён патрабуе шмат часу і высілкаў у распрацоўцы і калі ён быў вам карысны, вы можаце падтрымаць яго далейшае развіццё, <strong>зрабіўшы невялікае ахвяраванне</strong>."
|
| 407 |
+
|
| 408 |
+
#: view/admin/support.php:10
|
| 409 |
+
msgid "This will act as an incentive for me to carry on developing, providing countless hours of support, and including new features and suggestions. You get some useful software and I get to carry on making it. Everybody wins."
|
| 410 |
+
msgstr "Гэта будзе для мяне стымулам працягваць займацца распрацоўкай дадзенай убудовы, марнаваць шмат часу на аказанне падтрымкі, у тым ліку на рэалізацыю новых прапанаваных магчымасцяў. Вы атрымліваеце новыя праграмы, а я працягваю гэтым займацца. Усё застаюцца ў выйгрышы."
|
| 411 |
+
|
| 412 |
+
#: view/admin/support.php:13
|
| 413 |
+
msgid "If you are using this plugin in a commercial setup, or feel that it's been particularly useful, then you may want to consider a <strong>commercial donation</strong>."
|
| 414 |
+
msgstr "Калі вы выкарыстоўваеце дадзеная ўбудова ў камерцыйных праектах ці лічыце, што ён быў вам асабліва карысны, то цалкам магчыма, што вы захочаце зрабіць <strong>камерцыйны ўнёсак</strong>."
|
| 415 |
+
|
| 416 |
+
#: view/admin/support.php:36
|
| 417 |
+
msgid "Individual<br/>Donation"
|
| 418 |
+
msgstr "Індывідуальны<br/>унёсак"
|
| 419 |
+
|
| 420 |
+
#: view/admin/support.php:56
|
| 421 |
+
msgid "Commercial<br/>Donation"
|
| 422 |
+
msgstr "Камерцыйны<br/>унёсак"
|
| 423 |
+
|
| 424 |
+
#: view/admin/support.php:60
|
| 425 |
+
msgid "Translations"
|
| 426 |
+
msgstr "Перакладнікі"
|
| 427 |
+
|
| 428 |
+
#: view/admin/support.php:62
|
| 429 |
+
msgid "If you're multi-lingual then you may want to consider donating a translation:"
|
| 430 |
+
msgstr "Калі вы валодаеце іншай мовай, вы можаце аказаць дапамогу, зрабіўшы пераклад:"
|
| 431 |
+
|
| 432 |
+
#: view/admin/support.php:70
|
| 433 |
+
msgid "All translators will have a link to their website placed on the plugin homepage at <a href=\"http://urbangiraffe.com/plugins/redirection/\">UrbanGiraffe</a>, in addition to being an individual supporter."
|
| 434 |
+
msgstr "Усе перакладнікі атрымліваюць спасылку на свой сайт з хатняй старонкі ўбудовы на <a href=\"http://urbangiraffe.com/plugins/redirection/\">UrbanGiraffe</a> і <a href=\"http://wordpress.org/extend/plugins/redirection/\">WordPress.org</a>, а таксама маюць магчымасць атрымліваць індывідуальную падтрымку."
|
| 435 |
+
|
| 436 |
+
#: view/admin/support.php:71
|
| 437 |
+
msgid "Full details of producing a translation can be found in this <a href=\"http://urbangiraffe.com/articles/translating-wordpress-themes-and-plugins/\">guide to translating WordPress plugins</a>."
|
| 438 |
+
msgstr "Поўную інфармацыю пра падрыхтоўку перакладу можна знайсці ў <a href=\"http://urbangiraffe.com/articles/translating-wordpress-themes-and-plugins/\">кіраўніцтве па перакладзе ўбудоў для WordPress</a>."
|
| 439 |
+
|
| 440 |
+
#: view/admin/options.php:15
|
| 441 |
+
msgid "Auto-generate URL"
|
| 442 |
+
msgstr "Аўтаматычная генерацыя URL"
|
| 443 |
+
|
| 444 |
+
#: view/admin/options.php:19
|
| 445 |
+
msgid "This will be used to auto-generate a URL if no URL is given. You can use the special tags $dec$ or $hex$ to have a unique ID inserted (either decimal or hex)"
|
| 446 |
+
msgstr "Выкарыстоўваецца для аўтаматычнай генерацыі URL, калі URL не прадстаўлены. Вы можаце выкарыстоўваць адмысловыя тэгі $dec$ ці $hex$ для ўстаўкі ўнікальнага ID (дзесятковыя ці шаснаццатковыя)"
|
| 447 |
+
|
| 448 |
+
#: view/admin/options.php:24
|
| 449 |
+
msgid "IP Lookup Service"
|
| 450 |
+
msgstr "Сэрвіс дазволу імёнаў па IP"
|
| 451 |
+
|
| 452 |
+
#: view/admin/options.php:30
|
| 453 |
+
msgid "Plugin Support"
|
| 454 |
+
msgstr "Падтрымка ўбудовы"
|
| 455 |
+
|
| 456 |
+
#: view/admin/options.php:33
|
| 457 |
+
msgid "I'm a nice person and I have helped support the author of this plugin"
|
| 458 |
+
msgstr "Я - добры чалавек і я падтрымаў аўтара дадзенай убудовы"
|
| 459 |
+
|
| 460 |
+
#: view/admin/options.php:37
|
| 461 |
+
msgid "Logging"
|
| 462 |
+
msgstr "Часопіс"
|
| 463 |
+
|
| 464 |
+
#: view/admin/options.php:40
|
| 465 |
+
msgid "log redirected requests"
|
| 466 |
+
msgstr "весці часопіс запытаў перанакіраванняў"
|
| 467 |
+
|
| 468 |
+
#: view/admin/options.php:42
|
| 469 |
+
msgid "log 404 Not Found requests"
|
| 470 |
+
msgstr "весці часопіс запытаў 404"
|
| 471 |
+
|
| 472 |
+
#: view/admin/options.php:43
|
| 473 |
+
msgid "Uncheck one or both of these to turn off logging and reduce database load if your redirected URLs are hit very frequently, and/or your site is very busy and pages are often not found."
|
| 474 |
+
msgstr "Калі вашы перанакіраваныя URL наведваюцца вельмі часта і/ці ваш сайт вельмі загружаны і старонкі часта бываюць не знойдзены, зніміце сцяжок з адной ці абедзвюх гэтых опцый каб адключыць вядзенне часопіса і тым самым зменшыць загрузку базы дадзеных."
|
| 475 |
+
|
| 476 |
+
#: view/admin/options.php:47
|
| 477 |
+
msgid "Expire Logs"
|
| 478 |
+
msgstr "Час жыцця часопіса"
|
| 479 |
+
|
| 480 |
+
#: view/admin/options.php:50
|
| 481 |
+
msgid "days (enter 0 for no expiry)"
|
| 482 |
+
msgstr "дзён (увядзіце 0 для неабмежаванага часу)"
|
| 483 |
+
|
| 484 |
+
#: view/admin/options.php:54
|
| 485 |
+
msgid "RSS Token"
|
| 486 |
+
msgstr "Токен RSS"
|
| 487 |
+
|
| 488 |
+
#: view/admin/options.php:57
|
| 489 |
+
msgid "A unique token allowing feed readers access to Redirection RSS (leave blank to auto-generate)"
|
| 490 |
+
msgstr "Унікальны радок для доступу да RSS фиду ўбудовы (пакіньце пусты для аўтаматычнай генерацыі)"
|
| 491 |
+
|
| 492 |
+
#: view/admin/options.php:62
|
| 493 |
+
msgid "URL Monitoring"
|
| 494 |
+
msgstr "Адсочванне URL"
|
| 495 |
+
|
| 496 |
+
#: view/admin/options.php:63
|
| 497 |
+
msgid "You can have Redirection detect changes in URLs and have an automatic redirection created in a specific group."
|
| 498 |
+
msgstr "Вы можаце ўключыць сачэнне за зменай URL і аўтаматычна ствараць перанакіраванне ў вызначанай групе."
|
| 499 |
+
|
| 500 |
+
#: view/admin/options.php:67
|
| 501 |
+
msgid "Post & Page URLs"
|
| 502 |
+
msgstr "URL запісаў і старонак"
|
| 503 |
+
|
| 504 |
+
#: view/admin/options.php:70
|
| 505 |
+
#: view/admin/options.php:82
|
| 506 |
+
msgid "Don't monitor"
|
| 507 |
+
msgstr "Не адсочваць"
|
| 508 |
+
|
| 509 |
+
#: view/admin/options.php:74
|
| 510 |
+
msgid "Monitor new posts"
|
| 511 |
+
msgstr "Адсочванне новых запісаў"
|
| 512 |
+
|
| 513 |
+
#: view/admin/options.php:79
|
| 514 |
+
msgid "Category URLs"
|
| 515 |
+
msgstr "URL катэгорыі"
|
| 516 |
+
|
| 517 |
+
#: view/admin/options.php:89
|
| 518 |
+
msgid "Update"
|
| 519 |
+
msgstr "Абнавіць"
|
| 520 |
+
|
| 521 |
+
#: view/admin/options.php:95
|
| 522 |
+
msgid "Import"
|
| 523 |
+
msgstr "Імпарт"
|
| 524 |
+
|
| 525 |
+
#: view/admin/options.php:97
|
| 526 |
+
msgid "Here you can import redirections from an existing .htaccess file, a CSV file, or a Redirection XML."
|
| 527 |
+
msgstr "Вы можаце імпартаваць правілы перанакіраванняў з існых .htaccess, CSV ці XML файлаў"
|
| 528 |
+
|
| 529 |
+
#: view/admin/options.php:104
|
| 530 |
+
msgid "Import into"
|
| 531 |
+
msgstr "Імпартаваць у"
|
| 532 |
+
|
| 533 |
+
#: view/admin/options.php:107
|
| 534 |
+
msgid "Upload"
|
| 535 |
+
msgstr "Загрузіць"
|
| 536 |
+
|
| 537 |
+
#: view/admin/options.php:110
|
| 538 |
+
msgid "Note that the group is ignored when uploading an XML file."
|
| 539 |
+
msgstr "Нататка: група будзе праігнаравана пры загрузцы XML-файла."
|
| 540 |
+
|
| 541 |
+
#: view/admin/options.php:114
|
| 542 |
+
msgid "Delete Redirection"
|
| 543 |
+
msgstr "Выдаліць убудову"
|
| 544 |
+
|
| 545 |
+
#: view/admin/options.php:115
|
| 546 |
+
msgid "Selecting this option will delete all redirections, all logs, and any options associated with the Redirection plugin. Make sure this is what you want to do."
|
| 547 |
+
msgstr "Выбар дадзенай опцыі выдаліць усе наладжаныя перанакіраванні, усе часопісы і ўсе іншыя налады, злучаныя з дадзенай убудовай. Пераканаецеся, што гэта менавіта тое, чаго вы жадаеце."
|
| 548 |
+
|
| 549 |
+
#: view/admin/group_edit.php:10
|
| 550 |
+
msgid "Tracked"
|
| 551 |
+
msgstr "Сачэнне"
|
| 552 |
+
|
| 553 |
+
#: view/admin/group_edit.php:11
|
| 554 |
+
msgid "Whether to track 'hits' to items"
|
| 555 |
+
msgstr "Адсочваць кол-у спрацоўванняў"
|
| 556 |
+
|
| 557 |
+
#: view/admin/group_edit.php:14
|
| 558 |
+
msgid "Enabled"
|
| 559 |
+
msgstr "Уключана"
|
| 560 |
+
|
| 561 |
+
#: view/admin/group_edit.php:15
|
| 562 |
+
msgid "Disabling a group will disable all items contained within it"
|
| 563 |
+
msgstr "Адключэнне групы прывядзе да адключэння ўсіх пунктаў, якія змяшчаюцца ў ёй"
|
| 564 |
+
|
| 565 |
+
#: modules/404.php:37
|
| 566 |
+
msgid "Log 404s"
|
| 567 |
+
msgstr "Журналяванне 404"
|
| 568 |
+
|
| 569 |
+
#: modules/404.php:46
|
| 570 |
+
#: modules/wordpress.php:121
|
| 571 |
+
msgid "<strong>Disabled: You must enable <a href=\"options-permalink.php\">permalinks</a> before using this</strong>"
|
| 572 |
+
msgstr "<strong>Адключана: Перад выкарыстаннем павінны быць уключаны <a href=\"options-permalink.php\">ЧПУ</a>"
|
| 573 |
+
|
| 574 |
+
#: modules/404.php:57
|
| 575 |
+
msgid "<small>No options have been set</small>"
|
| 576 |
+
msgstr "<small>Няма наладжвальных параметраў</small>"
|
| 577 |
+
|
| 578 |
+
#: modules/apache.php:77
|
| 579 |
+
msgid "Location"
|
| 580 |
+
msgstr "Размяшчэнне"
|
| 581 |
+
|
| 582 |
+
#: modules/apache.php:82
|
| 583 |
+
msgid "WordPress is installed in: <code>%s</code>"
|
| 584 |
+
msgstr "WordPress усталяваны ў: <code>%s</code>"
|
| 585 |
+
|
| 586 |
+
#: modules/apache.php:87
|
| 587 |
+
msgid "Canonical"
|
| 588 |
+
msgstr "Аснова"
|
| 589 |
+
|
| 590 |
+
#: modules/apache.php:90
|
| 591 |
+
#: modules/apache.php:96
|
| 592 |
+
msgid "Leave as is"
|
| 593 |
+
msgstr "Пакінуць як ёсць"
|
| 594 |
+
|
| 595 |
+
#: modules/apache.php:90
|
| 596 |
+
msgid "Strip WWW (%s)"
|
| 597 |
+
msgstr "Выразаць WWW (%s)"
|
| 598 |
+
|
| 599 |
+
#: modules/apache.php:90
|
| 600 |
+
msgid "Force WWW (www.%s)"
|
| 601 |
+
msgstr "Прымусова выкарыстоўваць WWW (www.%s)"
|
| 602 |
+
|
| 603 |
+
#: modules/apache.php:94
|
| 604 |
+
msgid "Strip Index"
|
| 605 |
+
msgstr "Выдаленне індэксу"
|
| 606 |
+
|
| 607 |
+
#: modules/apache.php:96
|
| 608 |
+
msgid "Strip index files (html,php)"
|
| 609 |
+
msgstr "Выдаліць файлы index (html,php) "
|
| 610 |
+
|
| 611 |
+
#: modules/apache.php:101
|
| 612 |
+
msgid "Memory Limit"
|
| 613 |
+
msgstr "Ліміт памяці"
|
| 614 |
+
|
| 615 |
+
#: modules/apache.php:104
|
| 616 |
+
#: modules/apache.php:109
|
| 617 |
+
msgid "Server default"
|
| 618 |
+
msgstr "Налады сервера"
|
| 619 |
+
|
| 620 |
+
#: modules/apache.php:107
|
| 621 |
+
msgid "Error Level"
|
| 622 |
+
msgstr "Узровень памылак"
|
| 623 |
+
|
| 624 |
+
#: modules/apache.php:109
|
| 625 |
+
msgid "No errors"
|
| 626 |
+
msgstr "Без памылак"
|
| 627 |
+
|
| 628 |
+
#: modules/apache.php:109
|
| 629 |
+
msgid "Show errors"
|
| 630 |
+
msgstr "Паказваць памылкі"
|
| 631 |
+
|
| 632 |
+
#: modules/apache.php:114
|
| 633 |
+
msgid "Ban IPs"
|
| 634 |
+
msgstr "Блакаваць IP"
|
| 635 |
+
|
| 636 |
+
#: modules/apache.php:120
|
| 637 |
+
msgid "Allow IPs"
|
| 638 |
+
msgstr "Дазволіць IP"
|
| 639 |
+
|
| 640 |
+
#: modules/apache.php:126
|
| 641 |
+
msgid "Raw .htaccess"
|
| 642 |
+
msgstr "Неапрацаваны .htaccess"
|
| 643 |
+
|
| 644 |
+
#: modules/apache.php:132
|
| 645 |
+
msgid "Site URL"
|
| 646 |
+
msgstr "URL сайта"
|
| 647 |
+
|
| 648 |
+
#: modules/apache.php:135
|
| 649 |
+
msgid "Advanced: For management of external sites"
|
| 650 |
+
msgstr "Дадаткова: для кіравання вонкавымі сайтамі"
|
| 651 |
+
|
| 652 |
+
#: modules/apache.php:150
|
| 653 |
+
msgid "<strong>Location is invalid - check that path exists</strong>"
|
| 654 |
+
msgstr "<strong>Няправільнае размяшчэнне - праверце што шлях існуе</strong>"
|
| 655 |
+
|
| 656 |
+
#: modules/apache.php:156
|
| 657 |
+
msgid "<strong>Could not write to configured <code>.htaccess</code> file - check file permissions</strong>"
|
| 658 |
+
msgstr "<strong>Немагчыма запісаць файл <code>.htaccess</code> - праверце правы доступу</strong>"
|
| 659 |
+
|
| 660 |
+
#: modules/apache.php:163
|
| 661 |
+
msgid "<strong>Disabled: enter the location of an <code>.htaccess</code> file for this to be valid</strong>"
|
| 662 |
+
msgstr "<strong>Адключана: пакажыце становішча файла <code>.htaccess</code> ці прывядзіце яго ў працоўны стан</strong>"
|
| 663 |
+
|
| 664 |
+
#: modules/apache.php:168
|
| 665 |
+
msgid "strip WWW"
|
| 666 |
+
msgstr "выразаць WWW"
|
| 667 |
+
|
| 668 |
+
#: modules/apache.php:168
|
| 669 |
+
msgid "force WWW"
|
| 670 |
+
msgstr "прымусова выкарыстоўваць WWW"
|
| 671 |
+
|
| 672 |
+
#: modules/apache.php:171
|
| 673 |
+
msgid "strip index"
|
| 674 |
+
msgstr "выдаліць index"
|
| 675 |
+
|
| 676 |
+
#: modules/apache.php:174
|
| 677 |
+
msgid "memory limit at %dMB"
|
| 678 |
+
msgstr "ліміт памяці %dMB"
|
| 679 |
+
|
| 680 |
+
#: modules/apache.php:177
|
| 681 |
+
msgid "no errors"
|
| 682 |
+
msgstr "няма памылак"
|
| 683 |
+
|
| 684 |
+
#: modules/apache.php:177
|
| 685 |
+
msgid "show errors"
|
| 686 |
+
msgstr "паказаць памылкі"
|
| 687 |
+
|
| 688 |
+
#: modules/apache.php:180
|
| 689 |
+
msgid "IPs are banned"
|
| 690 |
+
msgstr "Забароненыя IP"
|
| 691 |
+
|
| 692 |
+
#: modules/apache.php:183
|
| 693 |
+
msgid "IPs are allowed"
|
| 694 |
+
msgstr "Дазволеныя IP"
|
| 695 |
+
|
| 696 |
+
#: models/redirect.php:386
|
| 697 |
+
msgid "Redirect to URL"
|
| 698 |
+
msgstr "Перанакіраваць на URL"
|
| 699 |
+
|
| 700 |
+
#: models/redirect.php:387
|
| 701 |
+
msgid "Redirect to random post"
|
| 702 |
+
msgstr "Перанакіраваць на выпадковы запіс"
|
| 703 |
+
|
| 704 |
+
#: models/redirect.php:388
|
| 705 |
+
msgid "Pass-through"
|
| 706 |
+
msgstr "Транзіт (pass-through)"
|
| 707 |
+
|
| 708 |
+
#: models/redirect.php:389
|
| 709 |
+
msgid "Error (404)"
|
| 710 |
+
msgstr "Памылка 404"
|
| 711 |
+
|
| 712 |
+
#: models/redirect.php:390
|
| 713 |
+
msgid "Do nothing"
|
| 714 |
+
msgstr "Нічога не рабіць"
|
| 715 |
+
|
| 716 |
+
#: models/module.php:161
|
| 717 |
+
#: models/database.php:94
|
| 718 |
+
msgid "WordPress"
|
| 719 |
+
msgstr "WordPress"
|
| 720 |
+
|
| 721 |
+
#: models/module.php:162
|
| 722 |
+
msgid "404 Errors"
|
| 723 |
+
msgstr "Памылкі 404"
|
| 724 |
+
|
| 725 |
+
#: models/module.php:187
|
| 726 |
+
msgid "Strip WWW"
|
| 727 |
+
msgstr "Выразаць WWW"
|
| 728 |
+
|
| 729 |
+
#: models/module.php:187
|
| 730 |
+
msgid "Force WWW"
|
| 731 |
+
msgstr "Прымусова выкарыстоўваць WWW"
|
| 732 |
+
|
| 733 |
+
#: models/module.php:192
|
| 734 |
+
msgid "Strip index.php"
|
| 735 |
+
msgstr "Выдаліць index.php"
|
| 736 |
+
|
| 737 |
+
#: models/database.php:96
|
| 738 |
+
msgid "404"
|
| 739 |
+
msgstr "404"
|
| 740 |
+
|
| 741 |
+
#: models/database.php:101
|
| 742 |
+
msgid "Redirections"
|
| 743 |
+
msgstr "Перанакіраванні"
|
| 744 |
+
|
| 745 |
+
#: models/database.php:102
|
| 746 |
+
msgid "Modified Posts"
|
| 747 |
+
msgstr "Змененыя запісы"
|
| 748 |
+
|
| 749 |
+
#: models/pager.php:404
|
| 750 |
+
msgid "Previous"
|
| 751 |
+
msgstr "Папярэдні"
|
| 752 |
+
|
| 753 |
+
#: models/pager.php:405
|
| 754 |
+
msgid "Next"
|
| 755 |
+
msgstr "Наступны"
|
| 756 |
+
|
| 757 |
+
#: models/pager.php:463
|
| 758 |
+
msgid "%d per-page"
|
| 759 |
+
msgstr "%d на старонку"
|
| 760 |
+
|
| 761 |
+
#: models/pager.php:472
|
| 762 |
+
msgid "Displaying %s–%s of %s"
|
| 763 |
+
msgstr "Паказана %s–%s з %s"
|
| 764 |
+
|
| 765 |
+
#: models/group.php:194
|
| 766 |
+
msgid "Yes"
|
| 767 |
+
msgstr "Так"
|
| 768 |
+
|
| 769 |
+
#: models/group.php:195
|
| 770 |
+
msgid "No"
|
| 771 |
+
msgstr "Не"
|
| 772 |
+
|
| 773 |
+
#: ajax.php:370
|
| 774 |
+
msgid "Sorry, but your redirection was not created"
|
| 775 |
+
msgstr "Выбачыце, перанакіраванне не было створана"
|
| 776 |
+
|
| 777 |
+
#: redirection.php:94
|
| 778 |
+
msgid "Settings"
|
| 779 |
+
msgstr "Налады"
|
| 780 |
+
|
| 781 |
+
#: redirection.php:112
|
| 782 |
+
msgid "Please wait..."
|
| 783 |
+
msgstr "Калі ласка пачакайце..."
|
| 784 |
+
|
| 785 |
+
#. #-#-#-#-# plugin.pot (Redirection 2.2.5) #-#-#-#-#
|
| 786 |
+
#. Plugin Name of the plugin/theme
|
| 787 |
+
#: redirection.php:121
|
| 788 |
+
msgid "Redirection"
|
| 789 |
+
msgstr "Перанакіраванні"
|
| 790 |
+
|
| 791 |
+
#: redirection.php:159
|
| 792 |
+
msgid "Your module was successfully created"
|
| 793 |
+
msgstr "Модуль паспяхова створаны"
|
| 794 |
+
|
| 795 |
+
#: redirection.php:163
|
| 796 |
+
msgid "Your module was not created - did you provide a name?"
|
| 797 |
+
msgstr "Модуль не быў створаны - не паказалі імя?"
|
| 798 |
+
|
| 799 |
+
#: redirection.php:228
|
| 800 |
+
msgid "Your options were updated"
|
| 801 |
+
msgstr "Вашы налады былі абноўлены"
|
| 802 |
+
|
| 803 |
+
#: redirection.php:236
|
| 804 |
+
msgid "Redirection data has been deleted and the plugin disabled"
|
| 805 |
+
msgstr "Усе налады перанакіраванняў былі выдалены, а ўбудова адключаны"
|
| 806 |
+
|
| 807 |
+
#: redirection.php:246
|
| 808 |
+
msgid "%d redirection was successfully imported"
|
| 809 |
+
msgid_plural "%d redirections were successfully imported"
|
| 810 |
+
msgstr[0] "%d перанакіраванне было паспяхова імпартавана"
|
| 811 |
+
msgstr[1] "%d перанакіраванні былі паспяхова імпартаваны"
|
| 812 |
+
|
| 813 |
+
#: redirection.php:248
|
| 814 |
+
msgid "No items were imported"
|
| 815 |
+
msgstr "Нічога не імпартавана"
|
| 816 |
+
|
| 817 |
+
#: redirection.php:266
|
| 818 |
+
msgid "Your logs have been deleted"
|
| 819 |
+
msgstr "Вашы часопісы былі выдалены"
|
| 820 |
+
|
| 821 |
+
#: redirection.php:289
|
| 822 |
+
msgid "Your group was added successfully"
|
| 823 |
+
msgstr "Ваша група паспяхова дададзена"
|
| 824 |
+
|
| 825 |
+
#: redirection.php:293
|
| 826 |
+
msgid "Please specify a group name"
|
| 827 |
+
msgstr "Калі ласка, вызначыце імя групы"
|
| 828 |
+
|
| 829 |
+
#: redirection.php:330
|
| 830 |
+
msgid "Redirection is available in"
|
| 831 |
+
msgstr "Перанакіраванні даступныя ў"
|
| 832 |
+
|
| 833 |
+
#: matches/url.php:25
|
| 834 |
+
msgid "URL only"
|
| 835 |
+
msgstr "Толькі URL"
|
| 836 |
+
|
| 837 |
+
#: matches/url.php:40
|
| 838 |
+
#: matches/user_agent.php:55
|
| 839 |
+
#: matches/referrer.php:47
|
| 840 |
+
msgid "HTTP Code"
|
| 841 |
+
msgstr "Код HTTP"
|
| 842 |
+
|
| 843 |
+
#: matches/login.php:25
|
| 844 |
+
msgid "URL and login status"
|
| 845 |
+
msgstr "URL і статут уваходу"
|
| 846 |
+
|
| 847 |
+
#: matches/login.php:33
|
| 848 |
+
msgid "The target URL will be chosen from one of the following URLs, depending if the user is logged in or out. Leaving a URL blank means that the user is not redirected."
|
| 849 |
+
msgstr "Будзе абраны адзін з наступных URL-адрасоў у залежнасці ад таго, увойдзе карыстач у сістэму ці няма. Калі пакінуць поле пустым - карыстач перанакіроўвацца не будзе."
|
| 850 |
+
|
| 851 |
+
#: matches/login.php:39
|
| 852 |
+
#: matches/login.php:41
|
| 853 |
+
msgid "Logged In"
|
| 854 |
+
msgstr "Залогинен"
|
| 855 |
+
|
| 856 |
+
#: matches/login.php:51
|
| 857 |
+
#: matches/login.php:53
|
| 858 |
+
msgid "Logged Out"
|
| 859 |
+
msgstr "Разлогинен"
|
| 860 |
+
|
| 861 |
+
#: matches/user_agent.php:27
|
| 862 |
+
msgid "URL and user agent"
|
| 863 |
+
msgstr "URL і User-Agent"
|
| 864 |
+
|
| 865 |
+
#: matches/user_agent.php:32
|
| 866 |
+
msgid "FeedBurner"
|
| 867 |
+
msgstr "FeedBurner"
|
| 868 |
+
|
| 869 |
+
#: matches/user_agent.php:33
|
| 870 |
+
msgid "Internet Explorer"
|
| 871 |
+
msgstr "Internet Explorer"
|
| 872 |
+
|
| 873 |
+
#: matches/user_agent.php:34
|
| 874 |
+
msgid "FireFox"
|
| 875 |
+
msgstr "FireFox"
|
| 876 |
+
|
| 877 |
+
#: matches/user_agent.php:35
|
| 878 |
+
msgid "Opera"
|
| 879 |
+
msgstr "Opera"
|
| 880 |
+
|
| 881 |
+
#: matches/user_agent.php:36
|
| 882 |
+
msgid "Safari"
|
| 883 |
+
msgstr "Safari"
|
| 884 |
+
|
| 885 |
+
#: matches/user_agent.php:37
|
| 886 |
+
msgid "iPhone"
|
| 887 |
+
msgstr "iPhone"
|
| 888 |
+
|
| 889 |
+
#: matches/user_agent.php:38
|
| 890 |
+
msgid "Nintendo Wii"
|
| 891 |
+
msgstr "Nintendo Wii"
|
| 892 |
+
|
| 893 |
+
#: matches/user_agent.php:66
|
| 894 |
+
msgid "The visitor will be redirected from the source URL if the user agent matches. You can specify a <em>matched</em> target URL as the address to send visitors if they do match, and <em>not matched</em> if they don't match. Leaving a URL blank means that the visitor is not redirected. <strong>All matches are performed as regular expressions</strong>.\n"
|
| 895 |
+
msgstr "Наведвальнік будзе перанакіраваны пры супадзенні User-Agent. Вы можаце вызначыць розныя мэтавыя URL пры супадзенні ці не супадзенні. Калі пакінуць поле пустым, то наведвальнік нікуды перанакіроўвацца не будзе. <strong>Усе ўмовы ўводзяцца як рэгулярныя выразы</strong>.\n"
|
| 896 |
+
|
| 897 |
+
#: matches/user_agent.php:73
|
| 898 |
+
#: matches/user_agent.php:75
|
| 899 |
+
#: matches/referrer.php:63
|
| 900 |
+
#: matches/referrer.php:65
|
| 901 |
+
msgid "Matched"
|
| 902 |
+
msgstr "Супадаюць"
|
| 903 |
+
|
| 904 |
+
#: matches/user_agent.php:83
|
| 905 |
+
#: matches/user_agent.php:85
|
| 906 |
+
#: matches/referrer.php:73
|
| 907 |
+
#: matches/referrer.php:75
|
| 908 |
+
msgid "Not matched"
|
| 909 |
+
msgstr "Не супадаюць"
|
| 910 |
+
|
| 911 |
+
#: matches/referrer.php:28
|
| 912 |
+
msgid "URL and referrer"
|
| 913 |
+
msgstr "URL і реферер"
|
| 914 |
+
|
| 915 |
+
#: matches/referrer.php:57
|
| 916 |
+
msgid "The visitor will be redirected from the source URL if the referrer matches. You can specify a <em>matched</em> target URL as the address to send visitors if they do match, and <em>not matched</em> if they don't match. Leaving a URL blank means that the visitor is not redirected."
|
| 917 |
+
msgstr "Наведвальнік будзе перенапрвлен на URL крыніцы пры супадзенні реферера. Вы можаце вызначыць розныя мэтавыя URL пры супадзенні і не супадзенні. Калі пакінуць поле пустым, наведвальнік нікуды перанакіроўвацца не будзе."
|
| 918 |
+
|
| 919 |
+
#. Plugin URI of the plugin/theme
|
| 920 |
+
msgid "http://urbangiraffe.com/plugins/redirection/"
|
| 921 |
+
msgstr "http://urbangiraffe.com/plugins/redirection/"
|
| 922 |
+
|
| 923 |
+
#. Description of the plugin/theme
|
| 924 |
+
msgid "Manage all your 301 redirects and monitor 404 errors"
|
| 925 |
+
msgstr "Кіруйце ўсімі 301-перанакіраваннямі і адсочвайце памылкі 404"
|
| 926 |
+
|
| 927 |
+
#. Author of the plugin/theme
|
| 928 |
+
msgid "John Godley"
|
| 929 |
+
msgstr "Джон Годли"
|
| 930 |
+
|
| 931 |
+
#. Author URI of the plugin/theme
|
| 932 |
+
msgid "http://urbangiraffe.com"
|
| 933 |
+
msgstr "http://urbangiraffe.com"
|
| 934 |
+
|
| 935 |
+
#~ msgid " for external site: <code>%s</code>"
|
| 936 |
+
#~ msgstr " для вонкавага сайта: <code>%s</code>"
|
| 937 |
+
|
| 938 |
+
#~ msgid "1 minute"
|
| 939 |
+
#~ msgstr "1 хвіліна"
|
| 940 |
+
|
| 941 |
+
#~ msgid "2 minutes"
|
| 942 |
+
#~ msgstr "2 хвіліны"
|
| 943 |
+
|
| 944 |
+
#~ msgid "30 seconds"
|
| 945 |
+
#~ msgstr "30 секунд"
|
| 946 |
+
|
| 947 |
+
#~ msgid "5 minutes"
|
| 948 |
+
#~ msgstr "5 мінуць"
|
| 949 |
+
|
| 950 |
+
#~ msgid "As long as possible"
|
| 951 |
+
#~ msgstr "Як мага даўжэй"
|
| 952 |
+
|
| 953 |
+
#~ msgid "Export to CSV"
|
| 954 |
+
#~ msgstr "Экспарт у CSV"
|
| 955 |
+
|
| 956 |
+
#~ msgid ""
|
| 957 |
+
#~ "Please read the documentation and FAQ, and check the bug tracker, before "
|
| 958 |
+
#~ "asking a question."
|
| 959 |
+
#~ msgstr ""
|
| 960 |
+
#~ "Калі ласка, прачытайце дакументацыю і FAQ, а таксама праверце памылку на "
|
| 961 |
+
#~ "трэкеры, перш чым задаць пытанне."
|
| 962 |
+
|
| 963 |
+
#~ msgid "Redirection Bug Tracker"
|
| 964 |
+
#~ msgstr "Паведаміць пра памылкі"
|
| 965 |
+
|
| 966 |
+
#~ msgid "Redirection Documentation"
|
| 967 |
+
#~ msgstr "Дакументацыя па ўбудове"
|
| 968 |
+
|
| 969 |
+
#~ msgid "Redirection FAQ"
|
| 970 |
+
#~ msgstr "Часта задаваныя пытанні (FAQ)"
|
| 971 |
+
|
| 972 |
+
#~ msgid "Redirection Help"
|
| 973 |
+
#~ msgstr "Дапамога"
|
| 974 |
+
|
| 975 |
+
#~ msgid "Redirection Support Forum"
|
| 976 |
+
#~ msgstr "Форум падтрымкі"
|
| 977 |
+
|
| 978 |
+
#~ msgid "Strip index files (html,php,asp)"
|
| 979 |
+
#~ msgstr "Выдаліць файлы index (html,php,asp)"
|
| 980 |
+
|
| 981 |
+
#~ msgid "Time Limit"
|
| 982 |
+
#~ msgstr "Ліміт часу"
|
| 983 |
+
|
| 984 |
+
#~ msgid "time limit at %ss"
|
| 985 |
+
#~ msgstr "ліміт часу %ss"
|
| 986 |
+
|
| 987 |
+
#~ msgid "time limit set as long as possible"
|
| 988 |
+
#~ msgstr "ліміт часу ўсталяваны на максімальна магчымы"
|
locale/cs_CZ.mo
ADDED
|
Binary file
|
locale/cs_CZ.po
ADDED
|
@@ -0,0 +1,1135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
msgid ""
|
| 2 |
+
msgstr ""
|
| 3 |
+
"Project-Id-Version: Redirection 2.2.5\n"
|
| 4 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/redirection\n"
|
| 5 |
+
"POT-Creation-Date: 2011-07-17 10:14:58+00:00\n"
|
| 6 |
+
"PO-Revision-Date: 2011-08-18 13:24+0100\n"
|
| 7 |
+
"Last-Translator: Martin Jurica <martin@jurica.info>\n"
|
| 8 |
+
"Language-Team: Martin Jurica <martin@jurica.info>\n"
|
| 9 |
+
"MIME-Version: 1.0\n"
|
| 10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
| 11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
| 12 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
| 13 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
| 14 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
| 15 |
+
"X-Poedit-Basepath: .\n"
|
| 16 |
+
"X-Textdomain-Support: yes\n"
|
| 17 |
+
"X-Poedit-SearchPath-0: .\n"
|
| 18 |
+
|
| 19 |
+
#@ redirection
|
| 20 |
+
#: fileio/csv.php:21
|
| 21 |
+
#, php-format
|
| 22 |
+
msgid "module_%d.csv"
|
| 23 |
+
msgstr "module_%d.csv"
|
| 24 |
+
|
| 25 |
+
#@ redirection
|
| 26 |
+
#: fileio/xml.php:32
|
| 27 |
+
#, php-format
|
| 28 |
+
msgid "module_%d.xml"
|
| 29 |
+
msgstr "module_%d.xml"
|
| 30 |
+
|
| 31 |
+
#@ redirection
|
| 32 |
+
#: fileio/xml.php:105
|
| 33 |
+
#, php-format
|
| 34 |
+
msgid "%s imported on %s at %s"
|
| 35 |
+
msgstr "%s importován z %s na %s"
|
| 36 |
+
|
| 37 |
+
#@ redirection
|
| 38 |
+
#: fileio/xml.php:168
|
| 39 |
+
msgid "XML importing is only available with PHP5 - you have PHP4."
|
| 40 |
+
msgstr "XML import je k dispozici pouze v PHP5 - používáte bohužel PHP4."
|
| 41 |
+
|
| 42 |
+
#@ redirection
|
| 43 |
+
#: view/admin/group_list.php:6
|
| 44 |
+
msgid "Groups for module"
|
| 45 |
+
msgstr "Skupiny modulu"
|
| 46 |
+
|
| 47 |
+
#@ redirection
|
| 48 |
+
#: view/admin/group_list.php:16
|
| 49 |
+
#: view/admin/log.php:38
|
| 50 |
+
msgid "Module"
|
| 51 |
+
msgstr "Modul"
|
| 52 |
+
|
| 53 |
+
#@ redirection
|
| 54 |
+
#: view/admin/group_list.php:21
|
| 55 |
+
#: view/admin/item_list.php:29
|
| 56 |
+
#: view/admin/log.php:16
|
| 57 |
+
#: view/admin/log.php:23
|
| 58 |
+
msgid "Search"
|
| 59 |
+
msgstr "Hledat"
|
| 60 |
+
|
| 61 |
+
#@ redirection
|
| 62 |
+
#: view/admin/group_list.php:26
|
| 63 |
+
msgid "go"
|
| 64 |
+
msgstr "go"
|
| 65 |
+
|
| 66 |
+
#@ redirection
|
| 67 |
+
#: view/admin/group_list.php:36
|
| 68 |
+
#: view/admin/item_list.php:42
|
| 69 |
+
#: view/admin/module_list.php:17
|
| 70 |
+
msgid "Hits"
|
| 71 |
+
msgstr "Zobrazení"
|
| 72 |
+
|
| 73 |
+
#@ redirection
|
| 74 |
+
#: view/admin/group_edit.php:6
|
| 75 |
+
#: view/admin/group_list.php:37
|
| 76 |
+
#: view/admin/group_list.php:100
|
| 77 |
+
#: view/admin/module_edit.php:18
|
| 78 |
+
#: view/admin/module_list.php:42
|
| 79 |
+
msgid "Name"
|
| 80 |
+
msgstr "Jméno"
|
| 81 |
+
|
| 82 |
+
#@ redirection
|
| 83 |
+
#: view/admin/group_list.php:59
|
| 84 |
+
#: view/admin/item_list.php:67
|
| 85 |
+
msgid "Select All"
|
| 86 |
+
msgstr "Vybrat vše"
|
| 87 |
+
|
| 88 |
+
#@ redirection
|
| 89 |
+
#: view/admin/group_list.php:60
|
| 90 |
+
#: view/admin/item_list.php:68
|
| 91 |
+
msgid "Toggle"
|
| 92 |
+
msgstr "Povolit/Zakázat"
|
| 93 |
+
|
| 94 |
+
#@ redirection
|
| 95 |
+
#: view/admin/group_list.php:61
|
| 96 |
+
#: view/admin/item_list.php:69
|
| 97 |
+
msgid "Reset Hits"
|
| 98 |
+
msgstr "Vynulovat počet zobrazení"
|
| 99 |
+
|
| 100 |
+
#@ redirection
|
| 101 |
+
#@ default
|
| 102 |
+
#: view/admin/group_list.php:62
|
| 103 |
+
#: view/admin/item_list.php:70
|
| 104 |
+
#: view/admin/log.php:30
|
| 105 |
+
#: view/admin/options.php:120
|
| 106 |
+
msgid "Delete"
|
| 107 |
+
msgstr "Odstranit"
|
| 108 |
+
|
| 109 |
+
#@ redirection
|
| 110 |
+
#: view/admin/group_list.php:64
|
| 111 |
+
#: view/admin/item_list.php:72
|
| 112 |
+
msgid "Move To"
|
| 113 |
+
msgstr "Přesunout do"
|
| 114 |
+
|
| 115 |
+
#@ redirection
|
| 116 |
+
#: view/admin/group_list.php:69
|
| 117 |
+
#: view/admin/item_list.php:34
|
| 118 |
+
#: view/admin/item_list.php:77
|
| 119 |
+
msgid "Go"
|
| 120 |
+
msgstr "Go"
|
| 121 |
+
|
| 122 |
+
#@ redirection
|
| 123 |
+
#: view/admin/group_list.php:75
|
| 124 |
+
#: view/admin/item_list.php:83
|
| 125 |
+
msgid "re-order"
|
| 126 |
+
msgstr "přeuspořádat"
|
| 127 |
+
|
| 128 |
+
#@ redirection
|
| 129 |
+
#: view/admin/group_list.php:76
|
| 130 |
+
#: view/admin/item_list.php:84
|
| 131 |
+
msgid "save order"
|
| 132 |
+
msgstr "uložit pořadí"
|
| 133 |
+
|
| 134 |
+
#@ redirection
|
| 135 |
+
#: view/admin/group_list.php:89
|
| 136 |
+
msgid "You have no groups in this module."
|
| 137 |
+
msgstr "Tento modul neobsahuje žádné skupiny."
|
| 138 |
+
|
| 139 |
+
#@ redirection
|
| 140 |
+
#: view/admin/group_list.php:94
|
| 141 |
+
msgid "Add Group"
|
| 142 |
+
msgstr "Přidat skupinu"
|
| 143 |
+
|
| 144 |
+
#@ redirection
|
| 145 |
+
#: view/admin/group_list.php:105
|
| 146 |
+
msgid "Add"
|
| 147 |
+
msgstr "Přidat"
|
| 148 |
+
|
| 149 |
+
#@ redirection
|
| 150 |
+
#: redirection.php:116
|
| 151 |
+
#: view/admin/group_list.php:117
|
| 152 |
+
#: view/admin/item_list.php:112
|
| 153 |
+
#: view/admin/log.php:112
|
| 154 |
+
msgid "No items have been selected"
|
| 155 |
+
msgstr "Nebyly vybrány žádné položky"
|
| 156 |
+
|
| 157 |
+
#@ redirection
|
| 158 |
+
#: redirection.php:115
|
| 159 |
+
#: view/admin/group_list.php:118
|
| 160 |
+
#: view/admin/item_list.php:113
|
| 161 |
+
#: view/admin/log.php:113
|
| 162 |
+
msgid "Are you sure?"
|
| 163 |
+
msgstr "Opravdu?"
|
| 164 |
+
|
| 165 |
+
#@ redirection
|
| 166 |
+
#: view/admin/submenu.php:6
|
| 167 |
+
msgid "Redirects"
|
| 168 |
+
msgstr "Přesměrování"
|
| 169 |
+
|
| 170 |
+
#@ redirection
|
| 171 |
+
#: view/admin/module_list.php:15
|
| 172 |
+
#: view/admin/submenu.php:11
|
| 173 |
+
msgid "Groups"
|
| 174 |
+
msgstr "Skupiny"
|
| 175 |
+
|
| 176 |
+
#@ redirection
|
| 177 |
+
#: view/admin/module_list.php:6
|
| 178 |
+
#: view/admin/submenu.php:16
|
| 179 |
+
msgid "Modules"
|
| 180 |
+
msgstr "Moduly"
|
| 181 |
+
|
| 182 |
+
#@ redirection
|
| 183 |
+
#: view/admin/submenu.php:21
|
| 184 |
+
msgid "Log"
|
| 185 |
+
msgstr "Log"
|
| 186 |
+
|
| 187 |
+
#@ redirection
|
| 188 |
+
#: view/admin/options.php:6
|
| 189 |
+
#: view/admin/submenu.php:26
|
| 190 |
+
msgid "Options"
|
| 191 |
+
msgstr "Nastavení"
|
| 192 |
+
|
| 193 |
+
#@ redirection
|
| 194 |
+
#: view/admin/submenu.php:31
|
| 195 |
+
msgid "Support"
|
| 196 |
+
msgstr "Podpora"
|
| 197 |
+
|
| 198 |
+
#@ redirection
|
| 199 |
+
#: view/admin/module_item.php:23
|
| 200 |
+
msgid "View as"
|
| 201 |
+
msgstr "Zobrazit jako"
|
| 202 |
+
|
| 203 |
+
#@ redirection
|
| 204 |
+
#: view/admin/module_item.php:25
|
| 205 |
+
msgid "CSV"
|
| 206 |
+
msgstr "CSV"
|
| 207 |
+
|
| 208 |
+
#@ redirection
|
| 209 |
+
#: view/admin/module_item.php:26
|
| 210 |
+
msgid "XML"
|
| 211 |
+
msgstr "XML"
|
| 212 |
+
|
| 213 |
+
#@ redirection
|
| 214 |
+
#: models/database.php:95
|
| 215 |
+
#: models/module.php:160
|
| 216 |
+
#: view/admin/module_item.php:27
|
| 217 |
+
msgid "Apache"
|
| 218 |
+
msgstr "Apache"
|
| 219 |
+
|
| 220 |
+
#@ redirection
|
| 221 |
+
#: view/admin/module_item.php:28
|
| 222 |
+
msgid "RSS"
|
| 223 |
+
msgstr "RSS"
|
| 224 |
+
|
| 225 |
+
#@ redirection
|
| 226 |
+
#: view/admin/module_item.php:41
|
| 227 |
+
msgid "edit"
|
| 228 |
+
msgstr "upravit"
|
| 229 |
+
|
| 230 |
+
#@ redirection
|
| 231 |
+
#: view/admin/module_item.php:43
|
| 232 |
+
msgid "delete"
|
| 233 |
+
msgstr "odstranit"
|
| 234 |
+
|
| 235 |
+
#@ redirection
|
| 236 |
+
#: view/admin/module_item.php:45
|
| 237 |
+
msgid "reset"
|
| 238 |
+
msgstr "reset"
|
| 239 |
+
|
| 240 |
+
#@ redirection
|
| 241 |
+
#: view/admin/log.php:6
|
| 242 |
+
msgid "Redirection Log"
|
| 243 |
+
msgstr "Logy přesměrování"
|
| 244 |
+
|
| 245 |
+
#@ default
|
| 246 |
+
#: view/admin/log.php:29
|
| 247 |
+
msgid "Bulk Actions"
|
| 248 |
+
msgstr "Hromadné akce"
|
| 249 |
+
|
| 250 |
+
#@ default
|
| 251 |
+
#: view/admin/log.php:33
|
| 252 |
+
msgid "Apply"
|
| 253 |
+
msgstr "Použít"
|
| 254 |
+
|
| 255 |
+
#@ redirection
|
| 256 |
+
#: view/admin/add.php:36
|
| 257 |
+
#: view/admin/item_list.php:24
|
| 258 |
+
#: view/admin/log.php:43
|
| 259 |
+
msgid "Group"
|
| 260 |
+
msgstr "Skupina"
|
| 261 |
+
|
| 262 |
+
#@ default
|
| 263 |
+
#: view/admin/log.php:49
|
| 264 |
+
msgid "Filter"
|
| 265 |
+
msgstr "Filtr"
|
| 266 |
+
|
| 267 |
+
#@ redirection
|
| 268 |
+
#: view/admin/log.php:67
|
| 269 |
+
msgid "Date"
|
| 270 |
+
msgstr "Datum"
|
| 271 |
+
|
| 272 |
+
#@ redirection
|
| 273 |
+
#: view/admin/add.php:12
|
| 274 |
+
#: view/admin/item_edit.php:15
|
| 275 |
+
#: view/admin/log.php:68
|
| 276 |
+
#: view/admin/log_item_details.php:4
|
| 277 |
+
msgid "Source URL"
|
| 278 |
+
msgstr "Zdrojová URL"
|
| 279 |
+
|
| 280 |
+
#@ redirection
|
| 281 |
+
#: matches/referrer.php:40
|
| 282 |
+
#: view/admin/log.php:69
|
| 283 |
+
msgid "Referrer"
|
| 284 |
+
msgstr "Referrer"
|
| 285 |
+
|
| 286 |
+
#@ redirection
|
| 287 |
+
#: view/admin/log.php:70
|
| 288 |
+
msgid "IP"
|
| 289 |
+
msgstr "IP"
|
| 290 |
+
|
| 291 |
+
#@ redirection
|
| 292 |
+
#: view/admin/log.php:85
|
| 293 |
+
msgid "There are no logs to display!"
|
| 294 |
+
msgstr "Není k dispozici žádný log pro zobrazení!"
|
| 295 |
+
|
| 296 |
+
#@ redirection
|
| 297 |
+
#: view/admin/log.php:94
|
| 298 |
+
msgid "Process Current Logs"
|
| 299 |
+
msgstr "Operace s aktuálními logy"
|
| 300 |
+
|
| 301 |
+
#@ redirection
|
| 302 |
+
#: view/admin/log.php:95
|
| 303 |
+
msgid "These actions will affect all currently available logs (i.e. your search phrase will restrict the log items)."
|
| 304 |
+
msgstr "Tyto akce budou mít vliv na všechny logy, které jsou k dispozici (pomocí vyhledávání můžete omezit rozsah zpracovaných logů)."
|
| 305 |
+
|
| 306 |
+
#@ redirection
|
| 307 |
+
#: view/admin/log.php:100
|
| 308 |
+
msgid "Delete Logs"
|
| 309 |
+
msgstr "Smazat logy"
|
| 310 |
+
|
| 311 |
+
#@ redirection
|
| 312 |
+
#: view/admin/item_list.php:7
|
| 313 |
+
msgid "Redirections for group"
|
| 314 |
+
msgstr "Přesměrování pro skupinu"
|
| 315 |
+
|
| 316 |
+
#@ redirection
|
| 317 |
+
#: view/admin/item_list.php:41
|
| 318 |
+
msgid "Last Access"
|
| 319 |
+
msgstr "Poslední přístup"
|
| 320 |
+
|
| 321 |
+
#@ redirection
|
| 322 |
+
#: view/admin/item_list.php:43
|
| 323 |
+
#: view/admin/module_list.php:46
|
| 324 |
+
msgid "Type"
|
| 325 |
+
msgstr "Typ"
|
| 326 |
+
|
| 327 |
+
#@ redirection
|
| 328 |
+
#: view/admin/item_list.php:44
|
| 329 |
+
msgid "URL"
|
| 330 |
+
msgstr "URL"
|
| 331 |
+
|
| 332 |
+
#@ redirection
|
| 333 |
+
#: view/admin/item_list.php:44
|
| 334 |
+
msgid "Position"
|
| 335 |
+
msgstr "Pozice"
|
| 336 |
+
|
| 337 |
+
#@ redirection
|
| 338 |
+
#: view/admin/item_list.php:88
|
| 339 |
+
msgid "You have no redirections."
|
| 340 |
+
msgstr "Neexistuje žádné přesměrování."
|
| 341 |
+
|
| 342 |
+
#@ redirection
|
| 343 |
+
#: view/admin/log_item_details.php:9
|
| 344 |
+
msgid "Redirect to"
|
| 345 |
+
msgstr "Přesměrovat na"
|
| 346 |
+
|
| 347 |
+
#@ redirection
|
| 348 |
+
#: view/admin/log_item_details.php:15
|
| 349 |
+
msgid "Redirected by"
|
| 350 |
+
msgstr "Přesměrováno dle"
|
| 351 |
+
|
| 352 |
+
#@ redirection
|
| 353 |
+
#: view/admin/log_item_details.php:16
|
| 354 |
+
msgid "for"
|
| 355 |
+
msgstr "pro"
|
| 356 |
+
|
| 357 |
+
#@ redirection
|
| 358 |
+
#: matches/user_agent.php:43
|
| 359 |
+
#: view/admin/log_item_details.php:20
|
| 360 |
+
msgid "User Agent"
|
| 361 |
+
msgstr "User Agent"
|
| 362 |
+
|
| 363 |
+
#@ redirection
|
| 364 |
+
#: view/admin/group_item.php:23
|
| 365 |
+
#: view/admin/item.php:27
|
| 366 |
+
msgid "disabled"
|
| 367 |
+
msgstr "zakázáno"
|
| 368 |
+
|
| 369 |
+
#@ redirection
|
| 370 |
+
#: view/admin/item_edit.php:3
|
| 371 |
+
#, php-format
|
| 372 |
+
msgid "%s by matching %s"
|
| 373 |
+
msgstr "%s odpovídá %s"
|
| 374 |
+
|
| 375 |
+
#@ redirection
|
| 376 |
+
#: view/admin/item_edit.php:7
|
| 377 |
+
msgid "Title"
|
| 378 |
+
msgstr "Nadpis"
|
| 379 |
+
|
| 380 |
+
#@ redirection
|
| 381 |
+
#: view/admin/item_edit.php:10
|
| 382 |
+
msgid "optional"
|
| 383 |
+
msgstr "volitelný"
|
| 384 |
+
|
| 385 |
+
#@ redirection
|
| 386 |
+
#: matches/referrer.php:43
|
| 387 |
+
#: view/admin/item_edit.php:18
|
| 388 |
+
msgid "Regex"
|
| 389 |
+
msgstr "Regex"
|
| 390 |
+
|
| 391 |
+
#@ redirection
|
| 392 |
+
#: view/admin/group_edit.php:20
|
| 393 |
+
#: view/admin/item_edit.php:27
|
| 394 |
+
#: view/admin/module_edit.php:27
|
| 395 |
+
msgid "Save"
|
| 396 |
+
msgstr "Uložit"
|
| 397 |
+
|
| 398 |
+
#@ redirection
|
| 399 |
+
#: view/admin/group_edit.php:21
|
| 400 |
+
#: view/admin/item_edit.php:28
|
| 401 |
+
#: view/admin/module_edit.php:28
|
| 402 |
+
msgid "Cancel"
|
| 403 |
+
msgstr "Zrušit"
|
| 404 |
+
|
| 405 |
+
#@ redirection
|
| 406 |
+
#: view/admin/add.php:3
|
| 407 |
+
msgid "Add new redirection"
|
| 408 |
+
msgstr "Přidat nové přesměrování"
|
| 409 |
+
|
| 410 |
+
#@ redirection
|
| 411 |
+
#: view/admin/add.php:6
|
| 412 |
+
msgid "Your redirection has been added."
|
| 413 |
+
msgstr "Přesměrování bylo přidáno."
|
| 414 |
+
|
| 415 |
+
#@ redirection
|
| 416 |
+
#: view/admin/add.php:16
|
| 417 |
+
msgid "Match"
|
| 418 |
+
msgstr "Shoda"
|
| 419 |
+
|
| 420 |
+
#@ redirection
|
| 421 |
+
#: view/admin/add.php:22
|
| 422 |
+
msgid "Action"
|
| 423 |
+
msgstr "Akce"
|
| 424 |
+
|
| 425 |
+
#@ redirection
|
| 426 |
+
#: view/admin/add.php:27
|
| 427 |
+
msgid "Regular expression"
|
| 428 |
+
msgstr "Regulární výraz"
|
| 429 |
+
|
| 430 |
+
#@ redirection
|
| 431 |
+
#: matches/url.php:32
|
| 432 |
+
#: view/admin/add.php:31
|
| 433 |
+
msgid "Target URL"
|
| 434 |
+
msgstr "Cílová URL"
|
| 435 |
+
|
| 436 |
+
#@ redirection
|
| 437 |
+
#: view/admin/add.php:43
|
| 438 |
+
msgid "Add Redirection"
|
| 439 |
+
msgstr "Přidat přesměrování"
|
| 440 |
+
|
| 441 |
+
#@ redirection
|
| 442 |
+
#: view/admin/group_item.php:3
|
| 443 |
+
msgid "edit group"
|
| 444 |
+
msgstr "upravit skupinu"
|
| 445 |
+
|
| 446 |
+
#@ redirection
|
| 447 |
+
#: view/admin/module_list.php:14
|
| 448 |
+
msgid "Details"
|
| 449 |
+
msgstr "Podrobnosti"
|
| 450 |
+
|
| 451 |
+
#@ redirection
|
| 452 |
+
#: view/admin/module_list.php:16
|
| 453 |
+
msgid "Items"
|
| 454 |
+
msgstr "Položky"
|
| 455 |
+
|
| 456 |
+
#@ redirection
|
| 457 |
+
#: view/admin/module_list.php:18
|
| 458 |
+
msgid "Operations"
|
| 459 |
+
msgstr "Operace"
|
| 460 |
+
|
| 461 |
+
#@ redirection
|
| 462 |
+
#: view/admin/module_list.php:27
|
| 463 |
+
msgid "Note: Hits are dependant on log entries"
|
| 464 |
+
msgstr "Poznámka: Počet zobrazení je vypočítán ze záznamů v logu"
|
| 465 |
+
|
| 466 |
+
#@ redirection
|
| 467 |
+
#: view/admin/module_list.php:29
|
| 468 |
+
msgid "You have no modules defined yet"
|
| 469 |
+
msgstr "Žádné moduly nebyly dosud definovány"
|
| 470 |
+
|
| 471 |
+
#@ redirection
|
| 472 |
+
#: view/admin/module_list.php:34
|
| 473 |
+
msgid "Add Module"
|
| 474 |
+
msgstr "Přidat modul"
|
| 475 |
+
|
| 476 |
+
#@ redirection
|
| 477 |
+
#: view/admin/module_list.php:35
|
| 478 |
+
msgid "A module is a controlling element that determines how redirections are handled. Elements in a WordPress module are handled by WordPress, elements in an Apache module are handled by <code>.htaccess</code>, and elements in a 404 module affect how 404 errors are logged."
|
| 479 |
+
msgstr "Modul je kontrolní prvek, který určuje, jakým způsobem jsou zpracovávány přesměrování. Záznamy v modulu WordPress jsou zpracovány WordPressem, záznamy v modulu Apache zpracovává <code>.htaccess</code>, a záznamy v modulu 404 ovlivní, jak budou zalogovány chyby 404."
|
| 480 |
+
|
| 481 |
+
#@ redirection
|
| 482 |
+
#: view/admin/module_list.php:55
|
| 483 |
+
msgid "Create"
|
| 484 |
+
msgstr "Vytvořit"
|
| 485 |
+
|
| 486 |
+
#@ redirection
|
| 487 |
+
#: view/admin/support.php:5
|
| 488 |
+
msgid "Redirection Support"
|
| 489 |
+
msgstr "Podpora pro Redirection"
|
| 490 |
+
|
| 491 |
+
#@ redirection
|
| 492 |
+
#: view/admin/support.php:9
|
| 493 |
+
msgid "Redirection is free to use - life is wonderful and lovely! However, it has required a great deal of time and effort to develop and if it has been useful you can help support this development by <strong>making a small donation</strong>."
|
| 494 |
+
msgstr "Plugin Redirection je šířen zdarma - život je krásný, autor vás má rád! Nicméně, vývoj vyžaduje hodně času a úsilí... Pokud vám tento plugin připadá užitečný, neostýchejte se podpořit jeho vývoj <strong>drobným příspěvkem.</strong>"
|
| 495 |
+
|
| 496 |
+
#@ redirection
|
| 497 |
+
#: view/admin/support.php:10
|
| 498 |
+
msgid "This will act as an incentive for me to carry on developing, providing countless hours of support, and including new features and suggestions. You get some useful software and I get to carry on making it. Everybody wins."
|
| 499 |
+
msgstr "Drobnou dotací nejen přispějete na další vývoj, ale dáte mi také najevo, že tento plugin má smysl a mám pokračovat v jeho vývoji, podpoře vás, uživatelů, a v přidávání dalších skvělých funkcí. Vy tak získáte užitečný software a já povzbuzení do další práce. A to za to stojí, nemyslíte?"
|
| 500 |
+
|
| 501 |
+
#@ redirection
|
| 502 |
+
#: view/admin/support.php:13
|
| 503 |
+
msgid "If you are using this plugin in a commercial setup, or feel that it's been particularly useful, then you may want to consider a <strong>commercial donation</strong>."
|
| 504 |
+
msgstr "Používáte-li tento plugin ve firemní sféře, nebo máte pocit, že je extrémně užitečný, pak byste možná mohli zvážit <strong>výraznější dotaci za komerční využití.</strong>"
|
| 505 |
+
|
| 506 |
+
#@ redirection
|
| 507 |
+
#: view/admin/support.php:36
|
| 508 |
+
msgid "Individual<br/>Donation"
|
| 509 |
+
msgstr "Individuální<br/>příspěvek"
|
| 510 |
+
|
| 511 |
+
#@ redirection
|
| 512 |
+
#: view/admin/support.php:56
|
| 513 |
+
msgid "Commercial<br/>Donation"
|
| 514 |
+
msgstr "Komerční<br/>příspěvek"
|
| 515 |
+
|
| 516 |
+
#@ redirection
|
| 517 |
+
#: view/admin/support.php:60
|
| 518 |
+
msgid "Translations"
|
| 519 |
+
msgstr "Překlady"
|
| 520 |
+
|
| 521 |
+
#@ redirection
|
| 522 |
+
#: view/admin/support.php:62
|
| 523 |
+
msgid "If you're multi-lingual then you may want to consider donating a translation:"
|
| 524 |
+
msgstr "Pokud hovoříte více jazyky, můžete podpořit další vývoj pluginu jeho přeložením například do těchto jazyků:"
|
| 525 |
+
|
| 526 |
+
#@ redirection
|
| 527 |
+
#: view/admin/support.php:70
|
| 528 |
+
msgid "All translators will have a link to their website placed on the plugin homepage at <a href=\"http://urbangiraffe.com/plugins/redirection/\">UrbanGiraffe</a>, in addition to being an individual supporter."
|
| 529 |
+
msgstr "Všichni překladatelé získají odkaz na své webové stránky na domovské stránce pluginu <a href=\"http://urbangiraffe.com/plugins/redirection/\">UrbanGiraffe</a>. A pochopitelně dobrý pocit z přispění komunitě."
|
| 530 |
+
|
| 531 |
+
#@ redirection
|
| 532 |
+
#: view/admin/support.php:71
|
| 533 |
+
msgid "Full details of producing a translation can be found in this <a href=\"http://urbangiraffe.com/articles/translating-wordpress-themes-and-plugins/\">guide to translating WordPress plugins</a>."
|
| 534 |
+
msgstr "Kompletní postup pro překládání je k dispozici v podobě <a href=\"http://urbangiraffe.com/articles/translating-wordpress-themes-and-plugins/\">příručky pro překlad WordPress pluginů</a> ."
|
| 535 |
+
|
| 536 |
+
#@ redirection
|
| 537 |
+
#: view/admin/options.php:15
|
| 538 |
+
msgid "Auto-generate URL"
|
| 539 |
+
msgstr "Automatické generování URL"
|
| 540 |
+
|
| 541 |
+
#@ redirection
|
| 542 |
+
#: view/admin/options.php:19
|
| 543 |
+
msgid "This will be used to auto-generate a URL if no URL is given. You can use the special tags $dec$ or $hex$ to have a unique ID inserted (either decimal or hex)"
|
| 544 |
+
msgstr "Tato volba je použita pro automatické generování URL v případě, kdy není URL specifikována. Je možné použít speciální tagy $dec$ nebo $hex$ pro vložení unikátního ID do URL (dec - dekadický, hex - šestnáctkový)"
|
| 545 |
+
|
| 546 |
+
#@ redirection
|
| 547 |
+
#: view/admin/options.php:24
|
| 548 |
+
msgid "IP Lookup Service"
|
| 549 |
+
msgstr "Služba pro vyhledávání dle IP"
|
| 550 |
+
|
| 551 |
+
#@ redirection
|
| 552 |
+
#: view/admin/options.php:30
|
| 553 |
+
msgid "Plugin Support"
|
| 554 |
+
msgstr "Podpora pluginu"
|
| 555 |
+
|
| 556 |
+
#@ redirection
|
| 557 |
+
#: view/admin/options.php:33
|
| 558 |
+
msgid "I'm a nice person and I have helped support the author of this plugin"
|
| 559 |
+
msgstr "Jsem milý člověk a podpořil jsem vývoj tohoto pluginu"
|
| 560 |
+
|
| 561 |
+
#@ redirection
|
| 562 |
+
#: view/admin/options.php:37
|
| 563 |
+
msgid "Logging"
|
| 564 |
+
msgstr "Logování"
|
| 565 |
+
|
| 566 |
+
#@ redirection
|
| 567 |
+
#: view/admin/options.php:40
|
| 568 |
+
msgid "log redirected requests"
|
| 569 |
+
msgstr "logovat žádosti o přesměrování"
|
| 570 |
+
|
| 571 |
+
#@ redirection
|
| 572 |
+
#: view/admin/options.php:42
|
| 573 |
+
msgid "log 404 Not Found requests"
|
| 574 |
+
msgstr "logovat požadavky 404 - Nenalezeno"
|
| 575 |
+
|
| 576 |
+
#@ redirection
|
| 577 |
+
#: view/admin/options.php:43
|
| 578 |
+
msgid "Uncheck one or both of these to turn off logging and reduce database load if your redirected URLs are hit very frequently, and/or your site is very busy and pages are often not found."
|
| 579 |
+
msgstr "Zakázáním jedné nebo obou těchto voleb docílíte nižšího zatížení databáze a vyššího výkonu webu. To se hodí zejména u webů, které mají omezené systémové zdroje, velký počet přesměrování a chybných URL či v případech, kdy nepotřebujete záznamy o proběhlých přesměrováních."
|
| 580 |
+
|
| 581 |
+
#@ redirection
|
| 582 |
+
#: view/admin/options.php:47
|
| 583 |
+
msgid "Expire Logs"
|
| 584 |
+
msgstr "Expirace logů"
|
| 585 |
+
|
| 586 |
+
#@ redirection
|
| 587 |
+
#: view/admin/options.php:50
|
| 588 |
+
msgid "days (enter 0 for no expiry)"
|
| 589 |
+
msgstr "dnů (při zadání 0 neexpirují logy nikdy)"
|
| 590 |
+
|
| 591 |
+
#@ redirection
|
| 592 |
+
#: view/admin/options.php:54
|
| 593 |
+
msgid "RSS Token"
|
| 594 |
+
msgstr "RSS Token"
|
| 595 |
+
|
| 596 |
+
#@ redirection
|
| 597 |
+
#: view/admin/options.php:57
|
| 598 |
+
msgid "A unique token allowing feed readers access to Redirection RSS (leave blank to auto-generate)"
|
| 599 |
+
msgstr "Unikátní token umožňující přístup RSS čtečkám k Redirection RSS (ponechte prázdné pro automatické generování)"
|
| 600 |
+
|
| 601 |
+
#@ redirection
|
| 602 |
+
#: view/admin/options.php:62
|
| 603 |
+
msgid "URL Monitoring"
|
| 604 |
+
msgstr "URL Monitoring"
|
| 605 |
+
|
| 606 |
+
#@ redirection
|
| 607 |
+
#: view/admin/options.php:63
|
| 608 |
+
msgid "You can have Redirection detect changes in URLs and have an automatic redirection created in a specific group."
|
| 609 |
+
msgstr "Plugin Redirection může detekovat změny v URL a na jejich základě vytvářet automatická přesměrování pro konkrétní skupiny."
|
| 610 |
+
|
| 611 |
+
#@ redirection
|
| 612 |
+
#: view/admin/options.php:67
|
| 613 |
+
msgid "Post & Page URLs"
|
| 614 |
+
msgstr "URL Příspěvků & Stránek"
|
| 615 |
+
|
| 616 |
+
#@ redirection
|
| 617 |
+
#: view/admin/options.php:70
|
| 618 |
+
#: view/admin/options.php:82
|
| 619 |
+
msgid "Don't monitor"
|
| 620 |
+
msgstr "Nesledovat"
|
| 621 |
+
|
| 622 |
+
#@ redirection
|
| 623 |
+
#: view/admin/options.php:74
|
| 624 |
+
msgid "Monitor new posts"
|
| 625 |
+
msgstr "Sledovat nové příspěvky"
|
| 626 |
+
|
| 627 |
+
#@ redirection
|
| 628 |
+
#: view/admin/options.php:79
|
| 629 |
+
msgid "Category URLs"
|
| 630 |
+
msgstr "URL kategorií"
|
| 631 |
+
|
| 632 |
+
#@ redirection
|
| 633 |
+
#: view/admin/options.php:89
|
| 634 |
+
msgid "Update"
|
| 635 |
+
msgstr "Aktualizovat"
|
| 636 |
+
|
| 637 |
+
#@ redirection
|
| 638 |
+
#: view/admin/options.php:95
|
| 639 |
+
msgid "Import"
|
| 640 |
+
msgstr "Import"
|
| 641 |
+
|
| 642 |
+
#@ redirection
|
| 643 |
+
#: view/admin/options.php:97
|
| 644 |
+
msgid "Here you can import redirections from an existing .htaccess file, a CSV file, or a Redirection XML."
|
| 645 |
+
msgstr "Složí k importu přesměrování z existujícího souboru .htaccess, CSV souboru nebo z XML exportu pluginu Redirection."
|
| 646 |
+
|
| 647 |
+
#@ redirection
|
| 648 |
+
#: view/admin/options.php:104
|
| 649 |
+
msgid "Import into"
|
| 650 |
+
msgstr "Importovat do"
|
| 651 |
+
|
| 652 |
+
#@ redirection
|
| 653 |
+
#: view/admin/options.php:107
|
| 654 |
+
msgid "Upload"
|
| 655 |
+
msgstr "Nahrát"
|
| 656 |
+
|
| 657 |
+
#@ redirection
|
| 658 |
+
#: view/admin/options.php:110
|
| 659 |
+
msgid "Note that the group is ignored when uploading an XML file."
|
| 660 |
+
msgstr "Poznámka: Nastavení Skupiny je při nahrání XML souboru ignorováno."
|
| 661 |
+
|
| 662 |
+
#@ redirection
|
| 663 |
+
#: view/admin/options.php:114
|
| 664 |
+
msgid "Delete Redirection"
|
| 665 |
+
msgstr "Odstranit plugin Redirection"
|
| 666 |
+
|
| 667 |
+
#@ redirection
|
| 668 |
+
#: view/admin/options.php:115
|
| 669 |
+
msgid "Selecting this option will delete all redirections, all logs, and any options associated with the Redirection plugin. Make sure this is what you want to do."
|
| 670 |
+
msgstr "Výběrem této možnosti dojde k odstranění všech přesměrování, logů a všech nastavení, spojených s pluginem Redirection. Tyto změny není možné vzít zpět, ujistěte se, že víte, co děláte."
|
| 671 |
+
|
| 672 |
+
#@ redirection
|
| 673 |
+
#: view/admin/group_edit.php:10
|
| 674 |
+
msgid "Tracked"
|
| 675 |
+
msgstr "Sledování"
|
| 676 |
+
|
| 677 |
+
#@ redirection
|
| 678 |
+
#: view/admin/group_edit.php:11
|
| 679 |
+
msgid "Whether to track 'hits' to items"
|
| 680 |
+
msgstr "Sledovat 'hits' (použití) položek"
|
| 681 |
+
|
| 682 |
+
#@ redirection
|
| 683 |
+
#: view/admin/group_edit.php:14
|
| 684 |
+
msgid "Enabled"
|
| 685 |
+
msgstr "Povoleno"
|
| 686 |
+
|
| 687 |
+
#@ redirection
|
| 688 |
+
#: view/admin/group_edit.php:15
|
| 689 |
+
msgid "Disabling a group will disable all items contained within it"
|
| 690 |
+
msgstr "Zakázání skupiny současně zakáže všechny její položky"
|
| 691 |
+
|
| 692 |
+
#@ redirection
|
| 693 |
+
#: modules/404.php:37
|
| 694 |
+
msgid "Log 404s"
|
| 695 |
+
msgstr "Logovat chyby 404"
|
| 696 |
+
|
| 697 |
+
#@ redirection
|
| 698 |
+
#: modules/404.php:46
|
| 699 |
+
#: modules/wordpress.php:121
|
| 700 |
+
msgid "<strong>Disabled: You must enable <a href=\"options-permalink.php\">permalinks</a> before using this</strong>"
|
| 701 |
+
msgstr "<strong>Plugin neaktivní: nejprve musíte povolit <a href=\\\"options-permalink.php\\\">trvalé odkazy</a></strong>"
|
| 702 |
+
|
| 703 |
+
#@ redirection
|
| 704 |
+
#: modules/404.php:57
|
| 705 |
+
msgid "<small>No options have been set</small>"
|
| 706 |
+
msgstr "<small>Nic nebylo nastaveno</small>"
|
| 707 |
+
|
| 708 |
+
#@ redirection
|
| 709 |
+
#: modules/apache.php:77
|
| 710 |
+
msgid "Location"
|
| 711 |
+
msgstr "Umístění"
|
| 712 |
+
|
| 713 |
+
#@ redirection
|
| 714 |
+
#: modules/apache.php:82
|
| 715 |
+
#, php-format
|
| 716 |
+
msgid "WordPress is installed in: <code>%s</code>"
|
| 717 |
+
msgstr "WordPress je nainstalován v: <code>%s</code>"
|
| 718 |
+
|
| 719 |
+
#@ redirection
|
| 720 |
+
#: modules/apache.php:87
|
| 721 |
+
msgid "Canonical"
|
| 722 |
+
msgstr "Kanonizace"
|
| 723 |
+
|
| 724 |
+
#@ redirection
|
| 725 |
+
#: modules/apache.php:90
|
| 726 |
+
#: modules/apache.php:96
|
| 727 |
+
msgid "Leave as is"
|
| 728 |
+
msgstr "Beze změny"
|
| 729 |
+
|
| 730 |
+
#@ redirection
|
| 731 |
+
#: modules/apache.php:90
|
| 732 |
+
#, php-format
|
| 733 |
+
msgid "Strip WWW (%s)"
|
| 734 |
+
msgstr "Odebrat WWW (%s)"
|
| 735 |
+
|
| 736 |
+
#@ redirection
|
| 737 |
+
#: modules/apache.php:90
|
| 738 |
+
#, php-format
|
| 739 |
+
msgid "Force WWW (www.%s)"
|
| 740 |
+
msgstr "Vždy přidat WWW (www.%s)"
|
| 741 |
+
|
| 742 |
+
#@ redirection
|
| 743 |
+
#: modules/apache.php:94
|
| 744 |
+
msgid "Strip Index"
|
| 745 |
+
msgstr "Odebrat Index"
|
| 746 |
+
|
| 747 |
+
#@ redirection
|
| 748 |
+
#: modules/apache.php:96
|
| 749 |
+
msgid "Strip index files (html,php)"
|
| 750 |
+
msgstr "Odebrat soubory index (html,php)"
|
| 751 |
+
|
| 752 |
+
#@ redirection
|
| 753 |
+
#: modules/apache.php:101
|
| 754 |
+
msgid "Memory Limit"
|
| 755 |
+
msgstr "Memory Limit"
|
| 756 |
+
|
| 757 |
+
#@ redirection
|
| 758 |
+
#: modules/apache.php:104
|
| 759 |
+
#: modules/apache.php:109
|
| 760 |
+
msgid "Server default"
|
| 761 |
+
msgstr "Server default"
|
| 762 |
+
|
| 763 |
+
#@ redirection
|
| 764 |
+
#: modules/apache.php:107
|
| 765 |
+
msgid "Error Level"
|
| 766 |
+
msgstr "Error Level"
|
| 767 |
+
|
| 768 |
+
#@ redirection
|
| 769 |
+
#: modules/apache.php:109
|
| 770 |
+
msgid "No errors"
|
| 771 |
+
msgstr "No errors"
|
| 772 |
+
|
| 773 |
+
#@ redirection
|
| 774 |
+
#: modules/apache.php:109
|
| 775 |
+
msgid "Show errors"
|
| 776 |
+
msgstr "Show errors"
|
| 777 |
+
|
| 778 |
+
#@ redirection
|
| 779 |
+
#: modules/apache.php:114
|
| 780 |
+
msgid "Ban IPs"
|
| 781 |
+
msgstr "Zakázané IP"
|
| 782 |
+
|
| 783 |
+
#@ redirection
|
| 784 |
+
#: modules/apache.php:120
|
| 785 |
+
msgid "Allow IPs"
|
| 786 |
+
msgstr "Povolené IP"
|
| 787 |
+
|
| 788 |
+
#@ redirection
|
| 789 |
+
#: modules/apache.php:126
|
| 790 |
+
msgid "Raw .htaccess"
|
| 791 |
+
msgstr "Raw .htaccess"
|
| 792 |
+
|
| 793 |
+
#@ redirection
|
| 794 |
+
#: modules/apache.php:132
|
| 795 |
+
msgid "Site URL"
|
| 796 |
+
msgstr "URL webu"
|
| 797 |
+
|
| 798 |
+
#@ redirection
|
| 799 |
+
#: modules/apache.php:135
|
| 800 |
+
msgid "Advanced: For management of external sites"
|
| 801 |
+
msgstr "Pokročilé: Pro správu externích webů"
|
| 802 |
+
|
| 803 |
+
#@ redirection
|
| 804 |
+
#: modules/apache.php:150
|
| 805 |
+
msgid "<strong>Location is invalid - check that path exists</strong>"
|
| 806 |
+
msgstr "<strong>Umístění je chybné - zkontrolujte zadanou cestu</strong>"
|
| 807 |
+
|
| 808 |
+
#@ redirection
|
| 809 |
+
#: modules/apache.php:156
|
| 810 |
+
msgid "<strong>Could not write to configured <code>.htaccess</code> file - check file permissions</strong>"
|
| 811 |
+
msgstr "<strong>Nelze zapisovat do <code>.htaccess</code> souboru - zkontrolujte přístupová oprávnění</strong>"
|
| 812 |
+
|
| 813 |
+
#@ redirection
|
| 814 |
+
#: modules/apache.php:163
|
| 815 |
+
msgid "<strong>Disabled: enter the location of an <code>.htaccess</code> file for this to be valid</strong>"
|
| 816 |
+
msgstr "<strong>Zakázáno: Je potřeba zadat správné umístění souboru <code>.htaccess</code></strong>"
|
| 817 |
+
|
| 818 |
+
#@ redirection
|
| 819 |
+
#: modules/apache.php:168
|
| 820 |
+
msgid "strip WWW"
|
| 821 |
+
msgstr "odstranit WWW"
|
| 822 |
+
|
| 823 |
+
#@ redirection
|
| 824 |
+
#: modules/apache.php:168
|
| 825 |
+
msgid "force WWW"
|
| 826 |
+
msgstr "vždy použít WWW"
|
| 827 |
+
|
| 828 |
+
#@ redirection
|
| 829 |
+
#: modules/apache.php:171
|
| 830 |
+
msgid "strip index"
|
| 831 |
+
msgstr "odstranit index"
|
| 832 |
+
|
| 833 |
+
#@ redirection
|
| 834 |
+
#: modules/apache.php:174
|
| 835 |
+
#, php-format
|
| 836 |
+
msgid "memory limit at %dMB"
|
| 837 |
+
msgstr "memory limit - %dMB"
|
| 838 |
+
|
| 839 |
+
#@ redirection
|
| 840 |
+
#: modules/apache.php:177
|
| 841 |
+
msgid "no errors"
|
| 842 |
+
msgstr "nezobrazovat chyby"
|
| 843 |
+
|
| 844 |
+
#@ redirection
|
| 845 |
+
#: modules/apache.php:177
|
| 846 |
+
msgid "show errors"
|
| 847 |
+
msgstr "zobrazovat chyby"
|
| 848 |
+
|
| 849 |
+
#@ redirection
|
| 850 |
+
#: modules/apache.php:180
|
| 851 |
+
msgid "IPs are banned"
|
| 852 |
+
msgstr "IP adresy jsou zakázány"
|
| 853 |
+
|
| 854 |
+
#@ redirection
|
| 855 |
+
#: modules/apache.php:183
|
| 856 |
+
msgid "IPs are allowed"
|
| 857 |
+
msgstr "IP adresy jsou povoleny"
|
| 858 |
+
|
| 859 |
+
#@ redirection
|
| 860 |
+
#: models/redirect.php:386
|
| 861 |
+
msgid "Redirect to URL"
|
| 862 |
+
msgstr "Přesměrovat na URL"
|
| 863 |
+
|
| 864 |
+
#@ redirection
|
| 865 |
+
#: models/redirect.php:387
|
| 866 |
+
msgid "Redirect to random post"
|
| 867 |
+
msgstr "Přesměrovat na náhodný příspěvek"
|
| 868 |
+
|
| 869 |
+
#@ redirection
|
| 870 |
+
#: models/redirect.php:388
|
| 871 |
+
msgid "Pass-through"
|
| 872 |
+
msgstr "Pass-through"
|
| 873 |
+
|
| 874 |
+
#@ redirection
|
| 875 |
+
#: models/redirect.php:389
|
| 876 |
+
msgid "Error (404)"
|
| 877 |
+
msgstr "Chyba (404)"
|
| 878 |
+
|
| 879 |
+
#@ redirection
|
| 880 |
+
#: models/redirect.php:390
|
| 881 |
+
msgid "Do nothing"
|
| 882 |
+
msgstr "Nedělat nic"
|
| 883 |
+
|
| 884 |
+
#@ redirection
|
| 885 |
+
#: models/database.php:94
|
| 886 |
+
#: models/module.php:161
|
| 887 |
+
msgid "WordPress"
|
| 888 |
+
msgstr "WordPress"
|
| 889 |
+
|
| 890 |
+
#@ redirection
|
| 891 |
+
#: models/module.php:162
|
| 892 |
+
msgid "404 Errors"
|
| 893 |
+
msgstr "chyby 404"
|
| 894 |
+
|
| 895 |
+
#@ redirection
|
| 896 |
+
#: models/module.php:187
|
| 897 |
+
msgid "Strip WWW"
|
| 898 |
+
msgstr "Odebrat WWW"
|
| 899 |
+
|
| 900 |
+
#@ redirection
|
| 901 |
+
#: models/module.php:187
|
| 902 |
+
msgid "Force WWW"
|
| 903 |
+
msgstr "Vždy použít WWW"
|
| 904 |
+
|
| 905 |
+
#@ redirection
|
| 906 |
+
#: models/module.php:192
|
| 907 |
+
msgid "Strip index.php"
|
| 908 |
+
msgstr "Odebrat index.php"
|
| 909 |
+
|
| 910 |
+
#@ redirection
|
| 911 |
+
#: models/database.php:96
|
| 912 |
+
msgid "404"
|
| 913 |
+
msgstr "404"
|
| 914 |
+
|
| 915 |
+
#@ default
|
| 916 |
+
#: models/database.php:101
|
| 917 |
+
msgid "Redirections"
|
| 918 |
+
msgstr "Redirections"
|
| 919 |
+
|
| 920 |
+
#@ default
|
| 921 |
+
#: models/database.php:102
|
| 922 |
+
msgid "Modified Posts"
|
| 923 |
+
msgstr "Upravené příspěvky"
|
| 924 |
+
|
| 925 |
+
#@ redirection
|
| 926 |
+
#: models/pager.php:404
|
| 927 |
+
msgid "Previous"
|
| 928 |
+
msgstr "Předchozí"
|
| 929 |
+
|
| 930 |
+
#@ redirection
|
| 931 |
+
#: models/pager.php:405
|
| 932 |
+
msgid "Next"
|
| 933 |
+
msgstr "Další"
|
| 934 |
+
|
| 935 |
+
#@ redirection
|
| 936 |
+
#: models/pager.php:463
|
| 937 |
+
#, php-format
|
| 938 |
+
msgid "%d per-page"
|
| 939 |
+
msgstr "%d na stránku"
|
| 940 |
+
|
| 941 |
+
#@ default
|
| 942 |
+
#: models/pager.php:472
|
| 943 |
+
#, php-format
|
| 944 |
+
msgid "Displaying %s–%s of %s"
|
| 945 |
+
msgstr "Zobrazuje se %s–%s z %s"
|
| 946 |
+
|
| 947 |
+
#@ redirection
|
| 948 |
+
#: models/group.php:194
|
| 949 |
+
msgid "Yes"
|
| 950 |
+
msgstr "Ano"
|
| 951 |
+
|
| 952 |
+
#@ redirection
|
| 953 |
+
#: models/group.php:195
|
| 954 |
+
msgid "No"
|
| 955 |
+
msgstr "Ne"
|
| 956 |
+
|
| 957 |
+
#@ redirection
|
| 958 |
+
#: ajax.php:370
|
| 959 |
+
msgid "Sorry, but your redirection was not created"
|
| 960 |
+
msgstr "Přesměrování nebylo vytvořeno"
|
| 961 |
+
|
| 962 |
+
#@ redirection
|
| 963 |
+
#: redirection.php:94
|
| 964 |
+
msgid "Settings"
|
| 965 |
+
msgstr "Nastavení"
|
| 966 |
+
|
| 967 |
+
#@ redirection
|
| 968 |
+
#: redirection.php:112
|
| 969 |
+
msgid "Please wait..."
|
| 970 |
+
msgstr "Čekejte prosím ..."
|
| 971 |
+
|
| 972 |
+
#@ redirection
|
| 973 |
+
#: redirection.php:121
|
| 974 |
+
msgid "Redirection"
|
| 975 |
+
msgstr "Redirection"
|
| 976 |
+
|
| 977 |
+
#@ redirection
|
| 978 |
+
#: redirection.php:159
|
| 979 |
+
msgid "Your module was successfully created"
|
| 980 |
+
msgstr "Modul byl úspěšně vytvořen"
|
| 981 |
+
|
| 982 |
+
#@ redirection
|
| 983 |
+
#: redirection.php:163
|
| 984 |
+
msgid "Your module was not created - did you provide a name?"
|
| 985 |
+
msgstr "Modul nebyl vytvořen - nezapomněli jste zadat název?"
|
| 986 |
+
|
| 987 |
+
#@ redirection
|
| 988 |
+
#: redirection.php:228
|
| 989 |
+
msgid "Your options were updated"
|
| 990 |
+
msgstr "Nastavení aktualizováno"
|
| 991 |
+
|
| 992 |
+
#@ redirection
|
| 993 |
+
#: redirection.php:236
|
| 994 |
+
msgid "Redirection data has been deleted and the plugin disabled"
|
| 995 |
+
msgstr "Data pluginu Redirection byla odstraněna a plugin byl deaktivován"
|
| 996 |
+
|
| 997 |
+
#@ redirection
|
| 998 |
+
#: redirection.php:246
|
| 999 |
+
#, php-format
|
| 1000 |
+
msgid "%d redirection was successfully imported"
|
| 1001 |
+
msgid_plural "%d redirections were successfully imported"
|
| 1002 |
+
msgstr[0] "%d přesměrování bylo úspěšně importováno"
|
| 1003 |
+
msgstr[1] "%d přesměrování byla úspěšně importována"
|
| 1004 |
+
msgstr[2] "%d přesměrování bylo úspěšně importováno"
|
| 1005 |
+
|
| 1006 |
+
#@ redirection
|
| 1007 |
+
#: redirection.php:248
|
| 1008 |
+
msgid "No items were imported"
|
| 1009 |
+
msgstr "Žádné položky nebyly importovány"
|
| 1010 |
+
|
| 1011 |
+
#@ redirection
|
| 1012 |
+
#: redirection.php:266
|
| 1013 |
+
msgid "Your logs have been deleted"
|
| 1014 |
+
msgstr "Vaše logy byly smazány"
|
| 1015 |
+
|
| 1016 |
+
#@ redirection
|
| 1017 |
+
#: redirection.php:289
|
| 1018 |
+
msgid "Your group was added successfully"
|
| 1019 |
+
msgstr "Skupina byla úspěšně přidána"
|
| 1020 |
+
|
| 1021 |
+
#@ redirection
|
| 1022 |
+
#: redirection.php:293
|
| 1023 |
+
msgid "Please specify a group name"
|
| 1024 |
+
msgstr "Zadejte prosím název skupiny"
|
| 1025 |
+
|
| 1026 |
+
#@ default
|
| 1027 |
+
#: redirection.php:330
|
| 1028 |
+
msgid "Redirection is available in"
|
| 1029 |
+
msgstr "Redirection je k dispozici v"
|
| 1030 |
+
|
| 1031 |
+
#@ redirection
|
| 1032 |
+
#: matches/url.php:25
|
| 1033 |
+
msgid "URL only"
|
| 1034 |
+
msgstr "pouze URL"
|
| 1035 |
+
|
| 1036 |
+
#@ redirection
|
| 1037 |
+
#: matches/referrer.php:47
|
| 1038 |
+
#: matches/url.php:40
|
| 1039 |
+
#: matches/user_agent.php:55
|
| 1040 |
+
msgid "HTTP Code"
|
| 1041 |
+
msgstr "HTTP kód"
|
| 1042 |
+
|
| 1043 |
+
#@ redirection
|
| 1044 |
+
#: matches/login.php:25
|
| 1045 |
+
msgid "URL and login status"
|
| 1046 |
+
msgstr "URL a přihlášení"
|
| 1047 |
+
|
| 1048 |
+
#@ redirection
|
| 1049 |
+
#: matches/login.php:33
|
| 1050 |
+
msgid "The target URL will be chosen from one of the following URLs, depending if the user is logged in or out. Leaving a URL blank means that the user is not redirected."
|
| 1051 |
+
msgstr "Cílová URL bude vybírána z následujících URL - v závislosti na tom, zda je uživatel přihlášen nebo ne. Prázdné pole pro URL znamená, že k přesměrování nedojde"
|
| 1052 |
+
|
| 1053 |
+
#@ redirection
|
| 1054 |
+
#: matches/login.php:39
|
| 1055 |
+
#: matches/login.php:41
|
| 1056 |
+
msgid "Logged In"
|
| 1057 |
+
msgstr "Přihlášený"
|
| 1058 |
+
|
| 1059 |
+
#@ redirection
|
| 1060 |
+
#: matches/login.php:51
|
| 1061 |
+
#: matches/login.php:53
|
| 1062 |
+
msgid "Logged Out"
|
| 1063 |
+
msgstr "Odhlášený"
|
| 1064 |
+
|
| 1065 |
+
#@ redirection
|
| 1066 |
+
#: matches/user_agent.php:27
|
| 1067 |
+
msgid "URL and user agent"
|
| 1068 |
+
msgstr "URL a user agent"
|
| 1069 |
+
|
| 1070 |
+
#@ redirection
|
| 1071 |
+
#: matches/user_agent.php:32
|
| 1072 |
+
msgid "FeedBurner"
|
| 1073 |
+
msgstr "FeedBurner"
|
| 1074 |
+
|
| 1075 |
+
#@ redirection
|
| 1076 |
+
#: matches/user_agent.php:33
|
| 1077 |
+
msgid "Internet Explorer"
|
| 1078 |
+
msgstr "Internet Explorer"
|
| 1079 |
+
|
| 1080 |
+
#@ redirection
|
| 1081 |
+
#: matches/user_agent.php:34
|
| 1082 |
+
msgid "FireFox"
|
| 1083 |
+
msgstr "FireFox"
|
| 1084 |
+
|
| 1085 |
+
#@ redirection
|
| 1086 |
+
#: matches/user_agent.php:35
|
| 1087 |
+
msgid "Opera"
|
| 1088 |
+
msgstr "Opera"
|
| 1089 |
+
|
| 1090 |
+
#@ redirection
|
| 1091 |
+
#: matches/user_agent.php:36
|
| 1092 |
+
msgid "Safari"
|
| 1093 |
+
msgstr "Safari"
|
| 1094 |
+
|
| 1095 |
+
#@ redirection
|
| 1096 |
+
#: matches/user_agent.php:37
|
| 1097 |
+
msgid "iPhone"
|
| 1098 |
+
msgstr "iPhone"
|
| 1099 |
+
|
| 1100 |
+
#@ redirection
|
| 1101 |
+
#: matches/user_agent.php:38
|
| 1102 |
+
msgid "Nintendo Wii"
|
| 1103 |
+
msgstr "Nintendo Wii"
|
| 1104 |
+
|
| 1105 |
+
#@ redirection
|
| 1106 |
+
#: matches/user_agent.php:66
|
| 1107 |
+
msgid "The visitor will be redirected from the source URL if the user agent matches. You can specify a <em>matched</em> target URL as the address to send visitors if they do match, and <em>not matched</em> if they don't match. Leaving a URL blank means that the visitor is not redirected. <strong>All matches are performed as regular expressions</strong>.\n"
|
| 1108 |
+
msgstr "Návštěvník bude přesměrován ze zdrojové URL, pokud odpovídá jeho identifikace User Agent. Lze nastavit cílové URL pro <em>shodu</em> parametru User Agent a další URL pro ostatní případy - <em>neshoduje se</em>. Ponechání prázdné URL znamená, že návštěvník nebude přesměrován. <strong>Poznámka: ve všech případech je použit regulární výraz - verze a revize nejsou brány v potaz.</strong>\n"
|
| 1109 |
+
|
| 1110 |
+
#@ redirection
|
| 1111 |
+
#: matches/referrer.php:63
|
| 1112 |
+
#: matches/referrer.php:65
|
| 1113 |
+
#: matches/user_agent.php:73
|
| 1114 |
+
#: matches/user_agent.php:75
|
| 1115 |
+
msgid "Matched"
|
| 1116 |
+
msgstr "Shoda"
|
| 1117 |
+
|
| 1118 |
+
#@ redirection
|
| 1119 |
+
#: matches/referrer.php:73
|
| 1120 |
+
#: matches/referrer.php:75
|
| 1121 |
+
#: matches/user_agent.php:83
|
| 1122 |
+
#: matches/user_agent.php:85
|
| 1123 |
+
msgid "Not matched"
|
| 1124 |
+
msgstr "Neshoduje se"
|
| 1125 |
+
|
| 1126 |
+
#@ redirection
|
| 1127 |
+
#: matches/referrer.php:28
|
| 1128 |
+
msgid "URL and referrer"
|
| 1129 |
+
msgstr "URL a referrer"
|
| 1130 |
+
|
| 1131 |
+
#@ redirection
|
| 1132 |
+
#: matches/referrer.php:57
|
| 1133 |
+
msgid "The visitor will be redirected from the source URL if the referrer matches. You can specify a <em>matched</em> target URL as the address to send visitors if they do match, and <em>not matched</em> if they don't match. Leaving a URL blank means that the visitor is not redirected."
|
| 1134 |
+
msgstr "Návštěvník bude přesměrován ze zdrojové URL, pokud přichází z konkrétní URL (referrer). Lze nastavit cílové URL pro <em>shodu</em> parametru referrer a další URL pro ostatní případy - <em>neshoduje se</em>. Ponechání prázdné URL znamená, že návštěvník nebude přesměrován."
|
| 1135 |
+
|
locale/lt_LT.mo
ADDED
|
Binary file
|
locale/lt_LT.po
ADDED
|
@@ -0,0 +1,928 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (C) 2010 Redirection
|
| 2 |
+
# This file is distributed under the same license as the Redirection package.
|
| 3 |
+
msgid ""
|
| 4 |
+
msgstr ""
|
| 5 |
+
"Project-Id-Version: Redirection 2.2.5\n"
|
| 6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/redirection\n"
|
| 7 |
+
"POT-Creation-Date: 2011-07-17 10:14:58+00:00\n"
|
| 8 |
+
"MIME-Version: 1.0\n"
|
| 9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
| 10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
| 11 |
+
"PO-Revision-Date: 2011-08-31 00:43+0200\n"
|
| 12 |
+
"Last-Translator: Тарас Данилюк <nikman851@gmail.com>\n"
|
| 13 |
+
"Language-Team: Nata Strazda <nata.strazda@gmail.com>\n"
|
| 14 |
+
"X-Poedit-Language: Lithuanian\n"
|
| 15 |
+
"X-Poedit-Country: LITHUANIA\n"
|
| 16 |
+
|
| 17 |
+
#: fileio/csv.php:21
|
| 18 |
+
msgid "module_%d.csv"
|
| 19 |
+
msgstr "module_%d.csv"
|
| 20 |
+
|
| 21 |
+
#: fileio/xml.php:32
|
| 22 |
+
msgid "module_%d.xml"
|
| 23 |
+
msgstr "module_%d.xml"
|
| 24 |
+
|
| 25 |
+
#: fileio/xml.php:105
|
| 26 |
+
msgid "%s imported on %s at %s"
|
| 27 |
+
msgstr "%s imported on %s at %s"
|
| 28 |
+
|
| 29 |
+
#: fileio/xml.php:168
|
| 30 |
+
msgid "XML importing is only available with PHP5 - you have PHP4."
|
| 31 |
+
msgstr "XML importuoti tik su PHP5 turite PHP4."
|
| 32 |
+
|
| 33 |
+
#: view/admin/group_list.php:6
|
| 34 |
+
msgid "Groups for module"
|
| 35 |
+
msgstr "Už modulio grupės"
|
| 36 |
+
|
| 37 |
+
#: view/admin/group_list.php:16
|
| 38 |
+
#: view/admin/log.php:38
|
| 39 |
+
msgid "Module"
|
| 40 |
+
msgstr "modulio "
|
| 41 |
+
|
| 42 |
+
#: view/admin/group_list.php:21
|
| 43 |
+
#: view/admin/log.php:16
|
| 44 |
+
#: view/admin/log.php:23
|
| 45 |
+
#: view/admin/item_list.php:29
|
| 46 |
+
msgid "Search"
|
| 47 |
+
msgstr "paieška"
|
| 48 |
+
|
| 49 |
+
#: view/admin/group_list.php:26
|
| 50 |
+
msgid "go"
|
| 51 |
+
msgstr "eiti"
|
| 52 |
+
|
| 53 |
+
#: view/admin/group_list.php:36
|
| 54 |
+
#: view/admin/item_list.php:42
|
| 55 |
+
#: view/admin/module_list.php:17
|
| 56 |
+
msgid "Hits"
|
| 57 |
+
msgstr "Hitai"
|
| 58 |
+
|
| 59 |
+
#: view/admin/group_list.php:37
|
| 60 |
+
#: view/admin/group_list.php:100
|
| 61 |
+
#: view/admin/module_edit.php:18
|
| 62 |
+
#: view/admin/module_list.php:42
|
| 63 |
+
#: view/admin/group_edit.php:6
|
| 64 |
+
msgid "Name"
|
| 65 |
+
msgstr "pavadinimas"
|
| 66 |
+
|
| 67 |
+
#: view/admin/group_list.php:59
|
| 68 |
+
#: view/admin/item_list.php:67
|
| 69 |
+
msgid "Select All"
|
| 70 |
+
msgstr "Žymėti viską"
|
| 71 |
+
|
| 72 |
+
#: view/admin/group_list.php:60
|
| 73 |
+
#: view/admin/item_list.php:68
|
| 74 |
+
msgid "Toggle"
|
| 75 |
+
msgstr "perjungti"
|
| 76 |
+
|
| 77 |
+
#: view/admin/group_list.php:61
|
| 78 |
+
#: view/admin/item_list.php:69
|
| 79 |
+
msgid "Reset Hits"
|
| 80 |
+
msgstr "Atstatyti Hitai"
|
| 81 |
+
|
| 82 |
+
#: view/admin/group_list.php:62
|
| 83 |
+
#: view/admin/log.php:30
|
| 84 |
+
#: view/admin/item_list.php:70
|
| 85 |
+
#: view/admin/options.php:120
|
| 86 |
+
msgid "Delete"
|
| 87 |
+
msgstr "panaikinti"
|
| 88 |
+
|
| 89 |
+
#: view/admin/group_list.php:64
|
| 90 |
+
#: view/admin/item_list.php:72
|
| 91 |
+
msgid "Move To"
|
| 92 |
+
msgstr "perkelti į"
|
| 93 |
+
|
| 94 |
+
#: view/admin/group_list.php:69
|
| 95 |
+
#: view/admin/item_list.php:34
|
| 96 |
+
#: view/admin/item_list.php:77
|
| 97 |
+
msgid "Go"
|
| 98 |
+
msgstr "eiti"
|
| 99 |
+
|
| 100 |
+
#: view/admin/group_list.php:75
|
| 101 |
+
#: view/admin/item_list.php:83
|
| 102 |
+
msgid "re-order"
|
| 103 |
+
msgstr "užsakymą"
|
| 104 |
+
|
| 105 |
+
#: view/admin/group_list.php:76
|
| 106 |
+
#: view/admin/item_list.php:84
|
| 107 |
+
msgid "save order"
|
| 108 |
+
msgstr "išsaugoti, kad"
|
| 109 |
+
|
| 110 |
+
#: view/admin/group_list.php:89
|
| 111 |
+
msgid "You have no groups in this module."
|
| 112 |
+
msgstr "Jūs neturite šiame modulyje grupių"
|
| 113 |
+
|
| 114 |
+
#: view/admin/group_list.php:94
|
| 115 |
+
msgid "Add Group"
|
| 116 |
+
msgstr "Pridėti grupę"
|
| 117 |
+
|
| 118 |
+
#: view/admin/group_list.php:105
|
| 119 |
+
msgid "Add"
|
| 120 |
+
msgstr "Pridėti grupę"
|
| 121 |
+
|
| 122 |
+
#: view/admin/group_list.php:117
|
| 123 |
+
#: view/admin/log.php:112
|
| 124 |
+
#: view/admin/item_list.php:112
|
| 125 |
+
#: redirection.php:116
|
| 126 |
+
msgid "No items have been selected"
|
| 127 |
+
msgstr "Nėra elementų, buvo atrinkti"
|
| 128 |
+
|
| 129 |
+
#: view/admin/group_list.php:118
|
| 130 |
+
#: view/admin/log.php:113
|
| 131 |
+
#: view/admin/item_list.php:113
|
| 132 |
+
#: redirection.php:115
|
| 133 |
+
msgid "Are you sure?"
|
| 134 |
+
msgstr "Ar tikrai?"
|
| 135 |
+
|
| 136 |
+
#: view/admin/submenu.php:6
|
| 137 |
+
msgid "Redirects"
|
| 138 |
+
msgstr "nukreipimus"
|
| 139 |
+
|
| 140 |
+
#: view/admin/submenu.php:11
|
| 141 |
+
#: view/admin/module_list.php:15
|
| 142 |
+
msgid "Groups"
|
| 143 |
+
msgstr "grupės"
|
| 144 |
+
|
| 145 |
+
#: view/admin/submenu.php:16
|
| 146 |
+
#: view/admin/module_list.php:6
|
| 147 |
+
msgid "Modules"
|
| 148 |
+
msgstr "moduliai"
|
| 149 |
+
|
| 150 |
+
#: view/admin/submenu.php:21
|
| 151 |
+
msgid "Log"
|
| 152 |
+
msgstr "Prisijungti"
|
| 153 |
+
|
| 154 |
+
#: view/admin/submenu.php:26
|
| 155 |
+
#: view/admin/options.php:6
|
| 156 |
+
msgid "Options"
|
| 157 |
+
msgstr "parinktys"
|
| 158 |
+
|
| 159 |
+
#: view/admin/submenu.php:31
|
| 160 |
+
msgid "Support"
|
| 161 |
+
msgstr "parama"
|
| 162 |
+
|
| 163 |
+
#: view/admin/module_item.php:23
|
| 164 |
+
msgid "View as"
|
| 165 |
+
msgstr "Žiūrėti kaip"
|
| 166 |
+
|
| 167 |
+
#: view/admin/module_item.php:25
|
| 168 |
+
msgid "CSV"
|
| 169 |
+
msgstr "CSV"
|
| 170 |
+
|
| 171 |
+
#: view/admin/module_item.php:26
|
| 172 |
+
msgid "XML"
|
| 173 |
+
msgstr "XML"
|
| 174 |
+
|
| 175 |
+
#: view/admin/module_item.php:27
|
| 176 |
+
#: models/module.php:160
|
| 177 |
+
#: models/database.php:95
|
| 178 |
+
msgid "Apache"
|
| 179 |
+
msgstr "Apache"
|
| 180 |
+
|
| 181 |
+
#: view/admin/module_item.php:28
|
| 182 |
+
msgid "RSS"
|
| 183 |
+
msgstr "RSS"
|
| 184 |
+
|
| 185 |
+
#: view/admin/module_item.php:41
|
| 186 |
+
msgid "edit"
|
| 187 |
+
msgstr "redaguoti"
|
| 188 |
+
|
| 189 |
+
#: view/admin/module_item.php:43
|
| 190 |
+
msgid "delete"
|
| 191 |
+
msgstr "panaikinti"
|
| 192 |
+
|
| 193 |
+
#: view/admin/module_item.php:45
|
| 194 |
+
msgid "reset"
|
| 195 |
+
msgstr "iš naujo"
|
| 196 |
+
|
| 197 |
+
#: view/admin/log.php:6
|
| 198 |
+
msgid "Redirection Log"
|
| 199 |
+
msgstr "Nukreipiama Prisijungti"
|
| 200 |
+
|
| 201 |
+
#: view/admin/log.php:29
|
| 202 |
+
msgid "Bulk Actions"
|
| 203 |
+
msgstr "Tūrinės veiksmai"
|
| 204 |
+
|
| 205 |
+
#: view/admin/log.php:33
|
| 206 |
+
msgid "Apply"
|
| 207 |
+
msgstr "taikyti"
|
| 208 |
+
|
| 209 |
+
#: view/admin/log.php:43
|
| 210 |
+
#: view/admin/item_list.php:24
|
| 211 |
+
#: view/admin/add.php:36
|
| 212 |
+
msgid "Group"
|
| 213 |
+
msgstr "grupė"
|
| 214 |
+
|
| 215 |
+
#: view/admin/log.php:49
|
| 216 |
+
msgid "Filter"
|
| 217 |
+
msgstr "filtras"
|
| 218 |
+
|
| 219 |
+
#: view/admin/log.php:67
|
| 220 |
+
msgid "Date"
|
| 221 |
+
msgstr "data"
|
| 222 |
+
|
| 223 |
+
#: view/admin/log.php:68
|
| 224 |
+
#: view/admin/log_item_details.php:4
|
| 225 |
+
#: view/admin/item_edit.php:15
|
| 226 |
+
#: view/admin/add.php:12
|
| 227 |
+
msgid "Source URL"
|
| 228 |
+
msgstr "šaltinio URL"
|
| 229 |
+
|
| 230 |
+
#: view/admin/log.php:69
|
| 231 |
+
#: matches/referrer.php:40
|
| 232 |
+
msgid "Referrer"
|
| 233 |
+
msgstr "nuorodą"
|
| 234 |
+
|
| 235 |
+
#: view/admin/log.php:70
|
| 236 |
+
msgid "IP"
|
| 237 |
+
msgstr ""
|
| 238 |
+
|
| 239 |
+
#: view/admin/log.php:85
|
| 240 |
+
msgid "There are no logs to display!"
|
| 241 |
+
msgstr "Nėra rąstų, kuriuos būtų galima parodyti!"
|
| 242 |
+
|
| 243 |
+
#: view/admin/log.php:94
|
| 244 |
+
msgid "Process Current Logs"
|
| 245 |
+
msgstr "Tvarkyti Aktualus Įrašai"
|
| 246 |
+
|
| 247 |
+
#: view/admin/log.php:95
|
| 248 |
+
msgid "These actions will affect all currently available logs (i.e. your search phrase will restrict the log items)."
|
| 249 |
+
msgstr "Šie veiksmai turės įtakos visų šiuo metu turimų rąstų (ty savo paieškos frazę apriboti žurnalo elementus)."
|
| 250 |
+
|
| 251 |
+
#: view/admin/log.php:100
|
| 252 |
+
msgid "Delete Logs"
|
| 253 |
+
msgstr "ištrinti Įrašai"
|
| 254 |
+
|
| 255 |
+
#: view/admin/item_list.php:7
|
| 256 |
+
msgid "Redirections for group"
|
| 257 |
+
msgstr "Peradresavimai, grupės"
|
| 258 |
+
|
| 259 |
+
#: view/admin/item_list.php:41
|
| 260 |
+
msgid "Last Access"
|
| 261 |
+
msgstr "Paskutinis apsilankymas"
|
| 262 |
+
|
| 263 |
+
#: view/admin/item_list.php:43
|
| 264 |
+
#: view/admin/module_list.php:46
|
| 265 |
+
msgid "Type"
|
| 266 |
+
msgstr "tipas"
|
| 267 |
+
|
| 268 |
+
#: view/admin/item_list.php:44
|
| 269 |
+
msgid "URL"
|
| 270 |
+
msgstr ""
|
| 271 |
+
|
| 272 |
+
#: view/admin/item_list.php:44
|
| 273 |
+
msgid "Position"
|
| 274 |
+
msgstr "pozicija"
|
| 275 |
+
|
| 276 |
+
#: view/admin/item_list.php:88
|
| 277 |
+
msgid "You have no redirections."
|
| 278 |
+
msgstr "Jūs neturite nukreipimai."
|
| 279 |
+
|
| 280 |
+
#: view/admin/log_item_details.php:9
|
| 281 |
+
msgid "Redirect to"
|
| 282 |
+
msgstr "nukreipti į"
|
| 283 |
+
|
| 284 |
+
#: view/admin/log_item_details.php:15
|
| 285 |
+
msgid "Redirected by"
|
| 286 |
+
msgstr "Nukreipta pagal"
|
| 287 |
+
|
| 288 |
+
#: view/admin/log_item_details.php:16
|
| 289 |
+
msgid "for"
|
| 290 |
+
msgstr "už"
|
| 291 |
+
|
| 292 |
+
#: view/admin/log_item_details.php:20
|
| 293 |
+
#: matches/user_agent.php:43
|
| 294 |
+
msgid "User Agent"
|
| 295 |
+
msgstr ""
|
| 296 |
+
|
| 297 |
+
#: view/admin/item.php:27
|
| 298 |
+
#: view/admin/group_item.php:23
|
| 299 |
+
msgid "disabled"
|
| 300 |
+
msgstr "neįgaliesiems"
|
| 301 |
+
|
| 302 |
+
#: view/admin/item_edit.php:3
|
| 303 |
+
msgid "%s by matching %s"
|
| 304 |
+
msgstr ""
|
| 305 |
+
|
| 306 |
+
#: view/admin/item_edit.php:7
|
| 307 |
+
msgid "Title"
|
| 308 |
+
msgstr "pavadinimas"
|
| 309 |
+
|
| 310 |
+
#: view/admin/item_edit.php:10
|
| 311 |
+
msgid "optional"
|
| 312 |
+
msgstr "neprivalomas"
|
| 313 |
+
|
| 314 |
+
#: view/admin/item_edit.php:18
|
| 315 |
+
#: matches/referrer.php:43
|
| 316 |
+
msgid "Regex"
|
| 317 |
+
msgstr ""
|
| 318 |
+
|
| 319 |
+
#: view/admin/item_edit.php:27
|
| 320 |
+
#: view/admin/module_edit.php:27
|
| 321 |
+
#: view/admin/group_edit.php:20
|
| 322 |
+
msgid "Save"
|
| 323 |
+
msgstr "sutaupyti"
|
| 324 |
+
|
| 325 |
+
#: view/admin/item_edit.php:28
|
| 326 |
+
#: view/admin/module_edit.php:28
|
| 327 |
+
#: view/admin/group_edit.php:21
|
| 328 |
+
msgid "Cancel"
|
| 329 |
+
msgstr "atšaukti"
|
| 330 |
+
|
| 331 |
+
#: view/admin/add.php:3
|
| 332 |
+
msgid "Add new redirection"
|
| 333 |
+
msgstr "Pridėti naują peradresavimo"
|
| 334 |
+
|
| 335 |
+
#: view/admin/add.php:6
|
| 336 |
+
msgid "Your redirection has been added."
|
| 337 |
+
msgstr "Jūsų peradresavimo buvo įtrauktas."
|
| 338 |
+
|
| 339 |
+
#: view/admin/add.php:16
|
| 340 |
+
msgid "Match"
|
| 341 |
+
msgstr "rungtynės"
|
| 342 |
+
|
| 343 |
+
#: view/admin/add.php:22
|
| 344 |
+
msgid "Action"
|
| 345 |
+
msgstr "veiksmas"
|
| 346 |
+
|
| 347 |
+
#: view/admin/add.php:27
|
| 348 |
+
msgid "Regular expression"
|
| 349 |
+
msgstr "reguliaraus išraiška"
|
| 350 |
+
|
| 351 |
+
#: view/admin/add.php:31
|
| 352 |
+
#: matches/url.php:32
|
| 353 |
+
msgid "Target URL"
|
| 354 |
+
msgstr "Paskirties URL"
|
| 355 |
+
|
| 356 |
+
#: view/admin/add.php:43
|
| 357 |
+
msgid "Add Redirection"
|
| 358 |
+
msgstr "Pridėti Nukreipiama"
|
| 359 |
+
|
| 360 |
+
#: view/admin/group_item.php:3
|
| 361 |
+
msgid "edit group"
|
| 362 |
+
msgstr "redaguoti grupę"
|
| 363 |
+
|
| 364 |
+
#: view/admin/module_list.php:14
|
| 365 |
+
msgid "Details"
|
| 366 |
+
msgstr "Išsamiau"
|
| 367 |
+
|
| 368 |
+
#: view/admin/module_list.php:16
|
| 369 |
+
msgid "Items"
|
| 370 |
+
msgstr "daiktai"
|
| 371 |
+
|
| 372 |
+
#: view/admin/module_list.php:18
|
| 373 |
+
msgid "Operations"
|
| 374 |
+
msgstr "operacijų"
|
| 375 |
+
|
| 376 |
+
#: view/admin/module_list.php:27
|
| 377 |
+
msgid "Note: Hits are dependant on log entries"
|
| 378 |
+
msgstr "Pastaba: Hitai priklauso nuo žurnalo įrašus"
|
| 379 |
+
|
| 380 |
+
#: view/admin/module_list.php:29
|
| 381 |
+
msgid "You have no modules defined yet"
|
| 382 |
+
msgstr "Jūs turite ne dar apibrėžti moduliai"
|
| 383 |
+
|
| 384 |
+
#: view/admin/module_list.php:34
|
| 385 |
+
msgid "Add Module"
|
| 386 |
+
msgstr ""
|
| 387 |
+
|
| 388 |
+
#: view/admin/module_list.php:35
|
| 389 |
+
msgid "A module is a controlling element that determines how redirections are handled. Elements in a WordPress module are handled by WordPress, elements in an Apache module are handled by <code>.htaccess</code>, and elements in a 404 module affect how 404 errors are logged."
|
| 390 |
+
msgstr "Modulis yra kontrolės elementas, kuris nustato, kaip tvarkomi nukreipimai. Tvarko WordPress WordPress modulio elementų, Apache modulis elementai tvarkomi pagal <code>. htaccess</ ode> ir 404 modulis elementai veikia kaip klaidas 404 prisijungęs."
|
| 391 |
+
|
| 392 |
+
#: view/admin/module_list.php:55
|
| 393 |
+
msgid "Create"
|
| 394 |
+
msgstr "kurti"
|
| 395 |
+
|
| 396 |
+
#: view/admin/support.php:5
|
| 397 |
+
msgid "Redirection Support"
|
| 398 |
+
msgstr ""
|
| 399 |
+
|
| 400 |
+
#: view/admin/support.php:9
|
| 401 |
+
msgid "Redirection is free to use - life is wonderful and lovely! However, it has required a great deal of time and effort to develop and if it has been useful you can help support this development by <strong>making a small donation</strong>."
|
| 402 |
+
msgstr "Nukreipiama laisvai naudotis - gyvenimas yra nuostabus ir mielas! Tačiau, ji reikalauja daug laiko ir pastangų plėtoti ir, jei ji buvo naudinga, galite padėti remti šią plėtrą <strong>mažą donorystės</strong>."
|
| 403 |
+
|
| 404 |
+
#: view/admin/support.php:10
|
| 405 |
+
msgid "This will act as an incentive for me to carry on developing, providing countless hours of support, and including new features and suggestions. You get some useful software and I get to carry on making it. Everybody wins."
|
| 406 |
+
msgstr ""
|
| 407 |
+
|
| 408 |
+
#: view/admin/support.php:13
|
| 409 |
+
msgid "If you are using this plugin in a commercial setup, or feel that it's been particularly useful, then you may want to consider a <strong>commercial donation</strong>."
|
| 410 |
+
msgstr "Jei jūs naudojate šią plugin komercinės sąrankos, arba jaučia, kad tai buvo ypač naudinga, tada galbūt norėsite apsvarstyti <strong>komercinę donorystę</strong>."
|
| 411 |
+
|
| 412 |
+
#: view/admin/support.php:36
|
| 413 |
+
msgid "Individual<br/>Donation"
|
| 414 |
+
msgstr "Individualus <br/> Donorystė"
|
| 415 |
+
|
| 416 |
+
#: view/admin/support.php:56
|
| 417 |
+
msgid "Commercial<br/>Donation"
|
| 418 |
+
msgstr "Komercinis <br/> Donorystė"
|
| 419 |
+
|
| 420 |
+
#: view/admin/support.php:60
|
| 421 |
+
msgid "Translations"
|
| 422 |
+
msgstr "vertimai"
|
| 423 |
+
|
| 424 |
+
#: view/admin/support.php:62
|
| 425 |
+
msgid "If you're multi-lingual then you may want to consider donating a translation:"
|
| 426 |
+
msgstr "Jei esate daugiakalbiai, tada jūs galbūt norėsite apsvarstyti dovanojančios vertimą:"
|
| 427 |
+
|
| 428 |
+
#: view/admin/support.php:70
|
| 429 |
+
msgid "All translators will have a link to their website placed on the plugin homepage at <a href=\"http://urbangiraffe.com/plugins/redirection/\">UrbanGiraffe</a>, in addition to being an individual supporter."
|
| 430 |
+
msgstr "Visi vertėjai turės pateikti nuorodą į savo svetainę pagrindiniame puslapyje įjungti <a href=\"http://urbangiraffe.com/plugins/redirection/\"> UrbanGiraffe</a>, be to yra individualus rėmėjas."
|
| 431 |
+
|
| 432 |
+
#: view/admin/support.php:71
|
| 433 |
+
msgid "Full details of producing a translation can be found in this <a href=\"http://urbangiraffe.com/articles/translating-wordpress-themes-and-plugins/\">guide to translating WordPress plugins</a>."
|
| 434 |
+
msgstr ""
|
| 435 |
+
|
| 436 |
+
#: view/admin/options.php:15
|
| 437 |
+
msgid "Auto-generate URL"
|
| 438 |
+
msgstr ""
|
| 439 |
+
|
| 440 |
+
#: view/admin/options.php:19
|
| 441 |
+
msgid "This will be used to auto-generate a URL if no URL is given. You can use the special tags $dec$ or $hex$ to have a unique ID inserted (either decimal or hex)"
|
| 442 |
+
msgstr "This will be used to auto-generate a URL if no URL is given. You can use the special tags $dec$ or $hex$ to have a unique ID inserted (either decimal or hex)"
|
| 443 |
+
|
| 444 |
+
#: view/admin/options.php:24
|
| 445 |
+
msgid "IP Lookup Service"
|
| 446 |
+
msgstr ""
|
| 447 |
+
|
| 448 |
+
#: view/admin/options.php:30
|
| 449 |
+
msgid "Plugin Support"
|
| 450 |
+
msgstr ""
|
| 451 |
+
|
| 452 |
+
#: view/admin/options.php:33
|
| 453 |
+
msgid "I'm a nice person and I have helped support the author of this plugin"
|
| 454 |
+
msgstr "Aš esu gražus ir aš padėjo remti šį papildinį autorius"
|
| 455 |
+
|
| 456 |
+
#: view/admin/options.php:37
|
| 457 |
+
msgid "Logging"
|
| 458 |
+
msgstr ""
|
| 459 |
+
|
| 460 |
+
#: view/admin/options.php:40
|
| 461 |
+
msgid "log redirected requests"
|
| 462 |
+
msgstr ""
|
| 463 |
+
|
| 464 |
+
#: view/admin/options.php:42
|
| 465 |
+
msgid "log 404 Not Found requests"
|
| 466 |
+
msgstr ""
|
| 467 |
+
|
| 468 |
+
#: view/admin/options.php:43
|
| 469 |
+
msgid "Uncheck one or both of these to turn off logging and reduce database load if your redirected URLs are hit very frequently, and/or your site is very busy and pages are often not found."
|
| 470 |
+
msgstr "Atsisakykite vieno ar abiejų šių išjungti medienos ruoša ir sumažinti duomenų bazės apkrovos, jei jūsų nukreipimo URL nukentėjo labai dažnai, ir / ar jūsų svetainė yra labai užsiėmę ir dažnai nerastas puslapių."
|
| 471 |
+
|
| 472 |
+
#: view/admin/options.php:47
|
| 473 |
+
msgid "Expire Logs"
|
| 474 |
+
msgstr ""
|
| 475 |
+
|
| 476 |
+
#: view/admin/options.php:50
|
| 477 |
+
msgid "days (enter 0 for no expiry)"
|
| 478 |
+
msgstr ""
|
| 479 |
+
|
| 480 |
+
#: view/admin/options.php:54
|
| 481 |
+
msgid "RSS Token"
|
| 482 |
+
msgstr ""
|
| 483 |
+
|
| 484 |
+
#: view/admin/options.php:57
|
| 485 |
+
msgid "A unique token allowing feed readers access to Redirection RSS (leave blank to auto-generate)"
|
| 486 |
+
msgstr "Leisti pašarų skaitytojams susipažinti su Nukreipiama RSS (palikti tuščią, jei norite automatiškai kurti unikalią žymę)"
|
| 487 |
+
|
| 488 |
+
#: view/admin/options.php:62
|
| 489 |
+
msgid "URL Monitoring"
|
| 490 |
+
msgstr "URL stebėsena"
|
| 491 |
+
|
| 492 |
+
#: view/admin/options.php:63
|
| 493 |
+
msgid "You can have Redirection detect changes in URLs and have an automatic redirection created in a specific group."
|
| 494 |
+
msgstr "Galite Nukreipiama aptikti URL ir turi automatinio peradresavimo, sukurtas konkrečiai grupei."
|
| 495 |
+
|
| 496 |
+
#: view/admin/options.php:67
|
| 497 |
+
msgid "Post & Page URLs"
|
| 498 |
+
msgstr ""
|
| 499 |
+
|
| 500 |
+
#: view/admin/options.php:70
|
| 501 |
+
#: view/admin/options.php:82
|
| 502 |
+
msgid "Don't monitor"
|
| 503 |
+
msgstr "Nekontroliuoja"
|
| 504 |
+
|
| 505 |
+
#: view/admin/options.php:74
|
| 506 |
+
msgid "Monitor new posts"
|
| 507 |
+
msgstr "Stebėti naujus pranešimus"
|
| 508 |
+
|
| 509 |
+
#: view/admin/options.php:79
|
| 510 |
+
msgid "Category URLs"
|
| 511 |
+
msgstr "Kategorija URL"
|
| 512 |
+
|
| 513 |
+
#: view/admin/options.php:89
|
| 514 |
+
msgid "Update"
|
| 515 |
+
msgstr "atnaujinti"
|
| 516 |
+
|
| 517 |
+
#: view/admin/options.php:95
|
| 518 |
+
msgid "Import"
|
| 519 |
+
msgstr "importuoti"
|
| 520 |
+
|
| 521 |
+
#: view/admin/options.php:97
|
| 522 |
+
msgid "Here you can import redirections from an existing .htaccess file, a CSV file, or a Redirection XML."
|
| 523 |
+
msgstr "Čia galite importuoti nukreipimai iš esamų. Htaccess failą, CSV failą, arba Nukreipiama XML."
|
| 524 |
+
|
| 525 |
+
#: view/admin/options.php:104
|
| 526 |
+
msgid "Import into"
|
| 527 |
+
msgstr "importo į"
|
| 528 |
+
|
| 529 |
+
#: view/admin/options.php:107
|
| 530 |
+
msgid "Upload"
|
| 531 |
+
msgstr "Įkelti"
|
| 532 |
+
|
| 533 |
+
#: view/admin/options.php:110
|
| 534 |
+
msgid "Note that the group is ignored when uploading an XML file."
|
| 535 |
+
msgstr "Atkreipkite dėmesį, kad grupėje yra ignoruojamas, kai įkelti XML failą."
|
| 536 |
+
|
| 537 |
+
#: view/admin/options.php:114
|
| 538 |
+
msgid "Delete Redirection"
|
| 539 |
+
msgstr "ištrinti Nukreipiama"
|
| 540 |
+
|
| 541 |
+
#: view/admin/options.php:115
|
| 542 |
+
msgid "Selecting this option will delete all redirections, all logs, and any options associated with the Redirection plugin. Make sure this is what you want to do."
|
| 543 |
+
msgstr "Pasirinkus šią parinktį, bus ištrinti visus peradresavimus, visų rąstų, ir bet kokių galimybių, susijusių su Nukreipiama plugin. Įsitikinkite, kad tai, ką norite daryti."
|
| 544 |
+
|
| 545 |
+
#: view/admin/group_edit.php:10
|
| 546 |
+
msgid "Tracked"
|
| 547 |
+
msgstr "Vikšrinės"
|
| 548 |
+
|
| 549 |
+
#: view/admin/group_edit.php:11
|
| 550 |
+
msgid "Whether to track 'hits' to items"
|
| 551 |
+
msgstr "Ar sekti \"hitai\" elementų"
|
| 552 |
+
|
| 553 |
+
#: view/admin/group_edit.php:14
|
| 554 |
+
msgid "Enabled"
|
| 555 |
+
msgstr "įjungta"
|
| 556 |
+
|
| 557 |
+
#: view/admin/group_edit.php:15
|
| 558 |
+
msgid "Disabling a group will disable all items contained within it"
|
| 559 |
+
msgstr "Išjungus grupės išjungti visus elementus, joje esančios"
|
| 560 |
+
|
| 561 |
+
#: modules/404.php:37
|
| 562 |
+
msgid "Log 404s"
|
| 563 |
+
msgstr "Prisijungti 404s"
|
| 564 |
+
|
| 565 |
+
#: modules/404.php:46
|
| 566 |
+
#: modules/wordpress.php:121
|
| 567 |
+
msgid "<strong>Disabled: You must enable <a href=\"options-permalink.php\">permalinks</a> before using this</strong>"
|
| 568 |
+
msgstr "<strong>Išjungta: Jūs turite įjungti<a href=\"options-permalink.php\">permalinks</a> before using this</strong>"
|
| 569 |
+
|
| 570 |
+
#: modules/404.php:57
|
| 571 |
+
msgid "<small>No options have been set</small>"
|
| 572 |
+
msgstr "<small>Nėra galimybės nustatyti</small>"
|
| 573 |
+
|
| 574 |
+
#: modules/apache.php:77
|
| 575 |
+
msgid "Location"
|
| 576 |
+
msgstr "vieta"
|
| 577 |
+
|
| 578 |
+
#: modules/apache.php:82
|
| 579 |
+
msgid "WordPress is installed in: <code>%s</code>"
|
| 580 |
+
msgstr "WordPress is installed in: <code>%s</code>"
|
| 581 |
+
|
| 582 |
+
#: modules/apache.php:87
|
| 583 |
+
msgid "Canonical"
|
| 584 |
+
msgstr "Canonical"
|
| 585 |
+
|
| 586 |
+
#: modules/apache.php:90
|
| 587 |
+
#: modules/apache.php:96
|
| 588 |
+
msgid "Leave as is"
|
| 589 |
+
msgstr "Leave as is"
|
| 590 |
+
|
| 591 |
+
#: modules/apache.php:90
|
| 592 |
+
msgid "Strip WWW (%s)"
|
| 593 |
+
msgstr "Strip WWW (%s)"
|
| 594 |
+
|
| 595 |
+
#: modules/apache.php:90
|
| 596 |
+
msgid "Force WWW (www.%s)"
|
| 597 |
+
msgstr "Force WWW (www.%s)"
|
| 598 |
+
|
| 599 |
+
#: modules/apache.php:94
|
| 600 |
+
msgid "Strip Index"
|
| 601 |
+
msgstr "Strip Index"
|
| 602 |
+
|
| 603 |
+
#: modules/apache.php:96
|
| 604 |
+
msgid "Strip index files (html,php)"
|
| 605 |
+
msgstr "Ruože indeksą failus (HTML, PHP)"
|
| 606 |
+
|
| 607 |
+
#: modules/apache.php:101
|
| 608 |
+
msgid "Memory Limit"
|
| 609 |
+
msgstr "atminties Limito"
|
| 610 |
+
|
| 611 |
+
#: modules/apache.php:104
|
| 612 |
+
#: modules/apache.php:109
|
| 613 |
+
msgid "Server default"
|
| 614 |
+
msgstr "serverio nutylėjimą"
|
| 615 |
+
|
| 616 |
+
#: modules/apache.php:107
|
| 617 |
+
msgid "Error Level"
|
| 618 |
+
msgstr "klaidų lygis"
|
| 619 |
+
|
| 620 |
+
#: modules/apache.php:109
|
| 621 |
+
msgid "No errors"
|
| 622 |
+
msgstr "Nėra klaidų"
|
| 623 |
+
|
| 624 |
+
#: modules/apache.php:109
|
| 625 |
+
msgid "Show errors"
|
| 626 |
+
msgstr "Rodyti klaidas"
|
| 627 |
+
|
| 628 |
+
#: modules/apache.php:114
|
| 629 |
+
msgid "Ban IPs"
|
| 630 |
+
msgstr "uždrausti IP"
|
| 631 |
+
|
| 632 |
+
#: modules/apache.php:120
|
| 633 |
+
msgid "Allow IPs"
|
| 634 |
+
msgstr "leisti IP"
|
| 635 |
+
|
| 636 |
+
#: modules/apache.php:126
|
| 637 |
+
msgid "Raw .htaccess"
|
| 638 |
+
msgstr "Žalias. Htaccess"
|
| 639 |
+
|
| 640 |
+
#: modules/apache.php:132
|
| 641 |
+
msgid "Site URL"
|
| 642 |
+
msgstr "Svetainės URL"
|
| 643 |
+
|
| 644 |
+
#: modules/apache.php:135
|
| 645 |
+
msgid "Advanced: For management of external sites"
|
| 646 |
+
msgstr "Detali: valdymo išorinių svetainių"
|
| 647 |
+
|
| 648 |
+
#: modules/apache.php:150
|
| 649 |
+
msgid "<strong>Location is invalid - check that path exists</strong>"
|
| 650 |
+
msgstr "<strong>Vieta yra neteisingas - patikrinti, kad sekai</strong>"
|
| 651 |
+
|
| 652 |
+
#: modules/apache.php:156
|
| 653 |
+
msgid "<strong>Could not write to configured <code>.htaccess</code> file - check file permissions</strong>"
|
| 654 |
+
msgstr "<strong> negalite rašyti sukonfigūruotas <code> Htaccess </code> Failas - patikrinti failo teises </strong>"
|
| 655 |
+
|
| 656 |
+
#: modules/apache.php:163
|
| 657 |
+
msgid "<strong>Disabled: enter the location of an <code>.htaccess</code> file for this to be valid</strong>"
|
| 658 |
+
msgstr "<strong>neįgaliesiems įveskite <code> vietą Htaccess</code>, kad tai galioja</strong>"
|
| 659 |
+
|
| 660 |
+
#: modules/apache.php:168
|
| 661 |
+
msgid "strip WWW"
|
| 662 |
+
msgstr "juostelės WWW"
|
| 663 |
+
|
| 664 |
+
#: modules/apache.php:168
|
| 665 |
+
msgid "force WWW"
|
| 666 |
+
msgstr "jėgos WWW"
|
| 667 |
+
|
| 668 |
+
#: modules/apache.php:171
|
| 669 |
+
msgid "strip index"
|
| 670 |
+
msgstr "juostelės indeksas"
|
| 671 |
+
|
| 672 |
+
#: modules/apache.php:174
|
| 673 |
+
msgid "memory limit at %dMB"
|
| 674 |
+
msgstr "atminties limitą %dMB"
|
| 675 |
+
|
| 676 |
+
#: modules/apache.php:177
|
| 677 |
+
msgid "no errors"
|
| 678 |
+
msgstr "nėra klaidų"
|
| 679 |
+
|
| 680 |
+
#: modules/apache.php:177
|
| 681 |
+
msgid "show errors"
|
| 682 |
+
msgstr "Rodyti klaidas"
|
| 683 |
+
|
| 684 |
+
#: modules/apache.php:180
|
| 685 |
+
msgid "IPs are banned"
|
| 686 |
+
msgstr "IP yra uždraustas"
|
| 687 |
+
|
| 688 |
+
#: modules/apache.php:183
|
| 689 |
+
msgid "IPs are allowed"
|
| 690 |
+
msgstr "IP yra leidžiama"
|
| 691 |
+
|
| 692 |
+
#: models/redirect.php:386
|
| 693 |
+
msgid "Redirect to URL"
|
| 694 |
+
msgstr "Nukreipti į URL"
|
| 695 |
+
|
| 696 |
+
#: models/redirect.php:387
|
| 697 |
+
msgid "Redirect to random post"
|
| 698 |
+
msgstr "Nukreipti į Atsitiktinis užrašas"
|
| 699 |
+
|
| 700 |
+
#: models/redirect.php:388
|
| 701 |
+
msgid "Pass-through"
|
| 702 |
+
msgstr "Pass-through"
|
| 703 |
+
|
| 704 |
+
#: models/redirect.php:389
|
| 705 |
+
msgid "Error (404)"
|
| 706 |
+
msgstr "Klaida (404)"
|
| 707 |
+
|
| 708 |
+
#: models/redirect.php:390
|
| 709 |
+
msgid "Do nothing"
|
| 710 |
+
msgstr "nieko nedaryti"
|
| 711 |
+
|
| 712 |
+
#: models/module.php:161
|
| 713 |
+
#: models/database.php:94
|
| 714 |
+
msgid "WordPress"
|
| 715 |
+
msgstr "WordPress"
|
| 716 |
+
|
| 717 |
+
#: models/module.php:162
|
| 718 |
+
msgid "404 Errors"
|
| 719 |
+
msgstr "404 Errors"
|
| 720 |
+
|
| 721 |
+
#: models/module.php:187
|
| 722 |
+
msgid "Strip WWW"
|
| 723 |
+
msgstr "juostelės WWW"
|
| 724 |
+
|
| 725 |
+
#: models/module.php:187
|
| 726 |
+
msgid "Force WWW"
|
| 727 |
+
msgstr "jėga WWW"
|
| 728 |
+
|
| 729 |
+
#: models/module.php:192
|
| 730 |
+
msgid "Strip index.php"
|
| 731 |
+
msgstr "juostelės index.php"
|
| 732 |
+
|
| 733 |
+
#: models/database.php:96
|
| 734 |
+
msgid "404"
|
| 735 |
+
msgstr "404"
|
| 736 |
+
|
| 737 |
+
#: models/database.php:101
|
| 738 |
+
msgid "Redirections"
|
| 739 |
+
msgstr "peradresavimai"
|
| 740 |
+
|
| 741 |
+
#: models/database.php:102
|
| 742 |
+
msgid "Modified Posts"
|
| 743 |
+
msgstr "Modifikuota Pranešimai"
|
| 744 |
+
|
| 745 |
+
#: models/pager.php:404
|
| 746 |
+
msgid "Previous"
|
| 747 |
+
msgstr "ankstesnis"
|
| 748 |
+
|
| 749 |
+
#: models/pager.php:405
|
| 750 |
+
msgid "Next"
|
| 751 |
+
msgstr "kitas"
|
| 752 |
+
|
| 753 |
+
#: models/pager.php:463
|
| 754 |
+
msgid "%d per-page"
|
| 755 |
+
msgstr "%d per-page"
|
| 756 |
+
|
| 757 |
+
#: models/pager.php:472
|
| 758 |
+
msgid "Displaying %s–%s of %s"
|
| 759 |
+
msgstr "Displaying %s–%s of %s"
|
| 760 |
+
|
| 761 |
+
#: models/group.php:194
|
| 762 |
+
msgid "Yes"
|
| 763 |
+
msgstr "taip"
|
| 764 |
+
|
| 765 |
+
#: models/group.php:195
|
| 766 |
+
msgid "No"
|
| 767 |
+
msgstr "ne"
|
| 768 |
+
|
| 769 |
+
#: ajax.php:370
|
| 770 |
+
msgid "Sorry, but your redirection was not created"
|
| 771 |
+
msgstr "Atsiprašome, tačiau jūsų peradresavimo nebuvo sukurta"
|
| 772 |
+
|
| 773 |
+
#: redirection.php:94
|
| 774 |
+
msgid "Settings"
|
| 775 |
+
msgstr "Nustatymai"
|
| 776 |
+
|
| 777 |
+
#: redirection.php:112
|
| 778 |
+
msgid "Please wait..."
|
| 779 |
+
msgstr "Prašome palaukti ..."
|
| 780 |
+
|
| 781 |
+
#. #-#-#-#-# plugin.pot (Redirection 2.2.5) #-#-#-#-#
|
| 782 |
+
#. Plugin Name of the plugin/theme
|
| 783 |
+
#: redirection.php:121
|
| 784 |
+
msgid "Redirection"
|
| 785 |
+
msgstr "Nukreipiama"
|
| 786 |
+
|
| 787 |
+
#: redirection.php:159
|
| 788 |
+
msgid "Your module was successfully created"
|
| 789 |
+
msgstr "Jūsų modulis buvo sėkmingai sukurta"
|
| 790 |
+
|
| 791 |
+
#: redirection.php:163
|
| 792 |
+
msgid "Your module was not created - did you provide a name?"
|
| 793 |
+
msgstr "Jūsų modulis nebuvo sukurta tu vardą?"
|
| 794 |
+
|
| 795 |
+
#: redirection.php:228
|
| 796 |
+
msgid "Your options were updated"
|
| 797 |
+
msgstr "Jūsų galimybės buvo atnaujintos"
|
| 798 |
+
|
| 799 |
+
#: redirection.php:236
|
| 800 |
+
msgid "Redirection data has been deleted and the plugin disabled"
|
| 801 |
+
msgstr "Nukreipiama duomenys buvo ištrinti ir įjungti neįgaliesiems"
|
| 802 |
+
|
| 803 |
+
#: redirection.php:246
|
| 804 |
+
msgid "%d redirection was successfully imported"
|
| 805 |
+
msgstr "%d redirections were successfully imported"
|
| 806 |
+
|
| 807 |
+
#: redirection.php:248
|
| 808 |
+
msgid "No items were imported"
|
| 809 |
+
msgstr "Nėra elementų, buvo importuoti"
|
| 810 |
+
|
| 811 |
+
#: redirection.php:266
|
| 812 |
+
msgid "Your logs have been deleted"
|
| 813 |
+
msgstr "Jūsų rąstai buvo ištrintos"
|
| 814 |
+
|
| 815 |
+
#: redirection.php:289
|
| 816 |
+
msgid "Your group was added successfully"
|
| 817 |
+
msgstr "Jūsų grupė buvo sėkmingai įrašytas."
|
| 818 |
+
|
| 819 |
+
#: redirection.php:293
|
| 820 |
+
msgid "Please specify a group name"
|
| 821 |
+
msgstr "Prašome nurodyti grupės pavadinimą,"
|
| 822 |
+
|
| 823 |
+
#: redirection.php:330
|
| 824 |
+
msgid "Redirection is available in"
|
| 825 |
+
msgstr "Nukreipiama yra išversta į"
|
| 826 |
+
|
| 827 |
+
#: matches/url.php:25
|
| 828 |
+
msgid "URL only"
|
| 829 |
+
msgstr "tik URL"
|
| 830 |
+
|
| 831 |
+
#: matches/url.php:40
|
| 832 |
+
#: matches/user_agent.php:55
|
| 833 |
+
#: matches/referrer.php:47
|
| 834 |
+
msgid "HTTP Code"
|
| 835 |
+
msgstr "HTTP Kodas"
|
| 836 |
+
|
| 837 |
+
#: matches/login.php:25
|
| 838 |
+
msgid "URL and login status"
|
| 839 |
+
msgstr "URL ir prisijungimo statuso"
|
| 840 |
+
|
| 841 |
+
#: matches/login.php:33
|
| 842 |
+
msgid "The target URL will be chosen from one of the following URLs, depending if the user is logged in or out. Leaving a URL blank means that the user is not redirected."
|
| 843 |
+
msgstr "The target URL will be chosen from one of the following URLs, depending if the user is logged in or out. Leaving a URL blank means that the user is not redirected."
|
| 844 |
+
|
| 845 |
+
#: matches/login.php:39
|
| 846 |
+
#: matches/login.php:41
|
| 847 |
+
msgid "Logged In"
|
| 848 |
+
msgstr "Prisijungimas:"
|
| 849 |
+
|
| 850 |
+
#: matches/login.php:51
|
| 851 |
+
#: matches/login.php:53
|
| 852 |
+
msgid "Logged Out"
|
| 853 |
+
msgstr "Atsijungimas"
|
| 854 |
+
|
| 855 |
+
#: matches/user_agent.php:27
|
| 856 |
+
msgid "URL and user agent"
|
| 857 |
+
msgstr "URL ir vartotojo agentas"
|
| 858 |
+
|
| 859 |
+
#: matches/user_agent.php:32
|
| 860 |
+
msgid "FeedBurner"
|
| 861 |
+
msgstr "FeedBurner"
|
| 862 |
+
|
| 863 |
+
#: matches/user_agent.php:33
|
| 864 |
+
msgid "Internet Explorer"
|
| 865 |
+
msgstr "Internet Explorer"
|
| 866 |
+
|
| 867 |
+
#: matches/user_agent.php:34
|
| 868 |
+
msgid "FireFox"
|
| 869 |
+
msgstr "FireFox"
|
| 870 |
+
|
| 871 |
+
#: matches/user_agent.php:35
|
| 872 |
+
msgid "Opera"
|
| 873 |
+
msgstr "Opera"
|
| 874 |
+
|
| 875 |
+
#: matches/user_agent.php:36
|
| 876 |
+
msgid "Safari"
|
| 877 |
+
msgstr "Safari"
|
| 878 |
+
|
| 879 |
+
#: matches/user_agent.php:37
|
| 880 |
+
msgid "iPhone"
|
| 881 |
+
msgstr "iPhone"
|
| 882 |
+
|
| 883 |
+
#: matches/user_agent.php:38
|
| 884 |
+
msgid "Nintendo Wii"
|
| 885 |
+
msgstr "Nintendo Wii"
|
| 886 |
+
|
| 887 |
+
#: matches/user_agent.php:66
|
| 888 |
+
msgid "The visitor will be redirected from the source URL if the user agent matches. You can specify a <em>matched</em> target URL as the address to send visitors if they do match, and <em>not matched</em> if they don't match. Leaving a URL blank means that the visitor is not redirected. <strong>All matches are performed as regular expressions</strong>.\n"
|
| 889 |
+
msgstr "Lankytojai bus nukreipiami iš šaltinio URL, jei user-agent atitinka. Galite nurodyti <em>atitiko</em>, kad paskirties URL adresą siųsti lankytojus, jei jie rungtynės, ir <em> neatitiko </em>, jei jie nesutampa. , Paliekant URL tuščią, reiškia, kad lankytojas nėra nukreipti. <strong>Visos rungtynės yra atlikti kaip reguliarios išraiškos</strong> . \n"
|
| 890 |
+
|
| 891 |
+
#: matches/user_agent.php:73
|
| 892 |
+
#: matches/user_agent.php:75
|
| 893 |
+
#: matches/referrer.php:63
|
| 894 |
+
#: matches/referrer.php:65
|
| 895 |
+
msgid "Matched"
|
| 896 |
+
msgstr "Sutampa"
|
| 897 |
+
|
| 898 |
+
#: matches/user_agent.php:83
|
| 899 |
+
#: matches/user_agent.php:85
|
| 900 |
+
#: matches/referrer.php:73
|
| 901 |
+
#: matches/referrer.php:75
|
| 902 |
+
msgid "Not matched"
|
| 903 |
+
msgstr "nesutampa"
|
| 904 |
+
|
| 905 |
+
#: matches/referrer.php:28
|
| 906 |
+
msgid "URL and referrer"
|
| 907 |
+
msgstr "URL ir nukreipimo"
|
| 908 |
+
|
| 909 |
+
#: matches/referrer.php:57
|
| 910 |
+
msgid "The visitor will be redirected from the source URL if the referrer matches. You can specify a <em>matched</em> target URL as the address to send visitors if they do match, and <em>not matched</em> if they don't match. Leaving a URL blank means that the visitor is not redirected."
|
| 911 |
+
msgstr "Lankytojas bus nukreiptas nuo šaltinio URL, jei refererių rungtynės. Galite nurodyti <em>atitiko</em>, kad paskirties URL adresą siųsti lankytojus, jei jie rungtynės, ir <em>neatitiko</ em>, jei jie nesutampa. , Paliekant URL tuščią, reiškia, kad lankytojas nėra nukreipti."
|
| 912 |
+
|
| 913 |
+
#. Plugin URI of the plugin/theme
|
| 914 |
+
msgid "http://urbangiraffe.com/plugins/redirection/"
|
| 915 |
+
msgstr ""
|
| 916 |
+
|
| 917 |
+
#. Description of the plugin/theme
|
| 918 |
+
msgid "Manage all your 301 redirects and monitor 404 errors"
|
| 919 |
+
msgstr "Tvarkyti visus savo 301 peradresavimą ir stebėti klaidas 404"
|
| 920 |
+
|
| 921 |
+
#. Author of the plugin/theme
|
| 922 |
+
msgid "John Godley"
|
| 923 |
+
msgstr ""
|
| 924 |
+
|
| 925 |
+
#. Author URI of the plugin/theme
|
| 926 |
+
msgid "http://urbangiraffe.com"
|
| 927 |
+
msgstr ""
|
| 928 |
+
|
locale/nl_NL.mo
CHANGED
|
Binary file
|
locale/nl_NL.po
CHANGED
|
Binary file
|
matches/login.php
CHANGED
|
@@ -24,11 +24,11 @@ class Login_Match extends Red_Match {
|
|
| 24 |
function name() {
|
| 25 |
return __( 'URL and login status', 'redirection' );
|
| 26 |
}
|
| 27 |
-
|
| 28 |
function show() {
|
| 29 |
?>
|
| 30 |
</table>
|
| 31 |
-
|
| 32 |
<p style="padding: 0.5em">
|
| 33 |
<?php _e( 'The target URL will be chosen from one of the following URLs, depending if the user is logged in or out. Leaving a URL blank means that the user is not redirected.', 'redirection' ); ?>
|
| 34 |
</p>
|
|
@@ -45,7 +45,7 @@ class Login_Match extends Red_Match {
|
|
| 45 |
<input style="width: 95%" type="text" name="url_loggedin" value="<?php echo esc_attr( $this->url_loggedin ); ?>"/>
|
| 46 |
</td>
|
| 47 |
</tr>
|
| 48 |
-
<tr>
|
| 49 |
<th width="100" valign="top">
|
| 50 |
<?php if ( strlen( $this->url_loggedout ) > 0 ) : ?>
|
| 51 |
<a target="_blank" href="<?php echo $this->url_loggedout ?>"><?php _e( 'Logged Out', 'redirection' ); ?>:</a>
|
|
@@ -59,7 +59,7 @@ class Login_Match extends Red_Match {
|
|
| 59 |
</tr>
|
| 60 |
<?php
|
| 61 |
}
|
| 62 |
-
|
| 63 |
function save( $details ) {
|
| 64 |
if ( isset( $details['target'] ) )
|
| 65 |
$details['target'] = $details;
|
|
@@ -69,11 +69,11 @@ class Login_Match extends Red_Match {
|
|
| 69 |
'url_loggedout' => $details['url_loggedout']
|
| 70 |
);
|
| 71 |
}
|
| 72 |
-
|
| 73 |
function initialize( $url ) {
|
| 74 |
$this->url = array( $url, '' );
|
| 75 |
}
|
| 76 |
-
|
| 77 |
function get_target( $url, $matched_url, $regex ) {
|
| 78 |
if ( is_user_logged_in() === false )
|
| 79 |
$target = $this->url_loggedout;
|
|
@@ -84,14 +84,14 @@ class Login_Match extends Red_Match {
|
|
| 84 |
$target = preg_replace( '@'.str_replace( '@', '\\@', $matched_url ).'@', $target, $url );
|
| 85 |
return $target;
|
| 86 |
}
|
| 87 |
-
|
| 88 |
function wants_it() {
|
| 89 |
if ( is_user_logged_in() && strlen( $this->url_loggedin ) > 0 )
|
| 90 |
return true;
|
| 91 |
if ( !is_user_logged_in() && strlen( $this->url_loggedout ) > 0 )
|
| 92 |
return true;
|
| 93 |
}
|
| 94 |
-
|
| 95 |
function match_name() {
|
| 96 |
return sprintf( 'login status', $this->user_agent );
|
| 97 |
}
|
| 24 |
function name() {
|
| 25 |
return __( 'URL and login status', 'redirection' );
|
| 26 |
}
|
| 27 |
+
|
| 28 |
function show() {
|
| 29 |
?>
|
| 30 |
</table>
|
| 31 |
+
|
| 32 |
<p style="padding: 0.5em">
|
| 33 |
<?php _e( 'The target URL will be chosen from one of the following URLs, depending if the user is logged in or out. Leaving a URL blank means that the user is not redirected.', 'redirection' ); ?>
|
| 34 |
</p>
|
| 45 |
<input style="width: 95%" type="text" name="url_loggedin" value="<?php echo esc_attr( $this->url_loggedin ); ?>"/>
|
| 46 |
</td>
|
| 47 |
</tr>
|
| 48 |
+
<tr>]
|
| 49 |
<th width="100" valign="top">
|
| 50 |
<?php if ( strlen( $this->url_loggedout ) > 0 ) : ?>
|
| 51 |
<a target="_blank" href="<?php echo $this->url_loggedout ?>"><?php _e( 'Logged Out', 'redirection' ); ?>:</a>
|
| 59 |
</tr>
|
| 60 |
<?php
|
| 61 |
}
|
| 62 |
+
|
| 63 |
function save( $details ) {
|
| 64 |
if ( isset( $details['target'] ) )
|
| 65 |
$details['target'] = $details;
|
| 69 |
'url_loggedout' => $details['url_loggedout']
|
| 70 |
);
|
| 71 |
}
|
| 72 |
+
|
| 73 |
function initialize( $url ) {
|
| 74 |
$this->url = array( $url, '' );
|
| 75 |
}
|
| 76 |
+
|
| 77 |
function get_target( $url, $matched_url, $regex ) {
|
| 78 |
if ( is_user_logged_in() === false )
|
| 79 |
$target = $this->url_loggedout;
|
| 84 |
$target = preg_replace( '@'.str_replace( '@', '\\@', $matched_url ).'@', $target, $url );
|
| 85 |
return $target;
|
| 86 |
}
|
| 87 |
+
|
| 88 |
function wants_it() {
|
| 89 |
if ( is_user_logged_in() && strlen( $this->url_loggedin ) > 0 )
|
| 90 |
return true;
|
| 91 |
if ( !is_user_logged_in() && strlen( $this->url_loggedout ) > 0 )
|
| 92 |
return true;
|
| 93 |
}
|
| 94 |
+
|
| 95 |
function match_name() {
|
| 96 |
return sprintf( 'login status', $this->user_agent );
|
| 97 |
}
|
matches/referrer.php
CHANGED
|
@@ -23,18 +23,18 @@ For full license details see license.txt
|
|
| 23 |
class Referrer_Match extends Red_Match {
|
| 24 |
var $referrer;
|
| 25 |
var $regex;
|
| 26 |
-
|
| 27 |
function name() {
|
| 28 |
return __( 'URL and referrer', 'redirection' );
|
| 29 |
}
|
| 30 |
-
|
| 31 |
function show() {
|
| 32 |
-
$codes = array(
|
| 33 |
301 => get_status_header_desc( 301 ),
|
| 34 |
302 => get_status_header_desc( 302 ),
|
| 35 |
307 => get_status_header_desc( 307 )
|
| 36 |
);
|
| 37 |
-
|
| 38 |
?>
|
| 39 |
<tr>
|
| 40 |
<th width="100"><?php _e( 'Referrer', 'redirection' ); ?>:</th>
|
|
@@ -81,11 +81,11 @@ class Referrer_Match extends Red_Match {
|
|
| 81 |
</tr>
|
| 82 |
<?php
|
| 83 |
}
|
| 84 |
-
|
| 85 |
function save( $details ) {
|
| 86 |
if ( isset( $details['target'] ) )
|
| 87 |
$details['url_from'] = $details['target'];
|
| 88 |
-
|
| 89 |
return array(
|
| 90 |
'url_from' => $details['url_from'],
|
| 91 |
'url_notfrom' => $details['url_notfrom'],
|
|
@@ -93,7 +93,7 @@ class Referrer_Match extends Red_Match {
|
|
| 93 |
'referrer' => $details['referrer']
|
| 94 |
);
|
| 95 |
}
|
| 96 |
-
|
| 97 |
function initialize( $url ) {
|
| 98 |
$this->url = array( $url, '' );
|
| 99 |
}
|
|
@@ -102,10 +102,10 @@ class Referrer_Match extends Red_Match {
|
|
| 102 |
// Match referrer
|
| 103 |
return true;
|
| 104 |
}
|
| 105 |
-
|
| 106 |
function get_target( $url, $matched_url, $regex ) {
|
| 107 |
$target = false;
|
| 108 |
-
|
| 109 |
// Check if referrer matches
|
| 110 |
if ( ( $this->regex == false && $_SERVER['HTTP_REFERER'] == $this->referrer ) ||( $this->regex == true && preg_match( '@'.str_replace( '@', '\\@', $this->referrer ).'@', $_SERVER['HTTP_REFERER'], $matches ) ) ) {
|
| 111 |
$target = $this->url_from;
|
|
@@ -117,7 +117,7 @@ class Referrer_Match extends Red_Match {
|
|
| 117 |
$target = $this->url_notfrom;
|
| 118 |
return $target;
|
| 119 |
}
|
| 120 |
-
|
| 121 |
function match_name() {
|
| 122 |
return sprintf( 'referrer - <code>%s</code>', $this->referrer );
|
| 123 |
}
|
| 23 |
class Referrer_Match extends Red_Match {
|
| 24 |
var $referrer;
|
| 25 |
var $regex;
|
| 26 |
+
|
| 27 |
function name() {
|
| 28 |
return __( 'URL and referrer', 'redirection' );
|
| 29 |
}
|
| 30 |
+
|
| 31 |
function show() {
|
| 32 |
+
$codes = array(
|
| 33 |
301 => get_status_header_desc( 301 ),
|
| 34 |
302 => get_status_header_desc( 302 ),
|
| 35 |
307 => get_status_header_desc( 307 )
|
| 36 |
);
|
| 37 |
+
|
| 38 |
?>
|
| 39 |
<tr>
|
| 40 |
<th width="100"><?php _e( 'Referrer', 'redirection' ); ?>:</th>
|
| 81 |
</tr>
|
| 82 |
<?php
|
| 83 |
}
|
| 84 |
+
|
| 85 |
function save( $details ) {
|
| 86 |
if ( isset( $details['target'] ) )
|
| 87 |
$details['url_from'] = $details['target'];
|
| 88 |
+
|
| 89 |
return array(
|
| 90 |
'url_from' => $details['url_from'],
|
| 91 |
'url_notfrom' => $details['url_notfrom'],
|
| 93 |
'referrer' => $details['referrer']
|
| 94 |
);
|
| 95 |
}
|
| 96 |
+
|
| 97 |
function initialize( $url ) {
|
| 98 |
$this->url = array( $url, '' );
|
| 99 |
}
|
| 102 |
// Match referrer
|
| 103 |
return true;
|
| 104 |
}
|
| 105 |
+
|
| 106 |
function get_target( $url, $matched_url, $regex ) {
|
| 107 |
$target = false;
|
| 108 |
+
|
| 109 |
// Check if referrer matches
|
| 110 |
if ( ( $this->regex == false && $_SERVER['HTTP_REFERER'] == $this->referrer ) ||( $this->regex == true && preg_match( '@'.str_replace( '@', '\\@', $this->referrer ).'@', $_SERVER['HTTP_REFERER'], $matches ) ) ) {
|
| 111 |
$target = $this->url_from;
|
| 117 |
$target = $this->url_notfrom;
|
| 118 |
return $target;
|
| 119 |
}
|
| 120 |
+
|
| 121 |
function match_name() {
|
| 122 |
return sprintf( 'referrer - <code>%s</code>', $this->referrer );
|
| 123 |
}
|
matches/url.php
CHANGED
|
@@ -24,7 +24,7 @@ class URL_Match extends Red_Match {
|
|
| 24 |
function name () {
|
| 25 |
return __( 'URL only', 'redirection' );
|
| 26 |
}
|
| 27 |
-
|
| 28 |
function show() {
|
| 29 |
?>
|
| 30 |
<?php if ( $this->action->can_perform_action() ) : ?>
|
|
@@ -46,19 +46,19 @@ class URL_Match extends Red_Match {
|
|
| 46 |
</tr>
|
| 47 |
<?php endif;
|
| 48 |
}
|
| 49 |
-
|
| 50 |
function save( $details ) {
|
| 51 |
if ( !isset( $details['target'] ) || strlen( $details['target'] ) == 0 )
|
| 52 |
$details['target'] = '/';
|
| 53 |
-
|
| 54 |
return array( 'url' => $details['target'] );
|
| 55 |
}
|
| 56 |
-
|
| 57 |
function get_target( $url, $matched_url, $regex ) {
|
| 58 |
$target = $this->url;
|
| 59 |
if ( $regex )
|
| 60 |
$target = preg_replace( '@'.str_replace( '@', '\\@', $matched_url ).'@', $this->url, $url );
|
| 61 |
-
|
| 62 |
if ( $target == '' )
|
| 63 |
return $matched_url;
|
| 64 |
return $target;
|
| 24 |
function name () {
|
| 25 |
return __( 'URL only', 'redirection' );
|
| 26 |
}
|
| 27 |
+
|
| 28 |
function show() {
|
| 29 |
?>
|
| 30 |
<?php if ( $this->action->can_perform_action() ) : ?>
|
| 46 |
</tr>
|
| 47 |
<?php endif;
|
| 48 |
}
|
| 49 |
+
|
| 50 |
function save( $details ) {
|
| 51 |
if ( !isset( $details['target'] ) || strlen( $details['target'] ) == 0 )
|
| 52 |
$details['target'] = '/';
|
| 53 |
+
|
| 54 |
return array( 'url' => $details['target'] );
|
| 55 |
}
|
| 56 |
+
|
| 57 |
function get_target( $url, $matched_url, $regex ) {
|
| 58 |
$target = $this->url;
|
| 59 |
if ( $regex )
|
| 60 |
$target = preg_replace( '@'.str_replace( '@', '\\@', $matched_url ).'@', $this->url, $url );
|
| 61 |
+
|
| 62 |
if ( $target == '' )
|
| 63 |
return $matched_url;
|
| 64 |
return $target;
|
matches/user_agent.php
CHANGED
|
@@ -22,13 +22,13 @@ For full license details see license.txt
|
|
| 22 |
|
| 23 |
class Agent_Match extends Red_Match {
|
| 24 |
var $user_agent;
|
| 25 |
-
|
| 26 |
function name() {
|
| 27 |
return __( 'URL and user agent', 'redirection' );
|
| 28 |
}
|
| 29 |
|
| 30 |
function show() {
|
| 31 |
-
$defined = array(
|
| 32 |
'feedburner|feedvalidator' => __( 'FeedBurner', 'redirection' ),
|
| 33 |
'MSIE' => __( 'Internet Explorer', 'redirection' ),
|
| 34 |
'Firefox' => __( 'FireFox', 'redirection' ),
|
|
@@ -39,7 +39,7 @@ class Agent_Match extends Red_Match {
|
|
| 39 |
'Android' => __( 'Android', 'redirection' ),
|
| 40 |
'Wii' => __( 'Nintendo Wii', 'redirection' ),
|
| 41 |
);
|
| 42 |
-
|
| 43 |
?>
|
| 44 |
<tr>
|
| 45 |
<th width="100"><?php _e( 'User Agent', 'redirection' ); ?>:</th>
|
|
@@ -62,7 +62,7 @@ class Agent_Match extends Red_Match {
|
|
| 62 |
</td>
|
| 63 |
</tr>
|
| 64 |
<?php endif; ?>
|
| 65 |
-
|
| 66 |
<?php if ( $this->action->can_perform_action() ) : ?>
|
| 67 |
</table>
|
| 68 |
<p style="padding: 0.5em"><?php _e( 'The visitor will be redirected from the source URL if the user agent matches. You can specify a <em>matched</em> target URL as the address to send visitors if they do match, and <em>not matched</em> if they don\'t match. Leaving a URL blank means that the visitor is not redirected. <strong>All matches are performed as regular expressions</strong>.
|
|
@@ -94,18 +94,18 @@ class Agent_Match extends Red_Match {
|
|
| 94 |
<?php endif; ?>
|
| 95 |
<?php
|
| 96 |
}
|
| 97 |
-
|
| 98 |
function save( $details ) {
|
| 99 |
if ( isset( $details['target'] ) )
|
| 100 |
$details['url_from'] = $details['target'];
|
| 101 |
-
|
| 102 |
return array(
|
| 103 |
'url_from' => $details['url_from'],
|
| 104 |
'url_notfrom' => $details['url_notfrom'],
|
| 105 |
'user_agent' => $details['user_agent']
|
| 106 |
);
|
| 107 |
}
|
| 108 |
-
|
| 109 |
function initialize( $url ) {
|
| 110 |
$this->url = array( $url, '' );
|
| 111 |
}
|
|
@@ -114,7 +114,7 @@ class Agent_Match extends Red_Match {
|
|
| 114 |
// Match referrer
|
| 115 |
return true;
|
| 116 |
}
|
| 117 |
-
|
| 118 |
function get_target( $url, $matched_url, $regex ) {
|
| 119 |
// Check if referrer matches
|
| 120 |
if ( preg_match( '@'.str_replace( '@', '\\@', $this->user_agent ).'@i', $_SERVER['HTTP_USER_AGENT'], $matches ) > 0 )
|
|
@@ -123,7 +123,7 @@ class Agent_Match extends Red_Match {
|
|
| 123 |
return $this->url_notfrom;
|
| 124 |
return false;
|
| 125 |
}
|
| 126 |
-
|
| 127 |
function match_name() {
|
| 128 |
return sprintf( 'user agent - %s', $this->user_agent );
|
| 129 |
}
|
| 22 |
|
| 23 |
class Agent_Match extends Red_Match {
|
| 24 |
var $user_agent;
|
| 25 |
+
|
| 26 |
function name() {
|
| 27 |
return __( 'URL and user agent', 'redirection' );
|
| 28 |
}
|
| 29 |
|
| 30 |
function show() {
|
| 31 |
+
$defined = array(
|
| 32 |
'feedburner|feedvalidator' => __( 'FeedBurner', 'redirection' ),
|
| 33 |
'MSIE' => __( 'Internet Explorer', 'redirection' ),
|
| 34 |
'Firefox' => __( 'FireFox', 'redirection' ),
|
| 39 |
'Android' => __( 'Android', 'redirection' ),
|
| 40 |
'Wii' => __( 'Nintendo Wii', 'redirection' ),
|
| 41 |
);
|
| 42 |
+
|
| 43 |
?>
|
| 44 |
<tr>
|
| 45 |
<th width="100"><?php _e( 'User Agent', 'redirection' ); ?>:</th>
|
| 62 |
</td>
|
| 63 |
</tr>
|
| 64 |
<?php endif; ?>
|
| 65 |
+
|
| 66 |
<?php if ( $this->action->can_perform_action() ) : ?>
|
| 67 |
</table>
|
| 68 |
<p style="padding: 0.5em"><?php _e( 'The visitor will be redirected from the source URL if the user agent matches. You can specify a <em>matched</em> target URL as the address to send visitors if they do match, and <em>not matched</em> if they don\'t match. Leaving a URL blank means that the visitor is not redirected. <strong>All matches are performed as regular expressions</strong>.
|
| 94 |
<?php endif; ?>
|
| 95 |
<?php
|
| 96 |
}
|
| 97 |
+
|
| 98 |
function save( $details ) {
|
| 99 |
if ( isset( $details['target'] ) )
|
| 100 |
$details['url_from'] = $details['target'];
|
| 101 |
+
|
| 102 |
return array(
|
| 103 |
'url_from' => $details['url_from'],
|
| 104 |
'url_notfrom' => $details['url_notfrom'],
|
| 105 |
'user_agent' => $details['user_agent']
|
| 106 |
);
|
| 107 |
}
|
| 108 |
+
|
| 109 |
function initialize( $url ) {
|
| 110 |
$this->url = array( $url, '' );
|
| 111 |
}
|
| 114 |
// Match referrer
|
| 115 |
return true;
|
| 116 |
}
|
| 117 |
+
|
| 118 |
function get_target( $url, $matched_url, $regex ) {
|
| 119 |
// Check if referrer matches
|
| 120 |
if ( preg_match( '@'.str_replace( '@', '\\@', $this->user_agent ).'@i', $_SERVER['HTTP_USER_AGENT'], $matches ) > 0 )
|
| 123 |
return $this->url_notfrom;
|
| 124 |
return false;
|
| 125 |
}
|
| 126 |
+
|
| 127 |
function match_name() {
|
| 128 |
return sprintf( 'user agent - %s', $this->user_agent );
|
| 129 |
}
|
models/action.php
CHANGED
|
@@ -10,9 +10,9 @@ class Red_Action
|
|
| 10 |
$this->$key = $value;
|
| 11 |
}
|
| 12 |
}
|
| 13 |
-
|
| 14 |
function can_change_code () { return false;}
|
| 15 |
-
|
| 16 |
function config () { }
|
| 17 |
|
| 18 |
function create ($name, $code)
|
|
@@ -22,15 +22,15 @@ class Red_Action
|
|
| 22 |
{
|
| 23 |
if (!class_exists (strtolower ($avail[$name][1])))
|
| 24 |
include (dirname (__FILE__).'/../actions/'.$avail[$name][0]);
|
| 25 |
-
|
| 26 |
$obj = new $avail[$name][1] (array ('action_code' => $code));
|
| 27 |
$obj->type = $name;
|
| 28 |
return $obj;
|
| 29 |
}
|
| 30 |
-
|
| 31 |
return false;
|
| 32 |
}
|
| 33 |
-
|
| 34 |
function available ()
|
| 35 |
{
|
| 36 |
return array
|
|
@@ -42,17 +42,17 @@ class Red_Action
|
|
| 42 |
'pass' => array ('pass.php', 'Pass_Action'),
|
| 43 |
);
|
| 44 |
}
|
| 45 |
-
|
| 46 |
function type ()
|
| 47 |
{
|
| 48 |
return $this->type;
|
| 49 |
}
|
| 50 |
-
|
| 51 |
function process_before ($code, $target) { return true; }
|
| 52 |
function process_after ($code, $target) { return true; }
|
| 53 |
function can_perform_action () { return true; }
|
| 54 |
function action_codes () { return array ();}
|
| 55 |
-
|
| 56 |
function display_actions ()
|
| 57 |
{
|
| 58 |
foreach ($this->action_codes () AS $key => $code)
|
|
@@ -60,4 +60,4 @@ class Red_Action
|
|
| 60 |
}
|
| 61 |
|
| 62 |
}
|
| 63 |
-
?>
|
| 10 |
$this->$key = $value;
|
| 11 |
}
|
| 12 |
}
|
| 13 |
+
|
| 14 |
function can_change_code () { return false;}
|
| 15 |
+
|
| 16 |
function config () { }
|
| 17 |
|
| 18 |
function create ($name, $code)
|
| 22 |
{
|
| 23 |
if (!class_exists (strtolower ($avail[$name][1])))
|
| 24 |
include (dirname (__FILE__).'/../actions/'.$avail[$name][0]);
|
| 25 |
+
|
| 26 |
$obj = new $avail[$name][1] (array ('action_code' => $code));
|
| 27 |
$obj->type = $name;
|
| 28 |
return $obj;
|
| 29 |
}
|
| 30 |
+
|
| 31 |
return false;
|
| 32 |
}
|
| 33 |
+
|
| 34 |
function available ()
|
| 35 |
{
|
| 36 |
return array
|
| 42 |
'pass' => array ('pass.php', 'Pass_Action'),
|
| 43 |
);
|
| 44 |
}
|
| 45 |
+
|
| 46 |
function type ()
|
| 47 |
{
|
| 48 |
return $this->type;
|
| 49 |
}
|
| 50 |
+
|
| 51 |
function process_before ($code, $target) { return true; }
|
| 52 |
function process_after ($code, $target) { return true; }
|
| 53 |
function can_perform_action () { return true; }
|
| 54 |
function action_codes () { return array ();}
|
| 55 |
+
|
| 56 |
function display_actions ()
|
| 57 |
{
|
| 58 |
foreach ($this->action_codes () AS $key => $code)
|
| 60 |
}
|
| 61 |
|
| 62 |
}
|
| 63 |
+
?>
|
models/database.php
CHANGED
|
@@ -18,9 +18,9 @@ class Redirector_Referrer {
|
|
| 18 |
class RE_Database {
|
| 19 |
function install() {
|
| 20 |
global $wpdb;
|
| 21 |
-
|
| 22 |
$create = array(
|
| 23 |
-
"CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}redirection_items`(
|
| 24 |
`id` int(11) unsigned NOT NULL auto_increment,
|
| 25 |
`url` mediumtext NOT NULL,
|
| 26 |
`regex` int(11) unsigned NOT NULL default '0',
|
|
@@ -41,8 +41,8 @@ class RE_Database {
|
|
| 41 |
KEY `group_idpos` (`group_id`,`position`),
|
| 42 |
KEY `group` (`group_id`)
|
| 43 |
)",
|
| 44 |
-
|
| 45 |
-
"CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}redirection_groups`(
|
| 46 |
`id` int(11) NOT NULL auto_increment,
|
| 47 |
`name` varchar(50) NOT NULL,
|
| 48 |
`tracking` int(11) NOT NULL default '1',
|
|
@@ -53,8 +53,8 @@ class RE_Database {
|
|
| 53 |
KEY `module_id` (`module_id`),
|
| 54 |
KEY `status` (`status`)
|
| 55 |
)",
|
| 56 |
-
|
| 57 |
-
"CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}redirection_logs`(
|
| 58 |
`id` int(11) unsigned NOT NULL auto_increment,
|
| 59 |
`created` datetime NOT NULL,
|
| 60 |
`url` mediumtext NOT NULL,
|
|
@@ -72,8 +72,8 @@ class RE_Database {
|
|
| 72 |
KEY `group_id` (`group_id`),
|
| 73 |
KEY `module_id` (`module_id`)
|
| 74 |
)",
|
| 75 |
-
|
| 76 |
-
"CREATE TABLE `{$wpdb->prefix}redirection_modules`(
|
| 77 |
`id` int(11) unsigned NOT NULL auto_increment,
|
| 78 |
`type` varchar(20) NOT NULL default '',
|
| 79 |
`name` varchar(50) NOT NULL default '',
|
|
@@ -104,16 +104,16 @@ class RE_Database {
|
|
| 104 |
$options = get_option( 'redirection_options' );
|
| 105 |
$options['monitor_post'] = 2;
|
| 106 |
$options['monitor_category'] = 2;
|
| 107 |
-
|
| 108 |
update_option( 'redirection_options', $options );
|
| 109 |
}
|
| 110 |
}
|
| 111 |
-
|
| 112 |
function upgrade( $current, $target ) {
|
| 113 |
global $wpdb;
|
| 114 |
|
| 115 |
$wpdb->show_errors();
|
| 116 |
-
|
| 117 |
// No previous version? Install the DB tables
|
| 118 |
if ( $current === false )
|
| 119 |
$success = $this->install();
|
|
@@ -128,81 +128,81 @@ class RE_Database {
|
|
| 128 |
|
| 129 |
if ( version_compare( $current, '2.1.16' ) == -1 )
|
| 130 |
$this->upgrade_to_216();
|
| 131 |
-
|
| 132 |
if ( version_compare( $current, '2.2' ) == -1 )
|
| 133 |
$this->upgrade_to_220();
|
| 134 |
}
|
| 135 |
-
|
| 136 |
// Set our current version
|
| 137 |
update_option( 'redirection_version', $target );
|
| 138 |
|
| 139 |
$wpdb->hide_errors();
|
| 140 |
return $success;
|
| 141 |
}
|
| 142 |
-
|
| 143 |
function upgrade_from_20() {
|
| 144 |
global $wpdb;
|
| 145 |
-
|
| 146 |
$this->upgrade_from_21();
|
| 147 |
$this->upgrade_from_22();
|
| 148 |
}
|
| 149 |
-
|
| 150 |
function upgrade_from_21() {
|
| 151 |
global $wpdb;
|
| 152 |
-
|
| 153 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_items` ADD `title` varchar(50) NULL" );
|
| 154 |
-
|
| 155 |
$this->upgrade_from_22();
|
| 156 |
}
|
| 157 |
-
|
| 158 |
function upgrade_from_22() {
|
| 159 |
global $wpdb;
|
| 160 |
-
|
| 161 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_items` CHANGE `title` `title` varchar(50) NULL" );
|
| 162 |
}
|
| 163 |
-
|
| 164 |
function upgrade_to_216() {
|
| 165 |
global $wpdb;
|
| 166 |
-
|
| 167 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_groups` ADD INDEX(module_id)" );
|
| 168 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_groups` ADD INDEX(status)" );
|
| 169 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_items` ADD INDEX(url(200))" );
|
| 170 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_items` ADD INDEX(status)" );
|
| 171 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_items` ADD INDEX(regex)" );
|
| 172 |
}
|
| 173 |
-
|
| 174 |
function upgrade_to_220() {
|
| 175 |
global $wpdb;
|
| 176 |
-
|
| 177 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_items` ADD INDEX `group_idpos` (`group_id`,`position`)" );
|
| 178 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_items` ADD INDEX `group` (`group_id`)" );
|
| 179 |
-
|
| 180 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_logs` ADD INDEX `group` (`group_id`)" );
|
| 181 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_logs` ADD INDEX `redirection_id` (`redirection_id`)" );
|
| 182 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_logs` ADD INDEX `created` (`created`)" );
|
| 183 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_logs` ADD INDEX `ip` (`ip`)" );
|
| 184 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_logs` ADD INDEX `group_id` (`group_id`)" );
|
| 185 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_logs` ADD INDEX `module_id` (`module_id`)" );
|
| 186 |
-
|
| 187 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_modules` ADD INDEX `name` (`name`)" );
|
| 188 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_modules` ADD INDEX `type` (`type`)" );
|
| 189 |
}
|
| 190 |
-
|
| 191 |
function remove( $plugin ) {
|
| 192 |
global $wpdb;
|
| 193 |
-
|
| 194 |
$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}redirection;" );
|
| 195 |
$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}redirection_items;" );
|
| 196 |
$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}redirection_logs;" );
|
| 197 |
$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}redirection_groups;" );
|
| 198 |
$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}redirection_modules;" );
|
| 199 |
-
|
| 200 |
delete_option( 'redirection_lookup' );
|
| 201 |
delete_option( 'redirection_post' );
|
| 202 |
delete_option( 'redirection_root' );
|
| 203 |
delete_option( 'redirection_index' );
|
| 204 |
delete_option( 'redirection_version' );
|
| 205 |
-
|
| 206 |
$current = get_option( 'active_plugins' );
|
| 207 |
array_splice( $current, array_search( basename( dirname( $plugin ) ).'/'.basename( $plugin ), $current ), 1 );
|
| 208 |
update_option( 'active_plugins', $current );
|
| 18 |
class RE_Database {
|
| 19 |
function install() {
|
| 20 |
global $wpdb;
|
| 21 |
+
|
| 22 |
$create = array(
|
| 23 |
+
"CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}redirection_items`(
|
| 24 |
`id` int(11) unsigned NOT NULL auto_increment,
|
| 25 |
`url` mediumtext NOT NULL,
|
| 26 |
`regex` int(11) unsigned NOT NULL default '0',
|
| 41 |
KEY `group_idpos` (`group_id`,`position`),
|
| 42 |
KEY `group` (`group_id`)
|
| 43 |
)",
|
| 44 |
+
|
| 45 |
+
"CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}redirection_groups`(
|
| 46 |
`id` int(11) NOT NULL auto_increment,
|
| 47 |
`name` varchar(50) NOT NULL,
|
| 48 |
`tracking` int(11) NOT NULL default '1',
|
| 53 |
KEY `module_id` (`module_id`),
|
| 54 |
KEY `status` (`status`)
|
| 55 |
)",
|
| 56 |
+
|
| 57 |
+
"CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}redirection_logs`(
|
| 58 |
`id` int(11) unsigned NOT NULL auto_increment,
|
| 59 |
`created` datetime NOT NULL,
|
| 60 |
`url` mediumtext NOT NULL,
|
| 72 |
KEY `group_id` (`group_id`),
|
| 73 |
KEY `module_id` (`module_id`)
|
| 74 |
)",
|
| 75 |
+
|
| 76 |
+
"CREATE TABLE `{$wpdb->prefix}redirection_modules`(
|
| 77 |
`id` int(11) unsigned NOT NULL auto_increment,
|
| 78 |
`type` varchar(20) NOT NULL default '',
|
| 79 |
`name` varchar(50) NOT NULL default '',
|
| 104 |
$options = get_option( 'redirection_options' );
|
| 105 |
$options['monitor_post'] = 2;
|
| 106 |
$options['monitor_category'] = 2;
|
| 107 |
+
|
| 108 |
update_option( 'redirection_options', $options );
|
| 109 |
}
|
| 110 |
}
|
| 111 |
+
|
| 112 |
function upgrade( $current, $target ) {
|
| 113 |
global $wpdb;
|
| 114 |
|
| 115 |
$wpdb->show_errors();
|
| 116 |
+
|
| 117 |
// No previous version? Install the DB tables
|
| 118 |
if ( $current === false )
|
| 119 |
$success = $this->install();
|
| 128 |
|
| 129 |
if ( version_compare( $current, '2.1.16' ) == -1 )
|
| 130 |
$this->upgrade_to_216();
|
| 131 |
+
|
| 132 |
if ( version_compare( $current, '2.2' ) == -1 )
|
| 133 |
$this->upgrade_to_220();
|
| 134 |
}
|
| 135 |
+
|
| 136 |
// Set our current version
|
| 137 |
update_option( 'redirection_version', $target );
|
| 138 |
|
| 139 |
$wpdb->hide_errors();
|
| 140 |
return $success;
|
| 141 |
}
|
| 142 |
+
|
| 143 |
function upgrade_from_20() {
|
| 144 |
global $wpdb;
|
| 145 |
+
|
| 146 |
$this->upgrade_from_21();
|
| 147 |
$this->upgrade_from_22();
|
| 148 |
}
|
| 149 |
+
|
| 150 |
function upgrade_from_21() {
|
| 151 |
global $wpdb;
|
| 152 |
+
|
| 153 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_items` ADD `title` varchar(50) NULL" );
|
| 154 |
+
|
| 155 |
$this->upgrade_from_22();
|
| 156 |
}
|
| 157 |
+
|
| 158 |
function upgrade_from_22() {
|
| 159 |
global $wpdb;
|
| 160 |
+
|
| 161 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_items` CHANGE `title` `title` varchar(50) NULL" );
|
| 162 |
}
|
| 163 |
+
|
| 164 |
function upgrade_to_216() {
|
| 165 |
global $wpdb;
|
| 166 |
+
|
| 167 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_groups` ADD INDEX(module_id)" );
|
| 168 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_groups` ADD INDEX(status)" );
|
| 169 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_items` ADD INDEX(url(200))" );
|
| 170 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_items` ADD INDEX(status)" );
|
| 171 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_items` ADD INDEX(regex)" );
|
| 172 |
}
|
| 173 |
+
|
| 174 |
function upgrade_to_220() {
|
| 175 |
global $wpdb;
|
| 176 |
+
|
| 177 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_items` ADD INDEX `group_idpos` (`group_id`,`position`)" );
|
| 178 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_items` ADD INDEX `group` (`group_id`)" );
|
| 179 |
+
|
| 180 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_logs` ADD INDEX `group` (`group_id`)" );
|
| 181 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_logs` ADD INDEX `redirection_id` (`redirection_id`)" );
|
| 182 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_logs` ADD INDEX `created` (`created`)" );
|
| 183 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_logs` ADD INDEX `ip` (`ip`)" );
|
| 184 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_logs` ADD INDEX `group_id` (`group_id`)" );
|
| 185 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_logs` ADD INDEX `module_id` (`module_id`)" );
|
| 186 |
+
|
| 187 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_modules` ADD INDEX `name` (`name`)" );
|
| 188 |
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}redirection_modules` ADD INDEX `type` (`type`)" );
|
| 189 |
}
|
| 190 |
+
|
| 191 |
function remove( $plugin ) {
|
| 192 |
global $wpdb;
|
| 193 |
+
|
| 194 |
$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}redirection;" );
|
| 195 |
$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}redirection_items;" );
|
| 196 |
$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}redirection_logs;" );
|
| 197 |
$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}redirection_groups;" );
|
| 198 |
$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}redirection_modules;" );
|
| 199 |
+
|
| 200 |
delete_option( 'redirection_lookup' );
|
| 201 |
delete_option( 'redirection_post' );
|
| 202 |
delete_option( 'redirection_root' );
|
| 203 |
delete_option( 'redirection_index' );
|
| 204 |
delete_option( 'redirection_version' );
|
| 205 |
+
|
| 206 |
$current = get_option( 'active_plugins' );
|
| 207 |
array_splice( $current, array_search( basename( dirname( $plugin ) ).'/'.basename( $plugin ), $current ), 1 );
|
| 208 |
update_option( 'active_plugins', $current );
|
models/file_io.php
CHANGED
|
@@ -3,16 +3,16 @@
|
|
| 3 |
class Red_FileIO
|
| 4 |
{
|
| 5 |
var $items = array ();
|
| 6 |
-
|
| 7 |
function export ($type)
|
| 8 |
{
|
| 9 |
include (dirname (__FILE__).'/../models/pager.php');
|
| 10 |
-
|
| 11 |
$module = Red_Module::get (intval ($_GET['module']));
|
| 12 |
if ($module)
|
| 13 |
{
|
| 14 |
include (dirname (__FILE__)."/../fileio/$type.php");
|
| 15 |
-
|
| 16 |
if ($type == 'rss')
|
| 17 |
$exporter = new Red_Rss_File ();
|
| 18 |
else if ($type == 'xml')
|
|
@@ -26,7 +26,7 @@ class Red_FileIO
|
|
| 26 |
$exporter->feed ();
|
| 27 |
return true;
|
| 28 |
}
|
| 29 |
-
|
| 30 |
return false;
|
| 31 |
}
|
| 32 |
|
|
@@ -49,14 +49,12 @@ class Red_FileIO
|
|
| 49 |
$importer = new Red_Apache_File();
|
| 50 |
$data = @file_get_contents ($file['tmp_name']);
|
| 51 |
}
|
| 52 |
-
|
| 53 |
return $importer->load( $group, $data, $file['tmp_name'] );
|
| 54 |
}
|
| 55 |
|
| 56 |
return 0;
|
| 57 |
}
|
| 58 |
-
|
| 59 |
function load ($group, $data) { }
|
| 60 |
}
|
| 61 |
-
|
| 62 |
-
?>
|
| 3 |
class Red_FileIO
|
| 4 |
{
|
| 5 |
var $items = array ();
|
| 6 |
+
|
| 7 |
function export ($type)
|
| 8 |
{
|
| 9 |
include (dirname (__FILE__).'/../models/pager.php');
|
| 10 |
+
|
| 11 |
$module = Red_Module::get (intval ($_GET['module']));
|
| 12 |
if ($module)
|
| 13 |
{
|
| 14 |
include (dirname (__FILE__)."/../fileio/$type.php");
|
| 15 |
+
|
| 16 |
if ($type == 'rss')
|
| 17 |
$exporter = new Red_Rss_File ();
|
| 18 |
else if ($type == 'xml')
|
| 26 |
$exporter->feed ();
|
| 27 |
return true;
|
| 28 |
}
|
| 29 |
+
|
| 30 |
return false;
|
| 31 |
}
|
| 32 |
|
| 49 |
$importer = new Red_Apache_File();
|
| 50 |
$data = @file_get_contents ($file['tmp_name']);
|
| 51 |
}
|
| 52 |
+
|
| 53 |
return $importer->load( $group, $data, $file['tmp_name'] );
|
| 54 |
}
|
| 55 |
|
| 56 |
return 0;
|
| 57 |
}
|
| 58 |
+
|
| 59 |
function load ($group, $data) { }
|
| 60 |
}
|
|
|
|
|
|
models/group.php
CHANGED
|
@@ -8,7 +8,7 @@ class Red_Group {
|
|
| 8 |
}
|
| 9 |
}
|
| 10 |
}
|
| 11 |
-
|
| 12 |
/**
|
| 13 |
* Get list of groups
|
| 14 |
*/
|
|
@@ -20,10 +20,10 @@ class Red_Group {
|
|
| 20 |
return new Red_Group( $row );
|
| 21 |
return false;
|
| 22 |
}
|
| 23 |
-
|
| 24 |
function get_for_module( $module ) {
|
| 25 |
global $wpdb;
|
| 26 |
-
|
| 27 |
$sql = $wpdb->prepare( "SELECT SQL_CALC_FOUND_ROWS {$wpdb->prefix}redirection_groups.* FROM {$wpdb->prefix}redirection_groups WHERE {$wpdb->prefix}redirection_groups.module_id=%d", $module );
|
| 28 |
|
| 29 |
$rows = $wpdb->get_results( $sql );
|
|
@@ -36,14 +36,14 @@ class Red_Group {
|
|
| 36 |
|
| 37 |
return $items;
|
| 38 |
}
|
| 39 |
-
|
| 40 |
/**
|
| 41 |
* Get all groups with number of items in each group
|
| 42 |
* DBW
|
| 43 |
*/
|
| 44 |
function get_all( $module, $pager ) {
|
| 45 |
global $wpdb;
|
| 46 |
-
|
| 47 |
$sql = $wpdb->prepare( "SELECT SQL_CALC_FOUND_ROWS {$wpdb->prefix}redirection_groups.*,COUNT( {$wpdb->prefix}redirection_items.id ) AS items,SUM( {$wpdb->prefix}redirection_items.last_count ) AS redirects FROM {$wpdb->prefix}redirection_groups LEFT JOIN {$wpdb->prefix}redirection_items ON {$wpdb->prefix}redirection_items.group_id={$wpdb->prefix}redirection_groups.id WHERE {$wpdb->prefix}redirection_groups.module_id=%d", $module );
|
| 48 |
$sql .= str_replace( 'WHERE', 'AND', $pager->to_limits( '', array( 'name' ), '', "GROUP BY {$wpdb->prefix}redirection_groups.id" ) );
|
| 49 |
|
|
@@ -58,14 +58,14 @@ class Red_Group {
|
|
| 58 |
|
| 59 |
return $items;
|
| 60 |
}
|
| 61 |
-
|
| 62 |
/**
|
| 63 |
* Get list of groups
|
| 64 |
* DBW
|
| 65 |
*/
|
| 66 |
function get_for_select() {
|
| 67 |
global $wpdb;
|
| 68 |
-
|
| 69 |
$data = array();
|
| 70 |
$rows = $wpdb->get_results( $wpdb->prepare( "SELECT {$wpdb->prefix}redirection_modules.name AS module_name,{$wpdb->prefix}redirection_groups.name AS group_name,{$wpdb->prefix}redirection_groups.id FROM {$wpdb->prefix}redirection_groups INNER JOIN {$wpdb->prefix}redirection_modules ON {$wpdb->prefix}redirection_modules.id={$wpdb->prefix}redirection_groups.module_id ORDER BY {$wpdb->prefix}redirection_modules.name,{$wpdb->prefix}redirection_groups.position" ) );
|
| 71 |
if ( $rows ) {
|
|
@@ -73,10 +73,10 @@ class Red_Group {
|
|
| 73 |
$data[$row->module_name][$row->id] = $row->group_name;
|
| 74 |
}
|
| 75 |
}
|
| 76 |
-
|
| 77 |
return $data;
|
| 78 |
}
|
| 79 |
-
|
| 80 |
/**
|
| 81 |
* Get first group ID
|
| 82 |
*/
|
|
@@ -88,7 +88,7 @@ class Red_Group {
|
|
| 88 |
|
| 89 |
function create( $data ) {
|
| 90 |
global $wpdb;
|
| 91 |
-
|
| 92 |
$name = trim( $data['name'] );
|
| 93 |
$module = intval( $data['module_id'] );
|
| 94 |
|
|
@@ -107,36 +107,36 @@ class Red_Group {
|
|
| 107 |
$data['status'] = $data['status'];
|
| 108 |
|
| 109 |
$wpdb->insert( $wpdb->prefix.'redirection_groups', $data );
|
| 110 |
-
|
| 111 |
Red_Module::flush( $module );
|
| 112 |
return $wpdb->insert_id;
|
| 113 |
}
|
| 114 |
-
|
| 115 |
return false;
|
| 116 |
}
|
| 117 |
-
|
| 118 |
function update( $data ) {
|
| 119 |
global $wpdb;
|
| 120 |
-
|
| 121 |
$this->tracking = isset( $data['tracking'] ) ? true : false;
|
| 122 |
$this->status = isset( $data['status'] ) ? 'enabled' : 'disabled';
|
| 123 |
-
|
| 124 |
$wpdb->update( $wpdb->prefix.'redirection_groups', array( 'name' => $data['name'], 'status' => $this->status, 'tracking' => intval( $this->tracking ) ), array( 'id' => intval( $this->id ) ) );
|
| 125 |
-
|
| 126 |
Red_Module::flush( $this->module_id );
|
| 127 |
}
|
| 128 |
-
|
| 129 |
function delete( $group ) {
|
| 130 |
global $wpdb;
|
| 131 |
-
|
| 132 |
$obj = Red_Group::get( $group );
|
| 133 |
-
|
| 134 |
// Delete all items in this group
|
| 135 |
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}redirection_items WHERE group_id=%d", $group ) );
|
| 136 |
|
| 137 |
// Delete the group
|
| 138 |
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}redirection_groups WHERE id=%d", $group ) );
|
| 139 |
-
|
| 140 |
// Update positions
|
| 141 |
$rows = $wpdb->get_results( "SELECT id FROM {$wpdb->prefix}redirection_groups ORDER BY position" );
|
| 142 |
if ( count( $rows ) > 0 ) {
|
|
@@ -145,67 +145,67 @@ class Red_Group {
|
|
| 145 |
}
|
| 146 |
}
|
| 147 |
}
|
| 148 |
-
|
| 149 |
function save_order( $items, $start ) {
|
| 150 |
global $wpdb;
|
| 151 |
|
| 152 |
foreach ( $items AS $pos => $id ) {
|
| 153 |
$wpdb->update( $wpdb->prefix.'redirection_groups', array( 'position' => $pos + $start ), array( 'id' => intval( $id ) ) );
|
| 154 |
}
|
| 155 |
-
|
| 156 |
$group = Red_Group::get( $items[0] );
|
| 157 |
Red_Module::flush( $group->module_id );
|
| 158 |
}
|
| 159 |
-
|
| 160 |
function move_to( $module ) {
|
| 161 |
global $wpdb;
|
| 162 |
|
| 163 |
$wpdb->update( $wpdb->prefix.'redirection_groups', array( 'module_id' => intval( $module ) ), array( 'id' => $this->id ) );
|
| 164 |
-
|
| 165 |
Red_Module::flush( $module );
|
| 166 |
Red_Module::flush( $this->id );
|
| 167 |
}
|
| 168 |
-
|
| 169 |
function reset() {
|
| 170 |
global $wpdb;
|
| 171 |
-
|
| 172 |
$this->last_count = 0;
|
| 173 |
$this->last_access = '0000-00-00 00:00:00';
|
| 174 |
-
|
| 175 |
$wpdb->update( $wpdb->prefix.'redirection_items', array( 'last_count' => 0, 'last_access' => $this->last_access ), array( 'group_id' => $this->id ) );
|
| 176 |
-
|
| 177 |
RE_Log::delete_for_group( $this->id );
|
| 178 |
}
|
| 179 |
-
|
| 180 |
function items() {
|
| 181 |
if ( $this->items > 0 )
|
| 182 |
return sprintf( ' (%d)', $this->items );
|
| 183 |
return '';
|
| 184 |
}
|
| 185 |
-
|
| 186 |
function type() {
|
| 187 |
if ( $this->apache )
|
| 188 |
return '.ht';
|
| 189 |
return 'WP';
|
| 190 |
}
|
| 191 |
-
|
| 192 |
function tracked() {
|
| 193 |
if ( $this->tracking == 1 )
|
| 194 |
return __( 'Yes', 'redirection' );
|
| 195 |
return __( 'No', 'redirection' );
|
| 196 |
}
|
| 197 |
-
|
| 198 |
function toggle_status() {
|
| 199 |
global $wpdb;
|
| 200 |
|
| 201 |
$this->status = ( $this->status == 'enabled' ) ? 'disabled' : 'enabled';
|
| 202 |
-
|
| 203 |
$wpdb->update( $wpdb->prefix.'redirection_groups', array( 'status' => $this->status ), array( 'id' => $this->id ) );
|
| 204 |
}
|
| 205 |
-
|
| 206 |
function hits() {
|
| 207 |
global $wpdb;
|
| 208 |
-
|
| 209 |
$count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id) FROM {$wpdb->prefix}redirection_logs WHERE group_id=%d", $this->id ) );
|
| 210 |
if ( $count > 0 )
|
| 211 |
return $count;
|
| 8 |
}
|
| 9 |
}
|
| 10 |
}
|
| 11 |
+
|
| 12 |
/**
|
| 13 |
* Get list of groups
|
| 14 |
*/
|
| 20 |
return new Red_Group( $row );
|
| 21 |
return false;
|
| 22 |
}
|
| 23 |
+
|
| 24 |
function get_for_module( $module ) {
|
| 25 |
global $wpdb;
|
| 26 |
+
|
| 27 |
$sql = $wpdb->prepare( "SELECT SQL_CALC_FOUND_ROWS {$wpdb->prefix}redirection_groups.* FROM {$wpdb->prefix}redirection_groups WHERE {$wpdb->prefix}redirection_groups.module_id=%d", $module );
|
| 28 |
|
| 29 |
$rows = $wpdb->get_results( $sql );
|
| 36 |
|
| 37 |
return $items;
|
| 38 |
}
|
| 39 |
+
|
| 40 |
/**
|
| 41 |
* Get all groups with number of items in each group
|
| 42 |
* DBW
|
| 43 |
*/
|
| 44 |
function get_all( $module, $pager ) {
|
| 45 |
global $wpdb;
|
| 46 |
+
|
| 47 |
$sql = $wpdb->prepare( "SELECT SQL_CALC_FOUND_ROWS {$wpdb->prefix}redirection_groups.*,COUNT( {$wpdb->prefix}redirection_items.id ) AS items,SUM( {$wpdb->prefix}redirection_items.last_count ) AS redirects FROM {$wpdb->prefix}redirection_groups LEFT JOIN {$wpdb->prefix}redirection_items ON {$wpdb->prefix}redirection_items.group_id={$wpdb->prefix}redirection_groups.id WHERE {$wpdb->prefix}redirection_groups.module_id=%d", $module );
|
| 48 |
$sql .= str_replace( 'WHERE', 'AND', $pager->to_limits( '', array( 'name' ), '', "GROUP BY {$wpdb->prefix}redirection_groups.id" ) );
|
| 49 |
|
| 58 |
|
| 59 |
return $items;
|
| 60 |
}
|
| 61 |
+
|
| 62 |
/**
|
| 63 |
* Get list of groups
|
| 64 |
* DBW
|
| 65 |
*/
|
| 66 |
function get_for_select() {
|
| 67 |
global $wpdb;
|
| 68 |
+
|
| 69 |
$data = array();
|
| 70 |
$rows = $wpdb->get_results( $wpdb->prepare( "SELECT {$wpdb->prefix}redirection_modules.name AS module_name,{$wpdb->prefix}redirection_groups.name AS group_name,{$wpdb->prefix}redirection_groups.id FROM {$wpdb->prefix}redirection_groups INNER JOIN {$wpdb->prefix}redirection_modules ON {$wpdb->prefix}redirection_modules.id={$wpdb->prefix}redirection_groups.module_id ORDER BY {$wpdb->prefix}redirection_modules.name,{$wpdb->prefix}redirection_groups.position" ) );
|
| 71 |
if ( $rows ) {
|
| 73 |
$data[$row->module_name][$row->id] = $row->group_name;
|
| 74 |
}
|
| 75 |
}
|
| 76 |
+
|
| 77 |
return $data;
|
| 78 |
}
|
| 79 |
+
|
| 80 |
/**
|
| 81 |
* Get first group ID
|
| 82 |
*/
|
| 88 |
|
| 89 |
function create( $data ) {
|
| 90 |
global $wpdb;
|
| 91 |
+
|
| 92 |
$name = trim( $data['name'] );
|
| 93 |
$module = intval( $data['module_id'] );
|
| 94 |
|
| 107 |
$data['status'] = $data['status'];
|
| 108 |
|
| 109 |
$wpdb->insert( $wpdb->prefix.'redirection_groups', $data );
|
| 110 |
+
|
| 111 |
Red_Module::flush( $module );
|
| 112 |
return $wpdb->insert_id;
|
| 113 |
}
|
| 114 |
+
|
| 115 |
return false;
|
| 116 |
}
|
| 117 |
+
|
| 118 |
function update( $data ) {
|
| 119 |
global $wpdb;
|
| 120 |
+
|
| 121 |
$this->tracking = isset( $data['tracking'] ) ? true : false;
|
| 122 |
$this->status = isset( $data['status'] ) ? 'enabled' : 'disabled';
|
| 123 |
+
|
| 124 |
$wpdb->update( $wpdb->prefix.'redirection_groups', array( 'name' => $data['name'], 'status' => $this->status, 'tracking' => intval( $this->tracking ) ), array( 'id' => intval( $this->id ) ) );
|
| 125 |
+
|
| 126 |
Red_Module::flush( $this->module_id );
|
| 127 |
}
|
| 128 |
+
|
| 129 |
function delete( $group ) {
|
| 130 |
global $wpdb;
|
| 131 |
+
|
| 132 |
$obj = Red_Group::get( $group );
|
| 133 |
+
|
| 134 |
// Delete all items in this group
|
| 135 |
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}redirection_items WHERE group_id=%d", $group ) );
|
| 136 |
|
| 137 |
// Delete the group
|
| 138 |
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}redirection_groups WHERE id=%d", $group ) );
|
| 139 |
+
|
| 140 |
// Update positions
|
| 141 |
$rows = $wpdb->get_results( "SELECT id FROM {$wpdb->prefix}redirection_groups ORDER BY position" );
|
| 142 |
if ( count( $rows ) > 0 ) {
|
| 145 |
}
|
| 146 |
}
|
| 147 |
}
|
| 148 |
+
|
| 149 |
function save_order( $items, $start ) {
|
| 150 |
global $wpdb;
|
| 151 |
|
| 152 |
foreach ( $items AS $pos => $id ) {
|
| 153 |
$wpdb->update( $wpdb->prefix.'redirection_groups', array( 'position' => $pos + $start ), array( 'id' => intval( $id ) ) );
|
| 154 |
}
|
| 155 |
+
|
| 156 |
$group = Red_Group::get( $items[0] );
|
| 157 |
Red_Module::flush( $group->module_id );
|
| 158 |
}
|
| 159 |
+
|
| 160 |
function move_to( $module ) {
|
| 161 |
global $wpdb;
|
| 162 |
|
| 163 |
$wpdb->update( $wpdb->prefix.'redirection_groups', array( 'module_id' => intval( $module ) ), array( 'id' => $this->id ) );
|
| 164 |
+
|
| 165 |
Red_Module::flush( $module );
|
| 166 |
Red_Module::flush( $this->id );
|
| 167 |
}
|
| 168 |
+
|
| 169 |
function reset() {
|
| 170 |
global $wpdb;
|
| 171 |
+
|
| 172 |
$this->last_count = 0;
|
| 173 |
$this->last_access = '0000-00-00 00:00:00';
|
| 174 |
+
|
| 175 |
$wpdb->update( $wpdb->prefix.'redirection_items', array( 'last_count' => 0, 'last_access' => $this->last_access ), array( 'group_id' => $this->id ) );
|
| 176 |
+
|
| 177 |
RE_Log::delete_for_group( $this->id );
|
| 178 |
}
|
| 179 |
+
|
| 180 |
function items() {
|
| 181 |
if ( $this->items > 0 )
|
| 182 |
return sprintf( ' (%d)', $this->items );
|
| 183 |
return '';
|
| 184 |
}
|
| 185 |
+
|
| 186 |
function type() {
|
| 187 |
if ( $this->apache )
|
| 188 |
return '.ht';
|
| 189 |
return 'WP';
|
| 190 |
}
|
| 191 |
+
|
| 192 |
function tracked() {
|
| 193 |
if ( $this->tracking == 1 )
|
| 194 |
return __( 'Yes', 'redirection' );
|
| 195 |
return __( 'No', 'redirection' );
|
| 196 |
}
|
| 197 |
+
|
| 198 |
function toggle_status() {
|
| 199 |
global $wpdb;
|
| 200 |
|
| 201 |
$this->status = ( $this->status == 'enabled' ) ? 'disabled' : 'enabled';
|
| 202 |
+
|
| 203 |
$wpdb->update( $wpdb->prefix.'redirection_groups', array( 'status' => $this->status ), array( 'id' => $this->id ) );
|
| 204 |
}
|
| 205 |
+
|
| 206 |
function hits() {
|
| 207 |
global $wpdb;
|
| 208 |
+
|
| 209 |
$count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id) FROM {$wpdb->prefix}redirection_logs WHERE group_id=%d", $this->id ) );
|
| 210 |
if ( $count > 0 )
|
| 211 |
return $count;
|
models/htaccess.php
CHANGED
|
@@ -4,7 +4,7 @@ class Red_Htaccess
|
|
| 4 |
{
|
| 5 |
var $settings;
|
| 6 |
var $items;
|
| 7 |
-
|
| 8 |
function Red_Htaccess ($settings)
|
| 9 |
{
|
| 10 |
foreach ($settings AS $key => $value)
|
|
@@ -15,7 +15,7 @@ class Red_Htaccess
|
|
| 15 |
{
|
| 16 |
return '^'.$this->encode ($url).'$';
|
| 17 |
}
|
| 18 |
-
|
| 19 |
function encode2nd ($url)
|
| 20 |
{
|
| 21 |
$url = urlencode ($url);
|
|
@@ -25,7 +25,7 @@ class Red_Htaccess
|
|
| 25 |
$url = str_replace ('%24', '$', $url);
|
| 26 |
return $url;
|
| 27 |
}
|
| 28 |
-
|
| 29 |
function encode ($url)
|
| 30 |
{
|
| 31 |
$url = urlencode ($url);
|
|
@@ -34,7 +34,7 @@ class Red_Htaccess
|
|
| 34 |
$url = str_replace ('.', '\\.', $url);
|
| 35 |
return $url;
|
| 36 |
}
|
| 37 |
-
|
| 38 |
function encode_regex ($url)
|
| 39 |
{
|
| 40 |
$url = str_replace (' ', '%20', $url);
|
|
@@ -43,13 +43,13 @@ class Red_Htaccess
|
|
| 43 |
$url = str_replace ('%24', '$', $url);
|
| 44 |
return $url;
|
| 45 |
}
|
| 46 |
-
|
| 47 |
function add_referrer ($item, $match)
|
| 48 |
{
|
| 49 |
$from = $this->encode_from (ltrim ($item->url, '/'));
|
| 50 |
if ($item->regex)
|
| 51 |
$from = $this->encode_regex (ltrim ($item->url, '/'));
|
| 52 |
-
|
| 53 |
if (($match->url_from || $match->url_notfrom) && $match->referrer)
|
| 54 |
{
|
| 55 |
$this->items[] = sprintf ('RewriteCond %%{HTTP_REFERER} %s [NC]', ($match->regex ? $this->encode_regex ($match->referrer) : $this->encode_from ($match->referrer)));
|
|
@@ -59,7 +59,7 @@ class Red_Htaccess
|
|
| 59 |
$to = $this->target ($item->action_type, $match->url_from, $item->action_code, $item->regex);
|
| 60 |
$this->items[] = sprintf ('RewriteRule %s %s', $from, $to);
|
| 61 |
}
|
| 62 |
-
|
| 63 |
if ($match->url_notfrom)
|
| 64 |
{
|
| 65 |
$to = $this->target ($item->action_type, $match->url_notfrom, $item->action_code, $item->regex);
|
|
@@ -67,23 +67,23 @@ class Red_Htaccess
|
|
| 67 |
}
|
| 68 |
}
|
| 69 |
}
|
| 70 |
-
|
| 71 |
function add_agent ($item, $match)
|
| 72 |
{
|
| 73 |
$from = $this->encode (ltrim ($item->url, '/'));
|
| 74 |
if ($item->regex)
|
| 75 |
$from = $this->encode_regex (ltrim ($item->url, '/'));
|
| 76 |
-
|
| 77 |
if (($match->url_from || $match->url_notfrom) && $match->user_agent)
|
| 78 |
{
|
| 79 |
$this->items[] = sprintf ('RewriteCond %%{HTTP_USER_AGENT} %s [NC]', ($match->regex ? $this->encode_regex ($match->user_agent) : $this->encode2nd ($match->user_agent)));
|
| 80 |
-
|
| 81 |
if ($match->url_from)
|
| 82 |
{
|
| 83 |
$to = $this->target ($item->action_type, $match->url_from, $item->action_code, $item->regex);
|
| 84 |
$this->items[] = sprintf ('RewriteRule %s %s', $from, $to);
|
| 85 |
}
|
| 86 |
-
|
| 87 |
if ($match->url_notfrom)
|
| 88 |
{
|
| 89 |
$to = $this->target ($item->action_type, $match->url_notfrom, $item->action_code, $item->regex);
|
|
@@ -91,29 +91,29 @@ class Red_Htaccess
|
|
| 91 |
}
|
| 92 |
}
|
| 93 |
}
|
| 94 |
-
|
| 95 |
function add_url ($item, $match)
|
| 96 |
{
|
| 97 |
$to = $this->target ($item->action_type, $match->url, $item->action_code, $item->regex);
|
| 98 |
$from = $this->encode_from (ltrim ($item->url, '/'));
|
| 99 |
if ($item->regex)
|
| 100 |
$from = $this->encode_regex (ltrim ($item->url, '/'));
|
| 101 |
-
|
| 102 |
if ($to)
|
| 103 |
$this->items[] = sprintf ('RewriteRule %s %s', $from, $to);
|
| 104 |
}
|
| 105 |
-
|
| 106 |
function action_random ($data, $code, $regex)
|
| 107 |
{
|
| 108 |
// Pick a WP post at random
|
| 109 |
global $wpdb;
|
| 110 |
-
|
| 111 |
$post = $wpdb->get_var ("SELECT ID FROM {$wpdb->posts} ORDER BY RAND() LIMIT 0,1");
|
| 112 |
$url = parse_url (get_permalink ($post));
|
| 113 |
-
|
| 114 |
return sprintf ('%s [R=%d,L]', $this->encode ($url['path']), $code);
|
| 115 |
}
|
| 116 |
-
|
| 117 |
function action_pass ($data, $code, $regex)
|
| 118 |
{
|
| 119 |
if ($regex)
|
|
@@ -121,14 +121,14 @@ class Red_Htaccess
|
|
| 121 |
else
|
| 122 |
return sprintf ('%s [L]', $this->encode2nd ($data), $code);
|
| 123 |
}
|
| 124 |
-
|
| 125 |
function action_error ($data, $code, $regex)
|
| 126 |
{
|
| 127 |
if ($code == '410')
|
| 128 |
return '/ [G,L]';
|
| 129 |
return '/ [F,L]';
|
| 130 |
}
|
| 131 |
-
|
| 132 |
function action_url ($data, $code, $regex)
|
| 133 |
{
|
| 134 |
if ($regex)
|
|
@@ -136,7 +136,7 @@ class Red_Htaccess
|
|
| 136 |
else
|
| 137 |
return sprintf ('%s [R=%d,L]', $this->encode2nd ($data), $code);
|
| 138 |
}
|
| 139 |
-
|
| 140 |
function target ($action, $data, $code, $regex)
|
| 141 |
{
|
| 142 |
$target = 'action_'.$action;
|
|
@@ -145,36 +145,36 @@ class Red_Htaccess
|
|
| 145 |
return $this->$target ($data, $code, $regex);
|
| 146 |
return '';
|
| 147 |
}
|
| 148 |
-
|
| 149 |
function add ($item)
|
| 150 |
{
|
| 151 |
$target = 'add_'.$item->match_type;
|
| 152 |
-
|
| 153 |
if (method_exists ($this, $target))
|
| 154 |
$this->$target ($item, $item->match);
|
| 155 |
}
|
| 156 |
-
|
| 157 |
function generate ($name)
|
| 158 |
{
|
| 159 |
// Head of redirection section - do not localize this
|
| 160 |
global $redirection;
|
| 161 |
-
|
| 162 |
$text[] = '# Created by Redirection Module: '.$name;
|
| 163 |
$text[] = '# '.date ('r');
|
| 164 |
$text[] = '# Redirection '.$redirection->version ().' - http://urbangiraffe.com/plugins/redirection/';
|
| 165 |
$text[] = '';
|
| 166 |
-
|
| 167 |
// Default blocked files - I can't think of a reason not to block these
|
| 168 |
$text[] = '<Files .htaccess,.svn>';
|
| 169 |
$text[] = 'order allow,deny';
|
| 170 |
$text[] = 'deny from all';
|
| 171 |
$text[] = '</Files>';
|
| 172 |
$text[] = '';
|
| 173 |
-
|
| 174 |
// PHP options
|
| 175 |
if (isset ($this->settings['error_level']) && $this->settings['error_level'] != 'default')
|
| 176 |
$text[] = 'php_value error_reporting '.($this->settings == 'none' ? '0' : 'E_ALL');
|
| 177 |
-
|
| 178 |
if (isset ($this->settings['memory_limit']) && $this->settings['memory_limit'] != 0)
|
| 179 |
$text[] = 'php_value memory_limit '.$this->settings['memory_limit'].'M';
|
| 180 |
|
|
@@ -191,7 +191,7 @@ class Red_Htaccess
|
|
| 191 |
$text[] = 'deny from '.$ip;
|
| 192 |
}
|
| 193 |
}
|
| 194 |
-
|
| 195 |
if ($this->settings['allow_ip'])
|
| 196 |
{
|
| 197 |
$ips = array_filter (explode (',', $this->settings['allow_ip']));
|
|
@@ -217,10 +217,10 @@ class Red_Htaccess
|
|
| 217 |
$base = $this->settings['site'];
|
| 218 |
if ($base == '')
|
| 219 |
$base = get_option ('home');
|
| 220 |
-
|
| 221 |
$parts = parse_url ($base);
|
| 222 |
$base = str_replace ('www.', '', $parts['host']);
|
| 223 |
-
|
| 224 |
if ($this->settings['canonical'] == 'nowww')
|
| 225 |
{
|
| 226 |
$text[] = 'RewriteCond %{HTTP_HOST} ^www\.'.str_replace ('.', '\\.', $base).'$ [NC]';
|
|
@@ -231,7 +231,7 @@ class Red_Htaccess
|
|
| 231 |
$text[] = 'RewriteCond %{HTTP_HOST} ^'.str_replace ('.', '\\.', $base).'$ [NC]';
|
| 232 |
$text[] = 'RewriteRule ^(.*)$ http://www.'.$base.'/$1 [R=301,L]';
|
| 233 |
}
|
| 234 |
-
|
| 235 |
$text[] = '';
|
| 236 |
}
|
| 237 |
|
|
@@ -241,47 +241,47 @@ class Red_Htaccess
|
|
| 241 |
$text[] = 'RewriteRule ^(.*)index\.(php|html|htm)$ $1 [R=301,NC,L]';
|
| 242 |
$text[] = '';
|
| 243 |
}
|
| 244 |
-
|
| 245 |
// Add redirects
|
| 246 |
if (is_array ($this->items))
|
| 247 |
$text = array_merge ($text, $this->items);
|
| 248 |
-
|
| 249 |
// End of mod_rewrite
|
| 250 |
$text[] = '</IfModule>';
|
| 251 |
$text[] = '';
|
| 252 |
-
|
| 253 |
if ($this->settings['raw'])
|
| 254 |
$text[] = $this->settings['raw'];
|
| 255 |
-
|
| 256 |
// End of redirection section
|
| 257 |
$text[] = '# End of Redirection';
|
| 258 |
$text[] = '';
|
| 259 |
-
|
| 260 |
$text = implode ("\r\n", $text);
|
| 261 |
$text = str_replace ("\r\n\r\n\r\n", "\r\n", $text);
|
| 262 |
$text = str_replace ("\r\n\r\n\r\n", "\r\n", $text);
|
| 263 |
return $text;
|
| 264 |
}
|
| 265 |
-
|
| 266 |
function save ($filename, $name)
|
| 267 |
{
|
| 268 |
$text = $this->generate ($name);
|
| 269 |
-
|
| 270 |
// Does the file already exist?
|
| 271 |
if (file_exists ($filename))
|
| 272 |
{
|
| 273 |
$existing = @file_get_contents ($filename);
|
| 274 |
-
|
| 275 |
// Remove any existing Redirection module
|
| 276 |
$text .= preg_replace ('@# Created by Redirection Module: '.$name.'(.*?)# End of Redirection@s', '', $existing);
|
| 277 |
}
|
| 278 |
-
|
| 279 |
$file = @fopen ($filename, 'w');
|
| 280 |
if ($file)
|
| 281 |
{
|
| 282 |
$text = str_replace ("\r\n\r\n\r\n", "\r\n", $text);
|
| 283 |
$text = str_replace ("\r\n\r\n\r\n", "\r\n", $text);
|
| 284 |
-
|
| 285 |
fwrite ($file, $text);
|
| 286 |
fclose ($file);
|
| 287 |
return true;
|
| 4 |
{
|
| 5 |
var $settings;
|
| 6 |
var $items;
|
| 7 |
+
|
| 8 |
function Red_Htaccess ($settings)
|
| 9 |
{
|
| 10 |
foreach ($settings AS $key => $value)
|
| 15 |
{
|
| 16 |
return '^'.$this->encode ($url).'$';
|
| 17 |
}
|
| 18 |
+
|
| 19 |
function encode2nd ($url)
|
| 20 |
{
|
| 21 |
$url = urlencode ($url);
|
| 25 |
$url = str_replace ('%24', '$', $url);
|
| 26 |
return $url;
|
| 27 |
}
|
| 28 |
+
|
| 29 |
function encode ($url)
|
| 30 |
{
|
| 31 |
$url = urlencode ($url);
|
| 34 |
$url = str_replace ('.', '\\.', $url);
|
| 35 |
return $url;
|
| 36 |
}
|
| 37 |
+
|
| 38 |
function encode_regex ($url)
|
| 39 |
{
|
| 40 |
$url = str_replace (' ', '%20', $url);
|
| 43 |
$url = str_replace ('%24', '$', $url);
|
| 44 |
return $url;
|
| 45 |
}
|
| 46 |
+
|
| 47 |
function add_referrer ($item, $match)
|
| 48 |
{
|
| 49 |
$from = $this->encode_from (ltrim ($item->url, '/'));
|
| 50 |
if ($item->regex)
|
| 51 |
$from = $this->encode_regex (ltrim ($item->url, '/'));
|
| 52 |
+
|
| 53 |
if (($match->url_from || $match->url_notfrom) && $match->referrer)
|
| 54 |
{
|
| 55 |
$this->items[] = sprintf ('RewriteCond %%{HTTP_REFERER} %s [NC]', ($match->regex ? $this->encode_regex ($match->referrer) : $this->encode_from ($match->referrer)));
|
| 59 |
$to = $this->target ($item->action_type, $match->url_from, $item->action_code, $item->regex);
|
| 60 |
$this->items[] = sprintf ('RewriteRule %s %s', $from, $to);
|
| 61 |
}
|
| 62 |
+
|
| 63 |
if ($match->url_notfrom)
|
| 64 |
{
|
| 65 |
$to = $this->target ($item->action_type, $match->url_notfrom, $item->action_code, $item->regex);
|
| 67 |
}
|
| 68 |
}
|
| 69 |
}
|
| 70 |
+
|
| 71 |
function add_agent ($item, $match)
|
| 72 |
{
|
| 73 |
$from = $this->encode (ltrim ($item->url, '/'));
|
| 74 |
if ($item->regex)
|
| 75 |
$from = $this->encode_regex (ltrim ($item->url, '/'));
|
| 76 |
+
|
| 77 |
if (($match->url_from || $match->url_notfrom) && $match->user_agent)
|
| 78 |
{
|
| 79 |
$this->items[] = sprintf ('RewriteCond %%{HTTP_USER_AGENT} %s [NC]', ($match->regex ? $this->encode_regex ($match->user_agent) : $this->encode2nd ($match->user_agent)));
|
| 80 |
+
|
| 81 |
if ($match->url_from)
|
| 82 |
{
|
| 83 |
$to = $this->target ($item->action_type, $match->url_from, $item->action_code, $item->regex);
|
| 84 |
$this->items[] = sprintf ('RewriteRule %s %s', $from, $to);
|
| 85 |
}
|
| 86 |
+
|
| 87 |
if ($match->url_notfrom)
|
| 88 |
{
|
| 89 |
$to = $this->target ($item->action_type, $match->url_notfrom, $item->action_code, $item->regex);
|
| 91 |
}
|
| 92 |
}
|
| 93 |
}
|
| 94 |
+
|
| 95 |
function add_url ($item, $match)
|
| 96 |
{
|
| 97 |
$to = $this->target ($item->action_type, $match->url, $item->action_code, $item->regex);
|
| 98 |
$from = $this->encode_from (ltrim ($item->url, '/'));
|
| 99 |
if ($item->regex)
|
| 100 |
$from = $this->encode_regex (ltrim ($item->url, '/'));
|
| 101 |
+
|
| 102 |
if ($to)
|
| 103 |
$this->items[] = sprintf ('RewriteRule %s %s', $from, $to);
|
| 104 |
}
|
| 105 |
+
|
| 106 |
function action_random ($data, $code, $regex)
|
| 107 |
{
|
| 108 |
// Pick a WP post at random
|
| 109 |
global $wpdb;
|
| 110 |
+
|
| 111 |
$post = $wpdb->get_var ("SELECT ID FROM {$wpdb->posts} ORDER BY RAND() LIMIT 0,1");
|
| 112 |
$url = parse_url (get_permalink ($post));
|
| 113 |
+
|
| 114 |
return sprintf ('%s [R=%d,L]', $this->encode ($url['path']), $code);
|
| 115 |
}
|
| 116 |
+
|
| 117 |
function action_pass ($data, $code, $regex)
|
| 118 |
{
|
| 119 |
if ($regex)
|
| 121 |
else
|
| 122 |
return sprintf ('%s [L]', $this->encode2nd ($data), $code);
|
| 123 |
}
|
| 124 |
+
|
| 125 |
function action_error ($data, $code, $regex)
|
| 126 |
{
|
| 127 |
if ($code == '410')
|
| 128 |
return '/ [G,L]';
|
| 129 |
return '/ [F,L]';
|
| 130 |
}
|
| 131 |
+
|
| 132 |
function action_url ($data, $code, $regex)
|
| 133 |
{
|
| 134 |
if ($regex)
|
| 136 |
else
|
| 137 |
return sprintf ('%s [R=%d,L]', $this->encode2nd ($data), $code);
|
| 138 |
}
|
| 139 |
+
|
| 140 |
function target ($action, $data, $code, $regex)
|
| 141 |
{
|
| 142 |
$target = 'action_'.$action;
|
| 145 |
return $this->$target ($data, $code, $regex);
|
| 146 |
return '';
|
| 147 |
}
|
| 148 |
+
|
| 149 |
function add ($item)
|
| 150 |
{
|
| 151 |
$target = 'add_'.$item->match_type;
|
| 152 |
+
|
| 153 |
if (method_exists ($this, $target))
|
| 154 |
$this->$target ($item, $item->match);
|
| 155 |
}
|
| 156 |
+
|
| 157 |
function generate ($name)
|
| 158 |
{
|
| 159 |
// Head of redirection section - do not localize this
|
| 160 |
global $redirection;
|
| 161 |
+
|
| 162 |
$text[] = '# Created by Redirection Module: '.$name;
|
| 163 |
$text[] = '# '.date ('r');
|
| 164 |
$text[] = '# Redirection '.$redirection->version ().' - http://urbangiraffe.com/plugins/redirection/';
|
| 165 |
$text[] = '';
|
| 166 |
+
|
| 167 |
// Default blocked files - I can't think of a reason not to block these
|
| 168 |
$text[] = '<Files .htaccess,.svn>';
|
| 169 |
$text[] = 'order allow,deny';
|
| 170 |
$text[] = 'deny from all';
|
| 171 |
$text[] = '</Files>';
|
| 172 |
$text[] = '';
|
| 173 |
+
|
| 174 |
// PHP options
|
| 175 |
if (isset ($this->settings['error_level']) && $this->settings['error_level'] != 'default')
|
| 176 |
$text[] = 'php_value error_reporting '.($this->settings == 'none' ? '0' : 'E_ALL');
|
| 177 |
+
|
| 178 |
if (isset ($this->settings['memory_limit']) && $this->settings['memory_limit'] != 0)
|
| 179 |
$text[] = 'php_value memory_limit '.$this->settings['memory_limit'].'M';
|
| 180 |
|
| 191 |
$text[] = 'deny from '.$ip;
|
| 192 |
}
|
| 193 |
}
|
| 194 |
+
|
| 195 |
if ($this->settings['allow_ip'])
|
| 196 |
{
|
| 197 |
$ips = array_filter (explode (',', $this->settings['allow_ip']));
|
| 217 |
$base = $this->settings['site'];
|
| 218 |
if ($base == '')
|
| 219 |
$base = get_option ('home');
|
| 220 |
+
|
| 221 |
$parts = parse_url ($base);
|
| 222 |
$base = str_replace ('www.', '', $parts['host']);
|
| 223 |
+
|
| 224 |
if ($this->settings['canonical'] == 'nowww')
|
| 225 |
{
|
| 226 |
$text[] = 'RewriteCond %{HTTP_HOST} ^www\.'.str_replace ('.', '\\.', $base).'$ [NC]';
|
| 231 |
$text[] = 'RewriteCond %{HTTP_HOST} ^'.str_replace ('.', '\\.', $base).'$ [NC]';
|
| 232 |
$text[] = 'RewriteRule ^(.*)$ http://www.'.$base.'/$1 [R=301,L]';
|
| 233 |
}
|
| 234 |
+
|
| 235 |
$text[] = '';
|
| 236 |
}
|
| 237 |
|
| 241 |
$text[] = 'RewriteRule ^(.*)index\.(php|html|htm)$ $1 [R=301,NC,L]';
|
| 242 |
$text[] = '';
|
| 243 |
}
|
| 244 |
+
|
| 245 |
// Add redirects
|
| 246 |
if (is_array ($this->items))
|
| 247 |
$text = array_merge ($text, $this->items);
|
| 248 |
+
|
| 249 |
// End of mod_rewrite
|
| 250 |
$text[] = '</IfModule>';
|
| 251 |
$text[] = '';
|
| 252 |
+
|
| 253 |
if ($this->settings['raw'])
|
| 254 |
$text[] = $this->settings['raw'];
|
| 255 |
+
|
| 256 |
// End of redirection section
|
| 257 |
$text[] = '# End of Redirection';
|
| 258 |
$text[] = '';
|
| 259 |
+
|
| 260 |
$text = implode ("\r\n", $text);
|
| 261 |
$text = str_replace ("\r\n\r\n\r\n", "\r\n", $text);
|
| 262 |
$text = str_replace ("\r\n\r\n\r\n", "\r\n", $text);
|
| 263 |
return $text;
|
| 264 |
}
|
| 265 |
+
|
| 266 |
function save ($filename, $name)
|
| 267 |
{
|
| 268 |
$text = $this->generate ($name);
|
| 269 |
+
|
| 270 |
// Does the file already exist?
|
| 271 |
if (file_exists ($filename))
|
| 272 |
{
|
| 273 |
$existing = @file_get_contents ($filename);
|
| 274 |
+
|
| 275 |
// Remove any existing Redirection module
|
| 276 |
$text .= preg_replace ('@# Created by Redirection Module: '.$name.'(.*?)# End of Redirection@s', '', $existing);
|
| 277 |
}
|
| 278 |
+
|
| 279 |
$file = @fopen ($filename, 'w');
|
| 280 |
if ($file)
|
| 281 |
{
|
| 282 |
$text = str_replace ("\r\n\r\n\r\n", "\r\n", $text);
|
| 283 |
$text = str_replace ("\r\n\r\n\r\n", "\r\n", $text);
|
| 284 |
+
|
| 285 |
fwrite ($file, $text);
|
| 286 |
fclose ($file);
|
| 287 |
return true;
|
models/log.php
CHANGED
|
@@ -28,104 +28,104 @@ class RE_Log {
|
|
| 28 |
var $referrer;
|
| 29 |
var $ip;
|
| 30 |
var $redirection_id;
|
| 31 |
-
|
| 32 |
function RE_Log ($values)
|
| 33 |
{
|
| 34 |
foreach ($values AS $key => $value)
|
| 35 |
$this->$key = $value;
|
| 36 |
-
|
| 37 |
$this->created = mysql2date ('U', $this->created);
|
| 38 |
$this->url = stripslashes ($this->url);
|
| 39 |
}
|
| 40 |
-
|
| 41 |
function get_by_id ($id)
|
| 42 |
{
|
| 43 |
global $wpdb;
|
| 44 |
-
|
| 45 |
$row = $wpdb->get_row ("SELECT * FROM {$wpdb->prefix}redirection_logs WHERE id='$id'", ARRAY_A);
|
| 46 |
if ($row)
|
| 47 |
return new RE_Log ($row);
|
| 48 |
return false;
|
| 49 |
}
|
| 50 |
-
|
| 51 |
function get( &$pager ) {
|
| 52 |
global $wpdb;
|
| 53 |
-
|
| 54 |
$rows = $wpdb->get_results( "SELECT SQL_CALC_FOUND_ROWS * FROM {$wpdb->prefix}redirection_logs FORCE INDEX(created) ".$pager->to_limits ('redirection_id IS NOT NULL', array ('url', 'sent_to', 'ip')), ARRAY_A );
|
| 55 |
$pager->set_total ($wpdb->get_var ("SELECT FOUND_ROWS()"));
|
| 56 |
-
|
| 57 |
$items = array ();
|
| 58 |
if (count ($rows) > 0)
|
| 59 |
{
|
| 60 |
foreach ($rows AS $row)
|
| 61 |
$items[] = new RE_Log ($row);
|
| 62 |
}
|
| 63 |
-
|
| 64 |
return $items;
|
| 65 |
}
|
| 66 |
-
|
| 67 |
function get_by_group (&$pager, $group)
|
| 68 |
{
|
| 69 |
global $wpdb;
|
| 70 |
-
|
| 71 |
$rows = $wpdb->get_results ("SELECT SQL_CALC_FOUND_ROWS * FROM {$wpdb->prefix}redirection_logs".$pager->to_limits ("redirection_id IS NOT NULL AND group_id='".$group."'", array ('url', 'sent_to', 'ip')), ARRAY_A);
|
| 72 |
$pager->set_total ($wpdb->get_var ("SELECT FOUND_ROWS()"));
|
| 73 |
-
|
| 74 |
$items = array ();
|
| 75 |
if (count ($rows) > 0)
|
| 76 |
{
|
| 77 |
foreach ($rows AS $row)
|
| 78 |
$items[] = new RE_Log ($row);
|
| 79 |
}
|
| 80 |
-
|
| 81 |
return $items;
|
| 82 |
}
|
| 83 |
-
|
| 84 |
function get_by_module (&$pager, $module)
|
| 85 |
{
|
| 86 |
global $wpdb;
|
| 87 |
|
| 88 |
$rows = $wpdb->get_results ("SELECT SQL_CALC_FOUND_ROWS * FROM {$wpdb->prefix}redirection_logs".$pager->to_limits ("module_id='".$module."'", array ('url', 'sent_to', 'ip')), ARRAY_A);
|
| 89 |
$pager->set_total ($wpdb->get_var ("SELECT FOUND_ROWS()"));
|
| 90 |
-
|
| 91 |
$items = array ();
|
| 92 |
if (count ($rows) > 0)
|
| 93 |
{
|
| 94 |
foreach ($rows AS $row)
|
| 95 |
$items[] = new RE_Log ($row);
|
| 96 |
}
|
| 97 |
-
|
| 98 |
return $items;
|
| 99 |
}
|
| 100 |
-
|
| 101 |
function get_by_redirect (&$pager, $redirect)
|
| 102 |
{
|
| 103 |
global $wpdb;
|
| 104 |
-
|
| 105 |
$rows = $wpdb->get_results ("SELECT SQL_CALC_FOUND_ROWS * FROM {$wpdb->prefix}redirection_logs".$pager->to_limits ("redirection_id=$redirect", array ('url', 'sent_to', 'ip')), ARRAY_A);
|
| 106 |
$pager->set_total ($wpdb->get_var ("SELECT FOUND_ROWS()"));
|
| 107 |
-
|
| 108 |
$items = array ();
|
| 109 |
if (count ($rows) > 0)
|
| 110 |
{
|
| 111 |
foreach ($rows AS $row)
|
| 112 |
$items[] = new RE_Log ($row);
|
| 113 |
}
|
| 114 |
-
|
| 115 |
return $items;
|
| 116 |
}
|
| 117 |
-
|
| 118 |
function create ($url, $target, $agent, $ip, $referrer, $redirection_id = 'NULL', $module_id = 'NULL', $group_id = 'NULL') {
|
| 119 |
global $wpdb, $redirection;
|
| 120 |
-
|
| 121 |
$wpdb->query( $wpdb->prepare( "INSERT INTO {$wpdb->prefix}redirection_logs (url,sent_to,created,agent,redirection_id,ip,referrer,module_id,group_id) VALUES (%s,%s,NOW(),%s,%d,%s,%s,%d,%d)", $url, $target, $agent, $redirection_id, $ip, $referrer, $module_id, $group_id ) );
|
| 122 |
-
|
| 123 |
// Expire old entries
|
| 124 |
$options = $redirection->get_options ();
|
| 125 |
if ($options['expire'] != 0)
|
| 126 |
$wpdb->query ("DELETE FROM {$wpdb->prefix}redirection_logs WHERE created < DATE_SUB(NOW(), INTERVAL ".$options['expire']." DAY)");
|
| 127 |
}
|
| 128 |
-
|
| 129 |
function show_url ($url)
|
| 130 |
{
|
| 131 |
return implode ('​/', explode ('/', substr (esc_html ($url), 0, 80))).(strlen ($url) > 80 ? '...' : '');
|
|
@@ -136,19 +136,19 @@ class RE_Log {
|
|
| 136 |
global $wpdb;
|
| 137 |
$wpdb->query ("DELETE FROM {$wpdb->prefix}redirection_logs WHERE id='$id'");
|
| 138 |
}
|
| 139 |
-
|
| 140 |
function delete_404 ($pager)
|
| 141 |
{
|
| 142 |
global $wpdb;
|
| 143 |
$wpdb->query ("DELETE FROM {$wpdb->prefix}redirection_logs ".$pager->to_conditions ('redirection_id IS NULL', array ('url', 'sent_to', 'ip')));
|
| 144 |
}
|
| 145 |
-
|
| 146 |
function delete_for_id ($id)
|
| 147 |
{
|
| 148 |
global $wpdb;
|
| 149 |
$wpdb->query ("DELETE FROM {$wpdb->prefix}redirection_logs WHERE redirection_id='$id'");
|
| 150 |
}
|
| 151 |
-
|
| 152 |
function delete_for_group ($id)
|
| 153 |
{
|
| 154 |
global $wpdb;
|
|
@@ -160,11 +160,11 @@ class RE_Log {
|
|
| 160 |
global $wpdb;
|
| 161 |
$wpdb->query ("DELETE FROM {$wpdb->prefix}redirection_logs WHERE module_id=$id");
|
| 162 |
}
|
| 163 |
-
|
| 164 |
function delete_all ($cond, $pager)
|
| 165 |
{
|
| 166 |
global $wpdb;
|
| 167 |
-
|
| 168 |
$sql = 'redirection_id IS NOT NULL';
|
| 169 |
if (!empty ($cond))
|
| 170 |
{
|
|
@@ -175,7 +175,7 @@ class RE_Log {
|
|
| 175 |
|
| 176 |
$wpdb->query ("DELETE FROM {$wpdb->prefix}redirection_logs ".$pager->to_conditions ($sql, array ('url', 'sent_to', 'ip')));
|
| 177 |
}
|
| 178 |
-
|
| 179 |
function referrer ()
|
| 180 |
{
|
| 181 |
return preg_replace ('@https?://(.*?)/.*@', '$1', $this->referrer);
|
| 28 |
var $referrer;
|
| 29 |
var $ip;
|
| 30 |
var $redirection_id;
|
| 31 |
+
|
| 32 |
function RE_Log ($values)
|
| 33 |
{
|
| 34 |
foreach ($values AS $key => $value)
|
| 35 |
$this->$key = $value;
|
| 36 |
+
|
| 37 |
$this->created = mysql2date ('U', $this->created);
|
| 38 |
$this->url = stripslashes ($this->url);
|
| 39 |
}
|
| 40 |
+
|
| 41 |
function get_by_id ($id)
|
| 42 |
{
|
| 43 |
global $wpdb;
|
| 44 |
+
|
| 45 |
$row = $wpdb->get_row ("SELECT * FROM {$wpdb->prefix}redirection_logs WHERE id='$id'", ARRAY_A);
|
| 46 |
if ($row)
|
| 47 |
return new RE_Log ($row);
|
| 48 |
return false;
|
| 49 |
}
|
| 50 |
+
|
| 51 |
function get( &$pager ) {
|
| 52 |
global $wpdb;
|
| 53 |
+
|
| 54 |
$rows = $wpdb->get_results( "SELECT SQL_CALC_FOUND_ROWS * FROM {$wpdb->prefix}redirection_logs FORCE INDEX(created) ".$pager->to_limits ('redirection_id IS NOT NULL', array ('url', 'sent_to', 'ip')), ARRAY_A );
|
| 55 |
$pager->set_total ($wpdb->get_var ("SELECT FOUND_ROWS()"));
|
| 56 |
+
|
| 57 |
$items = array ();
|
| 58 |
if (count ($rows) > 0)
|
| 59 |
{
|
| 60 |
foreach ($rows AS $row)
|
| 61 |
$items[] = new RE_Log ($row);
|
| 62 |
}
|
| 63 |
+
|
| 64 |
return $items;
|
| 65 |
}
|
| 66 |
+
|
| 67 |
function get_by_group (&$pager, $group)
|
| 68 |
{
|
| 69 |
global $wpdb;
|
| 70 |
+
|
| 71 |
$rows = $wpdb->get_results ("SELECT SQL_CALC_FOUND_ROWS * FROM {$wpdb->prefix}redirection_logs".$pager->to_limits ("redirection_id IS NOT NULL AND group_id='".$group."'", array ('url', 'sent_to', 'ip')), ARRAY_A);
|
| 72 |
$pager->set_total ($wpdb->get_var ("SELECT FOUND_ROWS()"));
|
| 73 |
+
|
| 74 |
$items = array ();
|
| 75 |
if (count ($rows) > 0)
|
| 76 |
{
|
| 77 |
foreach ($rows AS $row)
|
| 78 |
$items[] = new RE_Log ($row);
|
| 79 |
}
|
| 80 |
+
|
| 81 |
return $items;
|
| 82 |
}
|
| 83 |
+
|
| 84 |
function get_by_module (&$pager, $module)
|
| 85 |
{
|
| 86 |
global $wpdb;
|
| 87 |
|
| 88 |
$rows = $wpdb->get_results ("SELECT SQL_CALC_FOUND_ROWS * FROM {$wpdb->prefix}redirection_logs".$pager->to_limits ("module_id='".$module."'", array ('url', 'sent_to', 'ip')), ARRAY_A);
|
| 89 |
$pager->set_total ($wpdb->get_var ("SELECT FOUND_ROWS()"));
|
| 90 |
+
|
| 91 |
$items = array ();
|
| 92 |
if (count ($rows) > 0)
|
| 93 |
{
|
| 94 |
foreach ($rows AS $row)
|
| 95 |
$items[] = new RE_Log ($row);
|
| 96 |
}
|
| 97 |
+
|
| 98 |
return $items;
|
| 99 |
}
|
| 100 |
+
|
| 101 |
function get_by_redirect (&$pager, $redirect)
|
| 102 |
{
|
| 103 |
global $wpdb;
|
| 104 |
+
|
| 105 |
$rows = $wpdb->get_results ("SELECT SQL_CALC_FOUND_ROWS * FROM {$wpdb->prefix}redirection_logs".$pager->to_limits ("redirection_id=$redirect", array ('url', 'sent_to', 'ip')), ARRAY_A);
|
| 106 |
$pager->set_total ($wpdb->get_var ("SELECT FOUND_ROWS()"));
|
| 107 |
+
|
| 108 |
$items = array ();
|
| 109 |
if (count ($rows) > 0)
|
| 110 |
{
|
| 111 |
foreach ($rows AS $row)
|
| 112 |
$items[] = new RE_Log ($row);
|
| 113 |
}
|
| 114 |
+
|
| 115 |
return $items;
|
| 116 |
}
|
| 117 |
+
|
| 118 |
function create ($url, $target, $agent, $ip, $referrer, $redirection_id = 'NULL', $module_id = 'NULL', $group_id = 'NULL') {
|
| 119 |
global $wpdb, $redirection;
|
| 120 |
+
|
| 121 |
$wpdb->query( $wpdb->prepare( "INSERT INTO {$wpdb->prefix}redirection_logs (url,sent_to,created,agent,redirection_id,ip,referrer,module_id,group_id) VALUES (%s,%s,NOW(),%s,%d,%s,%s,%d,%d)", $url, $target, $agent, $redirection_id, $ip, $referrer, $module_id, $group_id ) );
|
| 122 |
+
|
| 123 |
// Expire old entries
|
| 124 |
$options = $redirection->get_options ();
|
| 125 |
if ($options['expire'] != 0)
|
| 126 |
$wpdb->query ("DELETE FROM {$wpdb->prefix}redirection_logs WHERE created < DATE_SUB(NOW(), INTERVAL ".$options['expire']." DAY)");
|
| 127 |
}
|
| 128 |
+
|
| 129 |
function show_url ($url)
|
| 130 |
{
|
| 131 |
return implode ('​/', explode ('/', substr (esc_html ($url), 0, 80))).(strlen ($url) > 80 ? '...' : '');
|
| 136 |
global $wpdb;
|
| 137 |
$wpdb->query ("DELETE FROM {$wpdb->prefix}redirection_logs WHERE id='$id'");
|
| 138 |
}
|
| 139 |
+
|
| 140 |
function delete_404 ($pager)
|
| 141 |
{
|
| 142 |
global $wpdb;
|
| 143 |
$wpdb->query ("DELETE FROM {$wpdb->prefix}redirection_logs ".$pager->to_conditions ('redirection_id IS NULL', array ('url', 'sent_to', 'ip')));
|
| 144 |
}
|
| 145 |
+
|
| 146 |
function delete_for_id ($id)
|
| 147 |
{
|
| 148 |
global $wpdb;
|
| 149 |
$wpdb->query ("DELETE FROM {$wpdb->prefix}redirection_logs WHERE redirection_id='$id'");
|
| 150 |
}
|
| 151 |
+
|
| 152 |
function delete_for_group ($id)
|
| 153 |
{
|
| 154 |
global $wpdb;
|
| 160 |
global $wpdb;
|
| 161 |
$wpdb->query ("DELETE FROM {$wpdb->prefix}redirection_logs WHERE module_id=$id");
|
| 162 |
}
|
| 163 |
+
|
| 164 |
function delete_all ($cond, $pager)
|
| 165 |
{
|
| 166 |
global $wpdb;
|
| 167 |
+
|
| 168 |
$sql = 'redirection_id IS NOT NULL';
|
| 169 |
if (!empty ($cond))
|
| 170 |
{
|
| 175 |
|
| 176 |
$wpdb->query ("DELETE FROM {$wpdb->prefix}redirection_logs ".$pager->to_conditions ($sql, array ('url', 'sent_to', 'ip')));
|
| 177 |
}
|
| 178 |
+
|
| 179 |
function referrer ()
|
| 180 |
{
|
| 181 |
return preg_replace ('@https?://(.*?)/.*@', '$1', $this->referrer);
|
models/match.php
CHANGED
|
@@ -22,7 +22,7 @@ For full license details see license.txt
|
|
| 22 |
|
| 23 |
class Red_Match {
|
| 24 |
var $url;
|
| 25 |
-
|
| 26 |
function Red_Match( $values = '' ) {
|
| 27 |
if ( $values ) {
|
| 28 |
$obj = @unserialize( $values );
|
|
@@ -35,60 +35,60 @@ class Red_Match {
|
|
| 35 |
}
|
| 36 |
}
|
| 37 |
}
|
| 38 |
-
|
| 39 |
function data( $details ) {
|
| 40 |
$data = $this->save( $details );
|
| 41 |
if ( count( $data ) == 1 && !is_array( current( $data ) ) )
|
| 42 |
$data = current( $data );
|
| 43 |
else
|
| 44 |
-
$data = serialize( $data );
|
| 45 |
return $data;
|
| 46 |
}
|
| 47 |
-
|
| 48 |
function save( $details ) {
|
| 49 |
return array();
|
| 50 |
}
|
| 51 |
-
|
| 52 |
function name() {
|
| 53 |
return '';
|
| 54 |
}
|
| 55 |
-
|
| 56 |
function show() {
|
| 57 |
}
|
| 58 |
-
|
| 59 |
function wants_it() {
|
| 60 |
return true;
|
| 61 |
}
|
| 62 |
-
|
| 63 |
function get_target( $url, $matched_url, $regex ) {
|
| 64 |
return $false;
|
| 65 |
}
|
| 66 |
-
|
| 67 |
function create( $name, $data = '' ) {
|
| 68 |
$avail = Red_Match::available();
|
| 69 |
if ( isset( $avail[strtolower( $name )] ) ) {
|
| 70 |
$classname = $name.'_match';
|
| 71 |
-
|
| 72 |
if ( !class_exists( strtolower( $classname ) ) )
|
| 73 |
include( dirname( __FILE__ ).'/../matches/'.$avail[strtolower( $name )] );
|
| 74 |
return new $classname( $data );
|
| 75 |
}
|
| 76 |
-
|
| 77 |
return false;
|
| 78 |
}
|
| 79 |
-
|
| 80 |
function all() {
|
| 81 |
$data = array();
|
| 82 |
-
|
| 83 |
$avail = Red_Match::available();
|
| 84 |
foreach ( $avail AS $name => $file ) {
|
| 85 |
$obj = Red_Match::create( $name );
|
| 86 |
$data[$name] = $obj->name();
|
| 87 |
}
|
| 88 |
-
|
| 89 |
return $data;
|
| 90 |
}
|
| 91 |
-
|
| 92 |
function available() {
|
| 93 |
return array (
|
| 94 |
'url' => 'url.php',
|
|
@@ -97,7 +97,7 @@ class Red_Match {
|
|
| 97 |
'login' => 'login.php',
|
| 98 |
);
|
| 99 |
}
|
| 100 |
-
|
| 101 |
function match_name() {
|
| 102 |
return '';
|
| 103 |
}
|
| 22 |
|
| 23 |
class Red_Match {
|
| 24 |
var $url;
|
| 25 |
+
|
| 26 |
function Red_Match( $values = '' ) {
|
| 27 |
if ( $values ) {
|
| 28 |
$obj = @unserialize( $values );
|
| 35 |
}
|
| 36 |
}
|
| 37 |
}
|
| 38 |
+
|
| 39 |
function data( $details ) {
|
| 40 |
$data = $this->save( $details );
|
| 41 |
if ( count( $data ) == 1 && !is_array( current( $data ) ) )
|
| 42 |
$data = current( $data );
|
| 43 |
else
|
| 44 |
+
$data = serialize( $data );
|
| 45 |
return $data;
|
| 46 |
}
|
| 47 |
+
|
| 48 |
function save( $details ) {
|
| 49 |
return array();
|
| 50 |
}
|
| 51 |
+
|
| 52 |
function name() {
|
| 53 |
return '';
|
| 54 |
}
|
| 55 |
+
|
| 56 |
function show() {
|
| 57 |
}
|
| 58 |
+
|
| 59 |
function wants_it() {
|
| 60 |
return true;
|
| 61 |
}
|
| 62 |
+
|
| 63 |
function get_target( $url, $matched_url, $regex ) {
|
| 64 |
return $false;
|
| 65 |
}
|
| 66 |
+
|
| 67 |
function create( $name, $data = '' ) {
|
| 68 |
$avail = Red_Match::available();
|
| 69 |
if ( isset( $avail[strtolower( $name )] ) ) {
|
| 70 |
$classname = $name.'_match';
|
| 71 |
+
|
| 72 |
if ( !class_exists( strtolower( $classname ) ) )
|
| 73 |
include( dirname( __FILE__ ).'/../matches/'.$avail[strtolower( $name )] );
|
| 74 |
return new $classname( $data );
|
| 75 |
}
|
| 76 |
+
|
| 77 |
return false;
|
| 78 |
}
|
| 79 |
+
|
| 80 |
function all() {
|
| 81 |
$data = array();
|
| 82 |
+
|
| 83 |
$avail = Red_Match::available();
|
| 84 |
foreach ( $avail AS $name => $file ) {
|
| 85 |
$obj = Red_Match::create( $name );
|
| 86 |
$data[$name] = $obj->name();
|
| 87 |
}
|
| 88 |
+
|
| 89 |
return $data;
|
| 90 |
}
|
| 91 |
+
|
| 92 |
function available() {
|
| 93 |
return array (
|
| 94 |
'url' => 'url.php',
|
| 97 |
'login' => 'login.php',
|
| 98 |
);
|
| 99 |
}
|
| 100 |
+
|
| 101 |
function match_name() {
|
| 102 |
return '';
|
| 103 |
}
|
models/module.php
CHANGED
|
@@ -11,47 +11,47 @@ class Red_Module {
|
|
| 11 |
$this->load( unserialize( $this->options ) );
|
| 12 |
}
|
| 13 |
}
|
| 14 |
-
|
| 15 |
function module_flush( $items ) {
|
| 16 |
}
|
| 17 |
-
|
| 18 |
function module_flush_delete() {
|
| 19 |
}
|
| 20 |
-
|
| 21 |
function flush( $id ) {
|
| 22 |
$module = Red_Module::get( $id );
|
| 23 |
if ( $module && $module->is_valid() )
|
| 24 |
$module->module_flush( Red_Item::get_all_for_module( $id ) );
|
| 25 |
}
|
| 26 |
-
|
| 27 |
function flush_delete( $id ) {
|
| 28 |
$module = Red_Module::get( $id );
|
| 29 |
if ( $module )
|
| 30 |
$module->module_flush_delete();
|
| 31 |
}
|
| 32 |
-
|
| 33 |
function update( $data ) {
|
| 34 |
global $wpdb;
|
| 35 |
-
|
| 36 |
$this->name = $data['name'];
|
| 37 |
$options = $this->save( $data );
|
| 38 |
$wpdb->update( $wpdb->prefix.'redirection_modules', array( 'name' => trim( $data['name'] ), 'options' => empty( $options ) ? '' : serialize( $options ) ), array( 'id' => intval( $this->id ) ) );
|
| 39 |
|
| 40 |
Red_Module::clear_cache( $this->id );
|
| 41 |
}
|
| 42 |
-
|
| 43 |
function delete() {
|
| 44 |
global $wpdb;
|
| 45 |
-
|
| 46 |
$groups = Red_Group::get_for_module( $this->id );
|
| 47 |
if ( count( $groups ) > 0 ) {
|
| 48 |
foreach ( $groups AS $group ) {
|
| 49 |
$group->delete( $group->id );
|
| 50 |
}
|
| 51 |
}
|
| 52 |
-
|
| 53 |
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}redirection_modules WHERE id=%d", $this->id ) );
|
| 54 |
-
|
| 55 |
RE_Log::delete_for_module( $this->id );
|
| 56 |
Red_Module::clear_cache( $this->id );
|
| 57 |
Red_Module::flush_delete( $this->id );
|
|
@@ -61,7 +61,7 @@ class Red_Module {
|
|
| 61 |
delete_option( 'redirection_module_cache' );
|
| 62 |
Red_Module::flush( $module );
|
| 63 |
}
|
| 64 |
-
|
| 65 |
function create( $data ) {
|
| 66 |
global $wpdb;
|
| 67 |
|
|
@@ -70,22 +70,22 @@ class Red_Module {
|
|
| 70 |
'name' => trim( $data['name'] ),
|
| 71 |
'type' => $data['type'],
|
| 72 |
);
|
| 73 |
-
|
| 74 |
if ( isset( $data['options'] ) )
|
| 75 |
$db['options'] = serialize( $data['options'] );
|
| 76 |
-
|
| 77 |
$wpdb->insert( $wpdb->prefix.'redirection_modules', $db );
|
| 78 |
|
| 79 |
Red_Module::flush( $wpdb->insert_id );
|
| 80 |
return $wpdb->insert_id;
|
| 81 |
}
|
| 82 |
-
|
| 83 |
return false;
|
| 84 |
}
|
| 85 |
-
|
| 86 |
function get( $id ) {
|
| 87 |
global $wpdb;
|
| 88 |
-
|
| 89 |
$row = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}redirection_modules WHERE id=%d", $id ) );
|
| 90 |
if ( $row )
|
| 91 |
return Red_Module::new_item( $row );
|
|
@@ -98,7 +98,7 @@ class Red_Module {
|
|
| 98 |
$cache = get_option( 'redirection_module_cache' );
|
| 99 |
if ( $cache && isset( $cache[$type] ) )
|
| 100 |
return $cache[$type];
|
| 101 |
-
|
| 102 |
$rows = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}redirection_modules WHERE type=%s ORDER BY id", $type ) );
|
| 103 |
$items = array();
|
| 104 |
if ( count( $rows ) > 0 ) {
|
|
@@ -106,18 +106,18 @@ class Red_Module {
|
|
| 106 |
$items[] = Red_Module::new_item( $row );
|
| 107 |
}
|
| 108 |
}
|
| 109 |
-
|
| 110 |
$cache[$type] = $items;
|
| 111 |
update_option( 'redirection_module_cache', $cache );
|
| 112 |
return $items;
|
| 113 |
}
|
| 114 |
-
|
| 115 |
/**
|
| 116 |
* Get all modules
|
| 117 |
*/
|
| 118 |
function get_all() {
|
| 119 |
global $wpdb;
|
| 120 |
-
|
| 121 |
$rows = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}redirection_modules WHERE id > 0 ORDER BY id" );
|
| 122 |
$items = array();
|
| 123 |
if ( count( $rows ) > 0 ) {
|
|
@@ -125,10 +125,10 @@ class Red_Module {
|
|
| 125 |
$items[] = Red_Module::new_item( $row );
|
| 126 |
}
|
| 127 |
}
|
| 128 |
-
|
| 129 |
return $items;
|
| 130 |
}
|
| 131 |
-
|
| 132 |
/**
|
| 133 |
* Get first module
|
| 134 |
*/
|
|
@@ -136,22 +136,22 @@ class Red_Module {
|
|
| 136 |
global $wpdb;
|
| 137 |
return $wpdb->get_var( "SELECT id FROM {$wpdb->prefix}redirection_modules ORDER BY id LIMIT 0,1" );
|
| 138 |
}
|
| 139 |
-
|
| 140 |
/**
|
| 141 |
* Get all modules
|
| 142 |
*/
|
| 143 |
-
|
| 144 |
function get_for_select() {
|
| 145 |
$data = array();
|
| 146 |
$items = Red_Module::get_all();
|
| 147 |
-
|
| 148 |
foreach ( $items AS $item ) {
|
| 149 |
$data[$item->id] = $item->name;
|
| 150 |
}
|
| 151 |
|
| 152 |
return $data;
|
| 153 |
}
|
| 154 |
-
|
| 155 |
/**
|
| 156 |
* Get all module types
|
| 157 |
*/
|
|
@@ -162,7 +162,7 @@ class Red_Module {
|
|
| 162 |
'404' => __( '404 Errors', 'redirection' ),
|
| 163 |
);
|
| 164 |
}
|
| 165 |
-
|
| 166 |
function new_item( $data ) {
|
| 167 |
$map = array (
|
| 168 |
'apache' => array( 'Apache_Module', 'apache.php' ),
|
|
@@ -173,7 +173,7 @@ class Red_Module {
|
|
| 173 |
if ( isset( $map[$data->type] ) ) {
|
| 174 |
$obj = $map[$data->type][0];
|
| 175 |
$file = $map[$data->type][1];
|
| 176 |
-
|
| 177 |
if ( !class_exists( $obj ) )
|
| 178 |
include dirname( __FILE__ )."/../modules/$file";
|
| 179 |
|
|
@@ -182,25 +182,25 @@ class Red_Module {
|
|
| 182 |
|
| 183 |
return false;
|
| 184 |
}
|
| 185 |
-
|
| 186 |
function canonical() {
|
| 187 |
$can = array( 'none' => '—', 'nowww' => __( 'Strip WWW', 'redirection' ), 'www' => __( 'Force WWW', 'redirection' ) );
|
| 188 |
return $can[$this->canonical];
|
| 189 |
}
|
| 190 |
-
|
| 191 |
function index() {
|
| 192 |
$can = array( 'ignore' => '—', 'remove' => __( 'Strip index.php', 'redirection' ) );
|
| 193 |
return $can[$this->index];
|
| 194 |
}
|
| 195 |
-
|
| 196 |
-
function options() {
|
| 197 |
}
|
| 198 |
-
|
| 199 |
function type() {
|
| 200 |
$types = $this->get_types();
|
| 201 |
return $types[$this->type];
|
| 202 |
}
|
| 203 |
-
|
| 204 |
function checked( $item, $field = '' ) {
|
| 205 |
if ( $field && is_array( $item ) ) {
|
| 206 |
if ( isset( $item[$field] ) && $item[$field] )
|
|
@@ -209,7 +209,7 @@ class Red_Module {
|
|
| 209 |
elseif ( !empty( $item ) )
|
| 210 |
echo ' checked="checked"';
|
| 211 |
}
|
| 212 |
-
|
| 213 |
function select( $items, $default = '' ) {
|
| 214 |
if ( count( $items ) > 0 ) {
|
| 215 |
foreach ( $items AS $key => $value ) {
|
|
@@ -217,22 +217,22 @@ class Red_Module {
|
|
| 217 |
}
|
| 218 |
}
|
| 219 |
}
|
| 220 |
-
|
| 221 |
function groups() {
|
| 222 |
global $wpdb;
|
| 223 |
-
|
| 224 |
return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id ) FROM {$wpdb->prefix}redirection_groups WHERE module_id=%d", $this->id ) );
|
| 225 |
}
|
| 226 |
-
|
| 227 |
function redirects() {
|
| 228 |
global $wpdb;
|
| 229 |
-
|
| 230 |
$count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT({$wpdb->prefix}redirection_items.id) FROM {$wpdb->prefix}redirection_groups INNER JOIN {$wpdb->prefix}redirection_items ON {$wpdb->prefix}redirection_items.group_id={$wpdb->prefix}redirection_groups.id WHERE module_id=%d GROUP BY {$wpdb->prefix}redirection_items.group_id", $this->id ) );
|
| 231 |
if ( $count > 0 )
|
| 232 |
return $count;
|
| 233 |
return 0;
|
| 234 |
}
|
| 235 |
-
|
| 236 |
function hits() {
|
| 237 |
global $wpdb;
|
| 238 |
|
|
@@ -241,27 +241,27 @@ class Red_Module {
|
|
| 241 |
return $count;
|
| 242 |
return 0;
|
| 243 |
}
|
| 244 |
-
|
| 245 |
function reset() {
|
| 246 |
Red_Module::clear_cache( $this->id );
|
| 247 |
-
|
| 248 |
$groups = Red_Group::get_for_module( $this->id );
|
| 249 |
if ( count( $groups ) > 0 ) {
|
| 250 |
foreach ( $groups AS $group ) {
|
| 251 |
$group->reset();
|
| 252 |
}
|
| 253 |
}
|
| 254 |
-
|
| 255 |
RE_Log::delete_for_module( $this->id );
|
| 256 |
}
|
| 257 |
-
|
| 258 |
function is_valid() {
|
| 259 |
return true;
|
| 260 |
}
|
| 261 |
-
|
| 262 |
function load( $data ) {
|
| 263 |
}
|
| 264 |
-
|
| 265 |
function config() {
|
| 266 |
}
|
| 267 |
}
|
| 11 |
$this->load( unserialize( $this->options ) );
|
| 12 |
}
|
| 13 |
}
|
| 14 |
+
|
| 15 |
function module_flush( $items ) {
|
| 16 |
}
|
| 17 |
+
|
| 18 |
function module_flush_delete() {
|
| 19 |
}
|
| 20 |
+
|
| 21 |
function flush( $id ) {
|
| 22 |
$module = Red_Module::get( $id );
|
| 23 |
if ( $module && $module->is_valid() )
|
| 24 |
$module->module_flush( Red_Item::get_all_for_module( $id ) );
|
| 25 |
}
|
| 26 |
+
|
| 27 |
function flush_delete( $id ) {
|
| 28 |
$module = Red_Module::get( $id );
|
| 29 |
if ( $module )
|
| 30 |
$module->module_flush_delete();
|
| 31 |
}
|
| 32 |
+
|
| 33 |
function update( $data ) {
|
| 34 |
global $wpdb;
|
| 35 |
+
|
| 36 |
$this->name = $data['name'];
|
| 37 |
$options = $this->save( $data );
|
| 38 |
$wpdb->update( $wpdb->prefix.'redirection_modules', array( 'name' => trim( $data['name'] ), 'options' => empty( $options ) ? '' : serialize( $options ) ), array( 'id' => intval( $this->id ) ) );
|
| 39 |
|
| 40 |
Red_Module::clear_cache( $this->id );
|
| 41 |
}
|
| 42 |
+
|
| 43 |
function delete() {
|
| 44 |
global $wpdb;
|
| 45 |
+
|
| 46 |
$groups = Red_Group::get_for_module( $this->id );
|
| 47 |
if ( count( $groups ) > 0 ) {
|
| 48 |
foreach ( $groups AS $group ) {
|
| 49 |
$group->delete( $group->id );
|
| 50 |
}
|
| 51 |
}
|
| 52 |
+
|
| 53 |
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}redirection_modules WHERE id=%d", $this->id ) );
|
| 54 |
+
|
| 55 |
RE_Log::delete_for_module( $this->id );
|
| 56 |
Red_Module::clear_cache( $this->id );
|
| 57 |
Red_Module::flush_delete( $this->id );
|
| 61 |
delete_option( 'redirection_module_cache' );
|
| 62 |
Red_Module::flush( $module );
|
| 63 |
}
|
| 64 |
+
|
| 65 |
function create( $data ) {
|
| 66 |
global $wpdb;
|
| 67 |
|
| 70 |
'name' => trim( $data['name'] ),
|
| 71 |
'type' => $data['type'],
|
| 72 |
);
|
| 73 |
+
|
| 74 |
if ( isset( $data['options'] ) )
|
| 75 |
$db['options'] = serialize( $data['options'] );
|
| 76 |
+
|
| 77 |
$wpdb->insert( $wpdb->prefix.'redirection_modules', $db );
|
| 78 |
|
| 79 |
Red_Module::flush( $wpdb->insert_id );
|
| 80 |
return $wpdb->insert_id;
|
| 81 |
}
|
| 82 |
+
|
| 83 |
return false;
|
| 84 |
}
|
| 85 |
+
|
| 86 |
function get( $id ) {
|
| 87 |
global $wpdb;
|
| 88 |
+
|
| 89 |
$row = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}redirection_modules WHERE id=%d", $id ) );
|
| 90 |
if ( $row )
|
| 91 |
return Red_Module::new_item( $row );
|
| 98 |
$cache = get_option( 'redirection_module_cache' );
|
| 99 |
if ( $cache && isset( $cache[$type] ) )
|
| 100 |
return $cache[$type];
|
| 101 |
+
|
| 102 |
$rows = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}redirection_modules WHERE type=%s ORDER BY id", $type ) );
|
| 103 |
$items = array();
|
| 104 |
if ( count( $rows ) > 0 ) {
|
| 106 |
$items[] = Red_Module::new_item( $row );
|
| 107 |
}
|
| 108 |
}
|
| 109 |
+
|
| 110 |
$cache[$type] = $items;
|
| 111 |
update_option( 'redirection_module_cache', $cache );
|
| 112 |
return $items;
|
| 113 |
}
|
| 114 |
+
|
| 115 |
/**
|
| 116 |
* Get all modules
|
| 117 |
*/
|
| 118 |
function get_all() {
|
| 119 |
global $wpdb;
|
| 120 |
+
|
| 121 |
$rows = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}redirection_modules WHERE id > 0 ORDER BY id" );
|
| 122 |
$items = array();
|
| 123 |
if ( count( $rows ) > 0 ) {
|
| 125 |
$items[] = Red_Module::new_item( $row );
|
| 126 |
}
|
| 127 |
}
|
| 128 |
+
|
| 129 |
return $items;
|
| 130 |
}
|
| 131 |
+
|
| 132 |
/**
|
| 133 |
* Get first module
|
| 134 |
*/
|
| 136 |
global $wpdb;
|
| 137 |
return $wpdb->get_var( "SELECT id FROM {$wpdb->prefix}redirection_modules ORDER BY id LIMIT 0,1" );
|
| 138 |
}
|
| 139 |
+
|
| 140 |
/**
|
| 141 |
* Get all modules
|
| 142 |
*/
|
| 143 |
+
|
| 144 |
function get_for_select() {
|
| 145 |
$data = array();
|
| 146 |
$items = Red_Module::get_all();
|
| 147 |
+
|
| 148 |
foreach ( $items AS $item ) {
|
| 149 |
$data[$item->id] = $item->name;
|
| 150 |
}
|
| 151 |
|
| 152 |
return $data;
|
| 153 |
}
|
| 154 |
+
|
| 155 |
/**
|
| 156 |
* Get all module types
|
| 157 |
*/
|
| 162 |
'404' => __( '404 Errors', 'redirection' ),
|
| 163 |
);
|
| 164 |
}
|
| 165 |
+
|
| 166 |
function new_item( $data ) {
|
| 167 |
$map = array (
|
| 168 |
'apache' => array( 'Apache_Module', 'apache.php' ),
|
| 173 |
if ( isset( $map[$data->type] ) ) {
|
| 174 |
$obj = $map[$data->type][0];
|
| 175 |
$file = $map[$data->type][1];
|
| 176 |
+
|
| 177 |
if ( !class_exists( $obj ) )
|
| 178 |
include dirname( __FILE__ )."/../modules/$file";
|
| 179 |
|
| 182 |
|
| 183 |
return false;
|
| 184 |
}
|
| 185 |
+
|
| 186 |
function canonical() {
|
| 187 |
$can = array( 'none' => '—', 'nowww' => __( 'Strip WWW', 'redirection' ), 'www' => __( 'Force WWW', 'redirection' ) );
|
| 188 |
return $can[$this->canonical];
|
| 189 |
}
|
| 190 |
+
|
| 191 |
function index() {
|
| 192 |
$can = array( 'ignore' => '—', 'remove' => __( 'Strip index.php', 'redirection' ) );
|
| 193 |
return $can[$this->index];
|
| 194 |
}
|
| 195 |
+
|
| 196 |
+
function options() {
|
| 197 |
}
|
| 198 |
+
|
| 199 |
function type() {
|
| 200 |
$types = $this->get_types();
|
| 201 |
return $types[$this->type];
|
| 202 |
}
|
| 203 |
+
|
| 204 |
function checked( $item, $field = '' ) {
|
| 205 |
if ( $field && is_array( $item ) ) {
|
| 206 |
if ( isset( $item[$field] ) && $item[$field] )
|
| 209 |
elseif ( !empty( $item ) )
|
| 210 |
echo ' checked="checked"';
|
| 211 |
}
|
| 212 |
+
|
| 213 |
function select( $items, $default = '' ) {
|
| 214 |
if ( count( $items ) > 0 ) {
|
| 215 |
foreach ( $items AS $key => $value ) {
|
| 217 |
}
|
| 218 |
}
|
| 219 |
}
|
| 220 |
+
|
| 221 |
function groups() {
|
| 222 |
global $wpdb;
|
| 223 |
+
|
| 224 |
return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id ) FROM {$wpdb->prefix}redirection_groups WHERE module_id=%d", $this->id ) );
|
| 225 |
}
|
| 226 |
+
|
| 227 |
function redirects() {
|
| 228 |
global $wpdb;
|
| 229 |
+
|
| 230 |
$count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT({$wpdb->prefix}redirection_items.id) FROM {$wpdb->prefix}redirection_groups INNER JOIN {$wpdb->prefix}redirection_items ON {$wpdb->prefix}redirection_items.group_id={$wpdb->prefix}redirection_groups.id WHERE module_id=%d GROUP BY {$wpdb->prefix}redirection_items.group_id", $this->id ) );
|
| 231 |
if ( $count > 0 )
|
| 232 |
return $count;
|
| 233 |
return 0;
|
| 234 |
}
|
| 235 |
+
|
| 236 |
function hits() {
|
| 237 |
global $wpdb;
|
| 238 |
|
| 241 |
return $count;
|
| 242 |
return 0;
|
| 243 |
}
|
| 244 |
+
|
| 245 |
function reset() {
|
| 246 |
Red_Module::clear_cache( $this->id );
|
| 247 |
+
|
| 248 |
$groups = Red_Group::get_for_module( $this->id );
|
| 249 |
if ( count( $groups ) > 0 ) {
|
| 250 |
foreach ( $groups AS $group ) {
|
| 251 |
$group->reset();
|
| 252 |
}
|
| 253 |
}
|
| 254 |
+
|
| 255 |
RE_Log::delete_for_module( $this->id );
|
| 256 |
}
|
| 257 |
+
|
| 258 |
function is_valid() {
|
| 259 |
return true;
|
| 260 |
}
|
| 261 |
+
|
| 262 |
function load( $data ) {
|
| 263 |
}
|
| 264 |
+
|
| 265 |
function config() {
|
| 266 |
}
|
| 267 |
}
|
models/monitor.php
CHANGED
|
@@ -2,31 +2,31 @@
|
|
| 2 |
|
| 3 |
class Red_Monitor {
|
| 4 |
var $monitor_post;
|
| 5 |
-
|
| 6 |
function Red_Monitor( $options ) {
|
| 7 |
if ( $options['monitor_post'] > 0 ) {
|
| 8 |
$this->monitor_post = $options['monitor_post'];
|
| 9 |
-
|
| 10 |
// Only monitor if permalinks enabled
|
| 11 |
if ( get_option( 'permalink_structure' ) ) {
|
| 12 |
add_action( 'post_updated', array( &$this, 'post_updated' ), 11, 3 );
|
| 13 |
add_action( 'delete_post', array( &$this, 'post_deleted' ) );
|
| 14 |
add_action( 'edit_form_advanced', array( &$this, 'insert_old_post' ) );
|
| 15 |
-
add_action( 'edit_page_form', array( &$this, 'insert_old_post' ) );
|
| 16 |
}
|
| 17 |
}
|
| 18 |
}
|
| 19 |
-
|
| 20 |
function insert_old_post() {
|
| 21 |
global $post;
|
| 22 |
-
|
| 23 |
$url = parse_url( get_permalink() );
|
| 24 |
$url = $url['path'];
|
| 25 |
?>
|
| 26 |
<input type="hidden" name="redirection_slug" value="<?php echo esc_attr( $url ) ?>"/>
|
| 27 |
<?php
|
| 28 |
}
|
| 29 |
-
|
| 30 |
function post_updated( $post_id, $post, $post_before ) {
|
| 31 |
if ( isset( $_POST['redirection_slug'] ) ) {
|
| 32 |
$after = parse_url( get_permalink( $post_id ) );
|
| 2 |
|
| 3 |
class Red_Monitor {
|
| 4 |
var $monitor_post;
|
| 5 |
+
|
| 6 |
function Red_Monitor( $options ) {
|
| 7 |
if ( $options['monitor_post'] > 0 ) {
|
| 8 |
$this->monitor_post = $options['monitor_post'];
|
| 9 |
+
|
| 10 |
// Only monitor if permalinks enabled
|
| 11 |
if ( get_option( 'permalink_structure' ) ) {
|
| 12 |
add_action( 'post_updated', array( &$this, 'post_updated' ), 11, 3 );
|
| 13 |
add_action( 'delete_post', array( &$this, 'post_deleted' ) );
|
| 14 |
add_action( 'edit_form_advanced', array( &$this, 'insert_old_post' ) );
|
| 15 |
+
add_action( 'edit_page_form', array( &$this, 'insert_old_post' ) );
|
| 16 |
}
|
| 17 |
}
|
| 18 |
}
|
| 19 |
+
|
| 20 |
function insert_old_post() {
|
| 21 |
global $post;
|
| 22 |
+
|
| 23 |
$url = parse_url( get_permalink() );
|
| 24 |
$url = $url['path'];
|
| 25 |
?>
|
| 26 |
<input type="hidden" name="redirection_slug" value="<?php echo esc_attr( $url ) ?>"/>
|
| 27 |
<?php
|
| 28 |
}
|
| 29 |
+
|
| 30 |
function post_updated( $post_id, $post, $post_before ) {
|
| 31 |
if ( isset( $_POST['redirection_slug'] ) ) {
|
| 32 |
$after = parse_url( get_permalink( $post_id ) );
|
models/pager.php
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
// modify it under the terms of the GNU Lesser General Public
|
| 6 |
// License as published by the Free Software Foundation; either
|
| 7 |
// version 2.1 of the License, or (at your option) any later version.
|
| 8 |
-
//
|
| 9 |
// This library is distributed in the hope that it will be useful,
|
| 10 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 11 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
@@ -38,7 +38,7 @@
|
|
| 38 |
* Searching is achieved by specifying the columns that can be searched:
|
| 39 |
*
|
| 40 |
* $rows = $wpdb->get_results ("SELECT * FROM wp_posts".$pager->to_limits ("post_type=page", array ('post_content', 'post_excerpt')));
|
| 41 |
-
*
|
| 42 |
* Additionally you can output column headings with correct URLs:
|
| 43 |
* <th><?php echo $pager->sortable ('post_username', 'Username') ?></th>
|
| 44 |
*
|
|
@@ -59,8 +59,8 @@ class RE_Pager
|
|
| 59 |
var $search = null;
|
| 60 |
var $filters = array ();
|
| 61 |
var $id;
|
| 62 |
-
|
| 63 |
-
|
| 64 |
/**
|
| 65 |
* Construct a pager object using the $_GET data, the current URL, and default preferences
|
| 66 |
*
|
|
@@ -76,12 +76,12 @@ class RE_Pager
|
|
| 76 |
// Remove all pager params from the url
|
| 77 |
$this->id = $id;
|
| 78 |
$this->url = $url;
|
| 79 |
-
|
| 80 |
if (isset ($data['curpage']))
|
| 81 |
$this->current_page = intval ($data['curpage']);
|
| 82 |
|
| 83 |
global $user_ID;
|
| 84 |
-
|
| 85 |
if (isset ($data['perpage']))
|
| 86 |
{
|
| 87 |
$this->per_page = intval ($data['perpage']);
|
|
@@ -92,10 +92,10 @@ class RE_Pager
|
|
| 92 |
|
| 93 |
if ($orderby != '')
|
| 94 |
$this->order_by = $orderby;
|
| 95 |
-
|
| 96 |
if (isset ($data['orderby']))
|
| 97 |
$this->order_by = $data['orderby'];
|
| 98 |
-
|
| 99 |
if (!empty ($tags))
|
| 100 |
{
|
| 101 |
$this->order_tags = $tags;
|
|
@@ -107,21 +107,21 @@ class RE_Pager
|
|
| 107 |
$this->order_original = $orderby;
|
| 108 |
if (isset ($data['order']))
|
| 109 |
$this->order_direction = $data['order'];
|
| 110 |
-
|
| 111 |
$this->search = isset($data['search']) ? $data['search'] : '';
|
| 112 |
$this->steps = array (10, 25, 50, 100, 250);
|
| 113 |
$this->url = str_replace ('&', '&', $this->url);
|
| 114 |
$this->url = str_replace ('&&', '&', $this->url);
|
| 115 |
}
|
| 116 |
-
|
| 117 |
-
|
| 118 |
/**
|
| 119 |
* Set the total number of entries that match the conditions
|
| 120 |
*
|
| 121 |
* @param int $total Count
|
| 122 |
* @return void
|
| 123 |
**/
|
| 124 |
-
|
| 125 |
function set_total ($total)
|
| 126 |
{
|
| 127 |
$this->total = $total;
|
|
@@ -129,32 +129,32 @@ class RE_Pager
|
|
| 129 |
if ($this->current_page <= 0 || $this->current_page > $this->total_pages ())
|
| 130 |
$this->current_page = 1;
|
| 131 |
}
|
| 132 |
-
|
| 133 |
-
|
| 134 |
/**
|
| 135 |
* Return the current page offset
|
| 136 |
*
|
| 137 |
* @return int Current page offset
|
| 138 |
**/
|
| 139 |
-
|
| 140 |
function offset ()
|
| 141 |
{
|
| 142 |
return ($this->current_page - 1) * $this->per_page;
|
| 143 |
}
|
| 144 |
-
|
| 145 |
-
|
| 146 |
/**
|
| 147 |
* @todo explain
|
| 148 |
* @return void
|
| 149 |
**/
|
| 150 |
// XXX
|
| 151 |
-
|
| 152 |
function is_secondary_sort ()
|
| 153 |
{
|
| 154 |
return substr ($this->order_by, 0, 1) == '_' ? true : false;
|
| 155 |
}
|
| 156 |
-
|
| 157 |
-
|
| 158 |
/**
|
| 159 |
* Returns a set of conditions without any limits. This is suitable for a COUNT SQL
|
| 160 |
*
|
|
@@ -163,14 +163,14 @@ class RE_Pager
|
|
| 163 |
* @param array $filters Array of columns to filter on
|
| 164 |
* @return string SQL
|
| 165 |
**/
|
| 166 |
-
|
| 167 |
function to_conditions ($conditions, $searches = '', $filters = '') {
|
| 168 |
global $wpdb;
|
| 169 |
-
|
| 170 |
$sql = '';
|
| 171 |
if ($conditions != '')
|
| 172 |
$sql .= ' WHERE '.$conditions;
|
| 173 |
-
|
| 174 |
// Add on search conditions
|
| 175 |
if (is_array ($searches) && $this->search != '')
|
| 176 |
{
|
|
@@ -206,16 +206,16 @@ class RE_Pager
|
|
| 206 |
$sql .= ' WHERE (';
|
| 207 |
else
|
| 208 |
$sql .= ' AND (';
|
| 209 |
-
|
| 210 |
$sql .= implode (' AND ', $searchbits);
|
| 211 |
$sql .= ')';
|
| 212 |
}
|
| 213 |
}
|
| 214 |
-
|
| 215 |
return $sql;
|
| 216 |
}
|
| 217 |
-
|
| 218 |
-
|
| 219 |
/**
|
| 220 |
* Returns a set of conditions with limits.
|
| 221 |
*
|
|
@@ -224,15 +224,15 @@ class RE_Pager
|
|
| 224 |
* @param array $filters Array of columns to filter on
|
| 225 |
* @return string SQL
|
| 226 |
**/
|
| 227 |
-
|
| 228 |
function to_limits ($conditions = '', $searches = '', $filters = '', $group_by = '') {
|
| 229 |
global $wpdb;
|
| 230 |
-
|
| 231 |
$sql = $this->to_conditions ($conditions, $searches, $filters);
|
| 232 |
-
|
| 233 |
if ($group_by)
|
| 234 |
$sql .= ' '.$group_by.' ';
|
| 235 |
-
|
| 236 |
if (strlen ($this->order_by) > 0)
|
| 237 |
{
|
| 238 |
if (!$this->is_secondary_sort ())
|
|
@@ -246,7 +246,7 @@ class RE_Pager
|
|
| 246 |
return $sql;
|
| 247 |
}
|
| 248 |
|
| 249 |
-
|
| 250 |
/**
|
| 251 |
* Return the url with all the params added back
|
| 252 |
*
|
|
@@ -254,7 +254,7 @@ class RE_Pager
|
|
| 254 |
* @param string $orderby Optional order
|
| 255 |
* @return string URL
|
| 256 |
**/
|
| 257 |
-
|
| 258 |
function url ($offset, $orderby = '')
|
| 259 |
{
|
| 260 |
// Position
|
|
@@ -262,7 +262,7 @@ class RE_Pager
|
|
| 262 |
$url = preg_replace ('/curpage=\d*/', 'curpage='.$offset, $this->url);
|
| 263 |
else
|
| 264 |
$url = $this->url.'&curpage='.$offset;
|
| 265 |
-
|
| 266 |
// Order
|
| 267 |
if ($orderby != '')
|
| 268 |
{
|
|
@@ -270,60 +270,60 @@ class RE_Pager
|
|
| 270 |
$url = preg_replace ('/orderby=\w*/', 'orderby='.$orderby, $url);
|
| 271 |
else
|
| 272 |
$url = $url.'&orderby='.$orderby;
|
| 273 |
-
|
| 274 |
if (!empty ($this->order_tags) && isset ($this->order_tags[$orderby]))
|
| 275 |
$dir = $this->order_direction == 'ASC' ? 'DESC' : 'ASC';
|
| 276 |
else if ($this->order_by == $orderby)
|
| 277 |
$dir = $this->order_direction == 'ASC' ? 'DESC' : 'ASC';
|
| 278 |
else
|
| 279 |
$dir = $this->order_direction;
|
| 280 |
-
|
| 281 |
if (strpos ($url, 'order=') !== false)
|
| 282 |
$url = preg_replace ('/order=\w*/', 'order='.$dir, $url);
|
| 283 |
else
|
| 284 |
$url = $url.'&order='.$dir;
|
| 285 |
}
|
| 286 |
-
|
| 287 |
return str_replace ('&go=go', '', $url);
|
| 288 |
}
|
| 289 |
-
|
| 290 |
-
|
| 291 |
/**
|
| 292 |
* Return current page
|
| 293 |
*
|
| 294 |
* @return int
|
| 295 |
**/
|
| 296 |
-
|
| 297 |
function current_page () { return $this->current_page; }
|
| 298 |
-
|
| 299 |
-
|
| 300 |
/**
|
| 301 |
* Return total number of pages
|
| 302 |
*
|
| 303 |
* @return int
|
| 304 |
**/
|
| 305 |
-
|
| 306 |
function total_pages ()
|
| 307 |
{
|
| 308 |
if ($this->per_page == 0)
|
| 309 |
return 1;
|
| 310 |
return ceil ($this->total / $this->per_page);
|
| 311 |
}
|
| 312 |
-
|
| 313 |
-
|
| 314 |
/**
|
| 315 |
* Determine if we have a next page
|
| 316 |
*
|
| 317 |
* @return boolean
|
| 318 |
**/
|
| 319 |
-
|
| 320 |
function have_next_page ()
|
| 321 |
{
|
| 322 |
if ($this->current_page < $this->total_pages ())
|
| 323 |
return true;
|
| 324 |
return false;
|
| 325 |
}
|
| 326 |
-
|
| 327 |
|
| 328 |
/**
|
| 329 |
* Determine if we have a previous page
|
|
@@ -337,8 +337,8 @@ class RE_Pager
|
|
| 337 |
return true;
|
| 338 |
return false;
|
| 339 |
}
|
| 340 |
-
|
| 341 |
-
|
| 342 |
function sortable_class ($column, $class = true)
|
| 343 |
{
|
| 344 |
if ($column == $this->order_by)
|
|
@@ -349,7 +349,7 @@ class RE_Pager
|
|
| 349 |
echo ' sortedd';
|
| 350 |
}
|
| 351 |
}
|
| 352 |
-
|
| 353 |
/**
|
| 354 |
* Return a string suitable for a sortable column heading
|
| 355 |
*
|
|
@@ -358,41 +358,41 @@ class RE_Pager
|
|
| 358 |
* @param boolean $image Whether to show a direction image
|
| 359 |
* @return string URL
|
| 360 |
**/
|
| 361 |
-
|
| 362 |
function sortable ($column, $text, $image = true)
|
| 363 |
{
|
| 364 |
$url = $this->url ($this->current_page, $column);
|
| 365 |
$img = '';
|
| 366 |
-
|
| 367 |
if (isset ($this->order_tags[$column]))
|
| 368 |
$column = $this->order_tags[$column];
|
| 369 |
-
|
| 370 |
if ($column == $this->order_by)
|
| 371 |
{
|
| 372 |
if (defined ('WP_PLUGIN_URL'))
|
| 373 |
$dir = WP_PLUGIN_URL.'/'.basename (dirname (dirname (__FILE__)));
|
| 374 |
else
|
| 375 |
$dir = get_bloginfo ('wpurl').'/wp-content/plugins/'.basename (dirname (dirname (__FILE__)));
|
| 376 |
-
|
| 377 |
if (strpos ($url, 'ASC') !== false)
|
| 378 |
$img = '<img align="bottom" src="'.$dir.'/images/up.gif" alt="dir" width="16" height="7"/>';
|
| 379 |
else
|
| 380 |
$img = '<img align="bottom" src="'.$dir.'/images/down.gif" alt="dir" width="16" height="7"/>';
|
| 381 |
-
|
| 382 |
if ($image == false)
|
| 383 |
$img = '';
|
| 384 |
}
|
| 385 |
-
|
| 386 |
return '<a href="'.$url.'">'.$text.'</a>'.$img;
|
| 387 |
}
|
| 388 |
-
|
| 389 |
-
|
| 390 |
/**
|
| 391 |
* Returns an array of page numbers => link, given the current page (next and previous etc)
|
| 392 |
*
|
| 393 |
* @return array Array of page links
|
| 394 |
**/
|
| 395 |
-
|
| 396 |
function area_pages ()
|
| 397 |
{
|
| 398 |
// First page
|
|
@@ -403,12 +403,12 @@ class RE_Pager
|
|
| 403 |
{
|
| 404 |
$previous = __ ('Previous', 'redirection');
|
| 405 |
$next = __ ('Next', 'redirection');
|
| 406 |
-
|
| 407 |
if ($this->have_previous_page ())
|
| 408 |
$pages[] = '<a href="'.$this->url ($this->current_page - 1).'">'.$previous.'</a> |';
|
| 409 |
else
|
| 410 |
$pages[] = $previous.' |';
|
| 411 |
-
|
| 412 |
for ($pos = 1; $pos <= $this->total_pages (); $pos++)
|
| 413 |
{
|
| 414 |
if ($pos == $this->current_page)
|
|
@@ -424,7 +424,7 @@ class RE_Pager
|
|
| 424 |
$pages[] = '…';
|
| 425 |
}
|
| 426 |
}
|
| 427 |
-
|
| 428 |
if ($this->have_next_page ())
|
| 429 |
$pages[] = '| <a href="'.$this->url ($this->current_page + 1).'">'.$next.'</a>';
|
| 430 |
else
|
|
@@ -433,27 +433,27 @@ class RE_Pager
|
|
| 433 |
|
| 434 |
return $pages;
|
| 435 |
}
|
| 436 |
-
|
| 437 |
-
|
| 438 |
/**
|
| 439 |
* @todo
|
| 440 |
* @return boolean
|
| 441 |
**/
|
| 442 |
-
|
| 443 |
function filtered ($field, $value)
|
| 444 |
{
|
| 445 |
if (isset ($this->filters[$field]) && $this->filters[$field] == $value)
|
| 446 |
return true;
|
| 447 |
return false;
|
| 448 |
}
|
| 449 |
-
|
| 450 |
-
|
| 451 |
/**
|
| 452 |
* Display a SELECT box suitable for a per-page
|
| 453 |
*
|
| 454 |
* @return void
|
| 455 |
**/
|
| 456 |
-
|
| 457 |
function per_page ($plugin = '')
|
| 458 |
{
|
| 459 |
?>
|
|
@@ -466,7 +466,7 @@ class RE_Pager
|
|
| 466 |
</select>
|
| 467 |
<?php
|
| 468 |
}
|
| 469 |
-
|
| 470 |
function page_links ()
|
| 471 |
{
|
| 472 |
$text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s–%s of %s' ) . '</span>',
|
|
@@ -479,4 +479,4 @@ class RE_Pager
|
|
| 479 |
}
|
| 480 |
}
|
| 481 |
|
| 482 |
-
?>
|
| 5 |
// modify it under the terms of the GNU Lesser General Public
|
| 6 |
// License as published by the Free Software Foundation; either
|
| 7 |
// version 2.1 of the License, or (at your option) any later version.
|
| 8 |
+
//
|
| 9 |
// This library is distributed in the hope that it will be useful,
|
| 10 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 11 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
| 38 |
* Searching is achieved by specifying the columns that can be searched:
|
| 39 |
*
|
| 40 |
* $rows = $wpdb->get_results ("SELECT * FROM wp_posts".$pager->to_limits ("post_type=page", array ('post_content', 'post_excerpt')));
|
| 41 |
+
*
|
| 42 |
* Additionally you can output column headings with correct URLs:
|
| 43 |
* <th><?php echo $pager->sortable ('post_username', 'Username') ?></th>
|
| 44 |
*
|
| 59 |
var $search = null;
|
| 60 |
var $filters = array ();
|
| 61 |
var $id;
|
| 62 |
+
|
| 63 |
+
|
| 64 |
/**
|
| 65 |
* Construct a pager object using the $_GET data, the current URL, and default preferences
|
| 66 |
*
|
| 76 |
// Remove all pager params from the url
|
| 77 |
$this->id = $id;
|
| 78 |
$this->url = $url;
|
| 79 |
+
|
| 80 |
if (isset ($data['curpage']))
|
| 81 |
$this->current_page = intval ($data['curpage']);
|
| 82 |
|
| 83 |
global $user_ID;
|
| 84 |
+
|
| 85 |
if (isset ($data['perpage']))
|
| 86 |
{
|
| 87 |
$this->per_page = intval ($data['perpage']);
|
| 92 |
|
| 93 |
if ($orderby != '')
|
| 94 |
$this->order_by = $orderby;
|
| 95 |
+
|
| 96 |
if (isset ($data['orderby']))
|
| 97 |
$this->order_by = $data['orderby'];
|
| 98 |
+
|
| 99 |
if (!empty ($tags))
|
| 100 |
{
|
| 101 |
$this->order_tags = $tags;
|
| 107 |
$this->order_original = $orderby;
|
| 108 |
if (isset ($data['order']))
|
| 109 |
$this->order_direction = $data['order'];
|
| 110 |
+
|
| 111 |
$this->search = isset($data['search']) ? $data['search'] : '';
|
| 112 |
$this->steps = array (10, 25, 50, 100, 250);
|
| 113 |
$this->url = str_replace ('&', '&', $this->url);
|
| 114 |
$this->url = str_replace ('&&', '&', $this->url);
|
| 115 |
}
|
| 116 |
+
|
| 117 |
+
|
| 118 |
/**
|
| 119 |
* Set the total number of entries that match the conditions
|
| 120 |
*
|
| 121 |
* @param int $total Count
|
| 122 |
* @return void
|
| 123 |
**/
|
| 124 |
+
|
| 125 |
function set_total ($total)
|
| 126 |
{
|
| 127 |
$this->total = $total;
|
| 129 |
if ($this->current_page <= 0 || $this->current_page > $this->total_pages ())
|
| 130 |
$this->current_page = 1;
|
| 131 |
}
|
| 132 |
+
|
| 133 |
+
|
| 134 |
/**
|
| 135 |
* Return the current page offset
|
| 136 |
*
|
| 137 |
* @return int Current page offset
|
| 138 |
**/
|
| 139 |
+
|
| 140 |
function offset ()
|
| 141 |
{
|
| 142 |
return ($this->current_page - 1) * $this->per_page;
|
| 143 |
}
|
| 144 |
+
|
| 145 |
+
|
| 146 |
/**
|
| 147 |
* @todo explain
|
| 148 |
* @return void
|
| 149 |
**/
|
| 150 |
// XXX
|
| 151 |
+
|
| 152 |
function is_secondary_sort ()
|
| 153 |
{
|
| 154 |
return substr ($this->order_by, 0, 1) == '_' ? true : false;
|
| 155 |
}
|
| 156 |
+
|
| 157 |
+
|
| 158 |
/**
|
| 159 |
* Returns a set of conditions without any limits. This is suitable for a COUNT SQL
|
| 160 |
*
|
| 163 |
* @param array $filters Array of columns to filter on
|
| 164 |
* @return string SQL
|
| 165 |
**/
|
| 166 |
+
|
| 167 |
function to_conditions ($conditions, $searches = '', $filters = '') {
|
| 168 |
global $wpdb;
|
| 169 |
+
|
| 170 |
$sql = '';
|
| 171 |
if ($conditions != '')
|
| 172 |
$sql .= ' WHERE '.$conditions;
|
| 173 |
+
|
| 174 |
// Add on search conditions
|
| 175 |
if (is_array ($searches) && $this->search != '')
|
| 176 |
{
|
| 206 |
$sql .= ' WHERE (';
|
| 207 |
else
|
| 208 |
$sql .= ' AND (';
|
| 209 |
+
|
| 210 |
$sql .= implode (' AND ', $searchbits);
|
| 211 |
$sql .= ')';
|
| 212 |
}
|
| 213 |
}
|
| 214 |
+
|
| 215 |
return $sql;
|
| 216 |
}
|
| 217 |
+
|
| 218 |
+
|
| 219 |
/**
|
| 220 |
* Returns a set of conditions with limits.
|
| 221 |
*
|
| 224 |
* @param array $filters Array of columns to filter on
|
| 225 |
* @return string SQL
|
| 226 |
**/
|
| 227 |
+
|
| 228 |
function to_limits ($conditions = '', $searches = '', $filters = '', $group_by = '') {
|
| 229 |
global $wpdb;
|
| 230 |
+
|
| 231 |
$sql = $this->to_conditions ($conditions, $searches, $filters);
|
| 232 |
+
|
| 233 |
if ($group_by)
|
| 234 |
$sql .= ' '.$group_by.' ';
|
| 235 |
+
|
| 236 |
if (strlen ($this->order_by) > 0)
|
| 237 |
{
|
| 238 |
if (!$this->is_secondary_sort ())
|
| 246 |
return $sql;
|
| 247 |
}
|
| 248 |
|
| 249 |
+
|
| 250 |
/**
|
| 251 |
* Return the url with all the params added back
|
| 252 |
*
|
| 254 |
* @param string $orderby Optional order
|
| 255 |
* @return string URL
|
| 256 |
**/
|
| 257 |
+
|
| 258 |
function url ($offset, $orderby = '')
|
| 259 |
{
|
| 260 |
// Position
|
| 262 |
$url = preg_replace ('/curpage=\d*/', 'curpage='.$offset, $this->url);
|
| 263 |
else
|
| 264 |
$url = $this->url.'&curpage='.$offset;
|
| 265 |
+
|
| 266 |
// Order
|
| 267 |
if ($orderby != '')
|
| 268 |
{
|
| 270 |
$url = preg_replace ('/orderby=\w*/', 'orderby='.$orderby, $url);
|
| 271 |
else
|
| 272 |
$url = $url.'&orderby='.$orderby;
|
| 273 |
+
|
| 274 |
if (!empty ($this->order_tags) && isset ($this->order_tags[$orderby]))
|
| 275 |
$dir = $this->order_direction == 'ASC' ? 'DESC' : 'ASC';
|
| 276 |
else if ($this->order_by == $orderby)
|
| 277 |
$dir = $this->order_direction == 'ASC' ? 'DESC' : 'ASC';
|
| 278 |
else
|
| 279 |
$dir = $this->order_direction;
|
| 280 |
+
|
| 281 |
if (strpos ($url, 'order=') !== false)
|
| 282 |
$url = preg_replace ('/order=\w*/', 'order='.$dir, $url);
|
| 283 |
else
|
| 284 |
$url = $url.'&order='.$dir;
|
| 285 |
}
|
| 286 |
+
|
| 287 |
return str_replace ('&go=go', '', $url);
|
| 288 |
}
|
| 289 |
+
|
| 290 |
+
|
| 291 |
/**
|
| 292 |
* Return current page
|
| 293 |
*
|
| 294 |
* @return int
|
| 295 |
**/
|
| 296 |
+
|
| 297 |
function current_page () { return $this->current_page; }
|
| 298 |
+
|
| 299 |
+
|
| 300 |
/**
|
| 301 |
* Return total number of pages
|
| 302 |
*
|
| 303 |
* @return int
|
| 304 |
**/
|
| 305 |
+
|
| 306 |
function total_pages ()
|
| 307 |
{
|
| 308 |
if ($this->per_page == 0)
|
| 309 |
return 1;
|
| 310 |
return ceil ($this->total / $this->per_page);
|
| 311 |
}
|
| 312 |
+
|
| 313 |
+
|
| 314 |
/**
|
| 315 |
* Determine if we have a next page
|
| 316 |
*
|
| 317 |
* @return boolean
|
| 318 |
**/
|
| 319 |
+
|
| 320 |
function have_next_page ()
|
| 321 |
{
|
| 322 |
if ($this->current_page < $this->total_pages ())
|
| 323 |
return true;
|
| 324 |
return false;
|
| 325 |
}
|
| 326 |
+
|
| 327 |
|
| 328 |
/**
|
| 329 |
* Determine if we have a previous page
|
| 337 |
return true;
|
| 338 |
return false;
|
| 339 |
}
|
| 340 |
+
|
| 341 |
+
|
| 342 |
function sortable_class ($column, $class = true)
|
| 343 |
{
|
| 344 |
if ($column == $this->order_by)
|
| 349 |
echo ' sortedd';
|
| 350 |
}
|
| 351 |
}
|
| 352 |
+
|
| 353 |
/**
|
| 354 |
* Return a string suitable for a sortable column heading
|
| 355 |
*
|
| 358 |
* @param boolean $image Whether to show a direction image
|
| 359 |
* @return string URL
|
| 360 |
**/
|
| 361 |
+
|
| 362 |
function sortable ($column, $text, $image = true)
|
| 363 |
{
|
| 364 |
$url = $this->url ($this->current_page, $column);
|
| 365 |
$img = '';
|
| 366 |
+
|
| 367 |
if (isset ($this->order_tags[$column]))
|
| 368 |
$column = $this->order_tags[$column];
|
| 369 |
+
|
| 370 |
if ($column == $this->order_by)
|
| 371 |
{
|
| 372 |
if (defined ('WP_PLUGIN_URL'))
|
| 373 |
$dir = WP_PLUGIN_URL.'/'.basename (dirname (dirname (__FILE__)));
|
| 374 |
else
|
| 375 |
$dir = get_bloginfo ('wpurl').'/wp-content/plugins/'.basename (dirname (dirname (__FILE__)));
|
| 376 |
+
|
| 377 |
if (strpos ($url, 'ASC') !== false)
|
| 378 |
$img = '<img align="bottom" src="'.$dir.'/images/up.gif" alt="dir" width="16" height="7"/>';
|
| 379 |
else
|
| 380 |
$img = '<img align="bottom" src="'.$dir.'/images/down.gif" alt="dir" width="16" height="7"/>';
|
| 381 |
+
|
| 382 |
if ($image == false)
|
| 383 |
$img = '';
|
| 384 |
}
|
| 385 |
+
|
| 386 |
return '<a href="'.$url.'">'.$text.'</a>'.$img;
|
| 387 |
}
|
| 388 |
+
|
| 389 |
+
|
| 390 |
/**
|
| 391 |
* Returns an array of page numbers => link, given the current page (next and previous etc)
|
| 392 |
*
|
| 393 |
* @return array Array of page links
|
| 394 |
**/
|
| 395 |
+
|
| 396 |
function area_pages ()
|
| 397 |
{
|
| 398 |
// First page
|
| 403 |
{
|
| 404 |
$previous = __ ('Previous', 'redirection');
|
| 405 |
$next = __ ('Next', 'redirection');
|
| 406 |
+
|
| 407 |
if ($this->have_previous_page ())
|
| 408 |
$pages[] = '<a href="'.$this->url ($this->current_page - 1).'">'.$previous.'</a> |';
|
| 409 |
else
|
| 410 |
$pages[] = $previous.' |';
|
| 411 |
+
|
| 412 |
for ($pos = 1; $pos <= $this->total_pages (); $pos++)
|
| 413 |
{
|
| 414 |
if ($pos == $this->current_page)
|
| 424 |
$pages[] = '…';
|
| 425 |
}
|
| 426 |
}
|
| 427 |
+
|
| 428 |
if ($this->have_next_page ())
|
| 429 |
$pages[] = '| <a href="'.$this->url ($this->current_page + 1).'">'.$next.'</a>';
|
| 430 |
else
|
| 433 |
|
| 434 |
return $pages;
|
| 435 |
}
|
| 436 |
+
|
| 437 |
+
|
| 438 |
/**
|
| 439 |
* @todo
|
| 440 |
* @return boolean
|
| 441 |
**/
|
| 442 |
+
|
| 443 |
function filtered ($field, $value)
|
| 444 |
{
|
| 445 |
if (isset ($this->filters[$field]) && $this->filters[$field] == $value)
|
| 446 |
return true;
|
| 447 |
return false;
|
| 448 |
}
|
| 449 |
+
|
| 450 |
+
|
| 451 |
/**
|
| 452 |
* Display a SELECT box suitable for a per-page
|
| 453 |
*
|
| 454 |
* @return void
|
| 455 |
**/
|
| 456 |
+
|
| 457 |
function per_page ($plugin = '')
|
| 458 |
{
|
| 459 |
?>
|
| 466 |
</select>
|
| 467 |
<?php
|
| 468 |
}
|
| 469 |
+
|
| 470 |
function page_links ()
|
| 471 |
{
|
| 472 |
$text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s–%s of %s' ) . '</span>',
|
| 479 |
}
|
| 480 |
}
|
| 481 |
|
| 482 |
+
?>
|
models/redirect.php
CHANGED
|
@@ -24,12 +24,12 @@ class Red_Item {
|
|
| 24 |
var $url = null;
|
| 25 |
var $regex = false;
|
| 26 |
var $action_data = null;
|
| 27 |
-
|
| 28 |
var $last_access = null;
|
| 29 |
var $last_count = 0;
|
| 30 |
-
|
| 31 |
var $tracking = true;
|
| 32 |
-
|
| 33 |
function Red_Item( $values, $type = '', $match = '' ) {
|
| 34 |
if ( is_object( $values ) ) {
|
| 35 |
foreach ( $values AS $key => $value ) {
|
|
@@ -41,7 +41,7 @@ class Red_Item {
|
|
| 41 |
$this->match->id = $this->id;
|
| 42 |
$this->match->action_code = $this->action_code;
|
| 43 |
}
|
| 44 |
-
|
| 45 |
if ( $this->action_type ) {
|
| 46 |
$this->action = Red_Action::create( $this->action_type, $this->action_code);
|
| 47 |
$this->match->action = $this->action;
|
|
@@ -60,7 +60,7 @@ class Red_Item {
|
|
| 60 |
$this->match = $match;
|
| 61 |
}
|
| 62 |
}
|
| 63 |
-
|
| 64 |
function get_all_for_module( $module ) {
|
| 65 |
global $wpdb;
|
| 66 |
|
|
@@ -74,10 +74,10 @@ class Red_Item {
|
|
| 74 |
$items[] = new Red_Item( $row );
|
| 75 |
}
|
| 76 |
}
|
| 77 |
-
|
| 78 |
-
return $items;
|
| 79 |
}
|
| 80 |
-
|
| 81 |
function exists( $url ) {
|
| 82 |
global $wpdb;
|
| 83 |
|
|
@@ -85,7 +85,7 @@ class Red_Item {
|
|
| 85 |
return true;
|
| 86 |
return false;
|
| 87 |
}
|
| 88 |
-
|
| 89 |
function get_for_url( $url, $type ) {
|
| 90 |
global $wpdb;
|
| 91 |
|
|
@@ -96,7 +96,7 @@ class Red_Item {
|
|
| 96 |
$items = array();
|
| 97 |
if ( count( $rows ) > 0 ) {
|
| 98 |
foreach ( $rows AS $row ) {
|
| 99 |
-
$items[$row->group_pos
|
| 100 |
}
|
| 101 |
}
|
| 102 |
|
|
@@ -105,13 +105,13 @@ class Red_Item {
|
|
| 105 |
$items = array_values( $items );
|
| 106 |
return $items;
|
| 107 |
}
|
| 108 |
-
|
| 109 |
function get_by_module( &$pager, $module ) {
|
| 110 |
global $wpdb;
|
| 111 |
-
|
| 112 |
$sql = "SELECT SQL_CALC_FOUND_ROWS * FROM {$wpdb->prefix}redirection_items INNER JOIN {$wpdb->prefix}redirection_groups ON {$wpdb->prefix}redirection_groups.id={$wpdb->prefix}redirection_items.group_id";
|
| 113 |
$sql .= $pager->to_limits( "{$wpdb->prefix}redirection_groups.module_id=".$module, array( 'url', 'action_data' ));
|
| 114 |
-
|
| 115 |
$rows = $wpdb->get_results( $sql );
|
| 116 |
$pager->set_total( $wpdb->get_var( "SELECT FOUND_ROWS()" ));
|
| 117 |
$items = array();
|
|
@@ -120,10 +120,10 @@ class Red_Item {
|
|
| 120 |
foreach( $rows AS $row)
|
| 121 |
$items[] = new Red_Item( $row);
|
| 122 |
}
|
| 123 |
-
|
| 124 |
return $items;
|
| 125 |
}
|
| 126 |
-
|
| 127 |
/**
|
| 128 |
* Get redirection items in a group
|
| 129 |
*/
|
|
@@ -139,22 +139,22 @@ class Red_Item {
|
|
| 139 |
$items[] = new Red_Item( $row );
|
| 140 |
}
|
| 141 |
}
|
| 142 |
-
|
| 143 |
return $items;
|
| 144 |
}
|
| 145 |
-
|
| 146 |
function get_by_id( $id ) {
|
| 147 |
global $wpdb;
|
| 148 |
-
|
| 149 |
$row = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}redirection_items WHERE id=%d", $id ) );
|
| 150 |
if ( $row )
|
| 151 |
return new Red_Item( $row );
|
| 152 |
return false;
|
| 153 |
}
|
| 154 |
-
|
| 155 |
function auto_generate() {
|
| 156 |
global $redirection;
|
| 157 |
-
|
| 158 |
$options = $redirection->get_options();
|
| 159 |
$id = time();
|
| 160 |
|
|
@@ -163,10 +163,10 @@ class Red_Item {
|
|
| 163 |
$url = str_replace( '$hex$', sprintf( '%x', $id), $url );
|
| 164 |
return $url;
|
| 165 |
}
|
| 166 |
-
|
| 167 |
function create( $details ) {
|
| 168 |
global $wpdb;
|
| 169 |
-
|
| 170 |
// Auto generate URLs
|
| 171 |
if ( $details['source'] == '' )
|
| 172 |
$details['source'] = Red_Item::auto_generate();
|
|
@@ -177,7 +177,7 @@ class Red_Item {
|
|
| 177 |
// Make sure we don't redirect to ourself
|
| 178 |
if ( $details['source'] == $details['target'] )
|
| 179 |
$details['target'] .= '-1';
|
| 180 |
-
|
| 181 |
$matcher = Red_Match::create( $details['match'] );
|
| 182 |
$group_id = intval( $details['group'] );
|
| 183 |
|
|
@@ -191,7 +191,7 @@ class Red_Item {
|
|
| 191 |
$action_code = 301;
|
| 192 |
elseif ( $action == 'error' )
|
| 193 |
$action_code = 404;
|
| 194 |
-
|
| 195 |
if ( isset( $details['action_code'] ) )
|
| 196 |
$action_code = intval( $details['action_code'] );
|
| 197 |
|
|
@@ -208,34 +208,34 @@ class Red_Item {
|
|
| 208 |
);
|
| 209 |
|
| 210 |
$wpdb->insert( $wpdb->prefix.'redirection_items', $data );
|
| 211 |
-
|
| 212 |
$group = Red_Group::get( $group_id );
|
| 213 |
Red_Module::flush( $group->module_id );
|
| 214 |
-
|
| 215 |
return Red_Item::get_by_id( $wpdb->insert_id );
|
| 216 |
}
|
| 217 |
|
| 218 |
return false;
|
| 219 |
}
|
| 220 |
-
|
| 221 |
function delete_by_group( $group ) {
|
| 222 |
global $wpdb;
|
| 223 |
|
| 224 |
RE_Log::delete_for_group( $group);
|
| 225 |
|
| 226 |
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}redirection_items WHERE group_id=%d", $group ) );
|
| 227 |
-
|
| 228 |
$group = Red_Group::get( $group_id );
|
| 229 |
Red_Module::flush( $group->module_id );
|
| 230 |
}
|
| 231 |
-
|
| 232 |
function delete( $id ) {
|
| 233 |
global $wpdb;
|
| 234 |
-
|
| 235 |
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}redirection_items WHERE id=%d", $id ) );
|
| 236 |
-
|
| 237 |
RE_Log::delete_for_id( $id );
|
| 238 |
-
|
| 239 |
// Reorder all elements
|
| 240 |
$rows = $wpdb->get_results( "SELECT id FROM {$wpdb->prefix}redirection_items ORDER BY position" );
|
| 241 |
if ( count( $rows) > 0 ) {
|
|
@@ -244,8 +244,8 @@ class Red_Item {
|
|
| 244 |
}
|
| 245 |
}
|
| 246 |
}
|
| 247 |
-
|
| 248 |
-
|
| 249 |
function sanitize_url( $url, $regex ) {
|
| 250 |
// Make sure that the old URL is relative
|
| 251 |
$url = preg_replace( '@^https?://(.*?)/@', '/', $url );
|
|
@@ -255,42 +255,42 @@ class Red_Item {
|
|
| 255 |
$url = '/'.$url;
|
| 256 |
return $url;
|
| 257 |
}
|
| 258 |
-
|
| 259 |
-
|
| 260 |
function update( $details ) {
|
| 261 |
if ( strlen( $details['old'] ) > 0 ) {
|
| 262 |
global $wpdb;
|
| 263 |
-
|
| 264 |
$this->regex = isset( $details['regex'] ) ? 1 : 0;
|
| 265 |
$this->url = $this->sanitize_url( $details['old'], $this->regex );
|
| 266 |
$this->title = $details['title'];
|
| 267 |
-
|
| 268 |
$data = $this->match->data( $details );
|
| 269 |
-
|
| 270 |
$this->action_code = 0;
|
| 271 |
if ( isset( $details['action_code'] ) )
|
| 272 |
$this->action_code = intval( $details['action_code'] );
|
| 273 |
|
| 274 |
if ( isset( $details['group_id'] ) )
|
| 275 |
$this->group_id = intval( $details['group_id'] );
|
| 276 |
-
|
| 277 |
// Save this
|
| 278 |
global $wpdb;
|
| 279 |
$wpdb->update( $wpdb->prefix.'redirection_items', array( 'url' => $this->url, 'regex' => $this->regex, 'action_code' => $this->action_code, 'action_data' => $data, 'group_id' => $this->group_id, 'title' => $this->title ), array( 'id' => $this->id ) );
|
| 280 |
-
|
| 281 |
$group = Red_Group::get( $this->group_id );
|
| 282 |
if ( $group )
|
| 283 |
Red_Module::flush( $group->module_id );
|
| 284 |
}
|
| 285 |
}
|
| 286 |
-
|
| 287 |
function save_order( $items, $start ) {
|
| 288 |
global $wpdb;
|
| 289 |
-
|
| 290 |
foreach ( $items AS $pos => $id ) {
|
| 291 |
$wpdb->update( $wpdb->prefix.'redirection_items', array( 'position' => $pos + $start ), array( 'id' => $id ) );
|
| 292 |
}
|
| 293 |
-
|
| 294 |
$item = Red_Item::get_by_id( $id );
|
| 295 |
$group = Red_Group::get( $item->group_id );
|
| 296 |
if ( $group )
|
|
@@ -310,15 +310,15 @@ class Red_Item {
|
|
| 310 |
$target = $this->replaceSpecialTags( $target );
|
| 311 |
|
| 312 |
$this->visit( $url, $target );
|
| 313 |
-
|
| 314 |
if ( $this->status == 'enabled' )
|
| 315 |
return $this->action->process_before( $this->action_code, $target );
|
| 316 |
}
|
| 317 |
}
|
| 318 |
-
|
| 319 |
return false;
|
| 320 |
}
|
| 321 |
-
|
| 322 |
function replaceSpecialTags( $target ) {
|
| 323 |
if ( is_numeric( $target ) )
|
| 324 |
$target = get_permalink( $target );
|
|
@@ -330,7 +330,7 @@ class Red_Item {
|
|
| 330 |
$target = str_replace( '%userurl%', isset( $user->user_url ) ? $user->user_url : '', $target );
|
| 331 |
}
|
| 332 |
}
|
| 333 |
-
|
| 334 |
return $target;
|
| 335 |
}
|
| 336 |
|
|
@@ -352,28 +352,28 @@ class Red_Item {
|
|
| 352 |
$log = RE_Log::create( $url, $target, $_SERVER['HTTP_USER_AGENT'], $ip, isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '', $this->id, $this->module_id, $this->group_id);
|
| 353 |
}
|
| 354 |
}
|
| 355 |
-
|
| 356 |
function reset() {
|
| 357 |
global $wpdb;
|
| 358 |
-
|
| 359 |
$this->last_count = 0;
|
| 360 |
$this->last_access = '0000-00-00 00:00:00';
|
| 361 |
-
|
| 362 |
$wpdb->update( $wpdb->prefix.'redirection_items', array( 'last_count' => 0, 'last_access' => $this->last_access ), array( 'id' => $this->id ) );
|
| 363 |
-
|
| 364 |
RE_Log::delete_for_id( $this->id );
|
| 365 |
}
|
| 366 |
|
| 367 |
function show_url( $url ) {
|
| 368 |
return implode( '​/', explode( '/', $url ) );
|
| 369 |
}
|
| 370 |
-
|
| 371 |
function move_to( $group ) {
|
| 372 |
global $wpdb;
|
| 373 |
|
| 374 |
$wpdb->update( $wpdb->prefix.'redirection_items', array( 'group_id' => $group ), array( 'id' => $this->id ) );
|
| 375 |
}
|
| 376 |
-
|
| 377 |
function toggle_status() {
|
| 378 |
global $wpdb;
|
| 379 |
|
|
@@ -389,16 +389,16 @@ class Red_Item {
|
|
| 389 |
'error' => __( 'Error (404)', 'redirection' ),
|
| 390 |
'nothing' => __( 'Do nothing', 'redirection' ),
|
| 391 |
);
|
| 392 |
-
|
| 393 |
if ( $action )
|
| 394 |
return $actions[$action];
|
| 395 |
return $actions;
|
| 396 |
}
|
| 397 |
-
|
| 398 |
function match_name() {
|
| 399 |
return $this->match->match_name();
|
| 400 |
}
|
| 401 |
-
|
| 402 |
function type() {
|
| 403 |
if ( ( $this->action_type == 'url' || $this->action_type == 'error' || $this->action_type == 'random' ) && $this->action_code > 0 )
|
| 404 |
return $this->action_code;
|
| 24 |
var $url = null;
|
| 25 |
var $regex = false;
|
| 26 |
var $action_data = null;
|
| 27 |
+
|
| 28 |
var $last_access = null;
|
| 29 |
var $last_count = 0;
|
| 30 |
+
|
| 31 |
var $tracking = true;
|
| 32 |
+
|
| 33 |
function Red_Item( $values, $type = '', $match = '' ) {
|
| 34 |
if ( is_object( $values ) ) {
|
| 35 |
foreach ( $values AS $key => $value ) {
|
| 41 |
$this->match->id = $this->id;
|
| 42 |
$this->match->action_code = $this->action_code;
|
| 43 |
}
|
| 44 |
+
|
| 45 |
if ( $this->action_type ) {
|
| 46 |
$this->action = Red_Action::create( $this->action_type, $this->action_code);
|
| 47 |
$this->match->action = $this->action;
|
| 60 |
$this->match = $match;
|
| 61 |
}
|
| 62 |
}
|
| 63 |
+
|
| 64 |
function get_all_for_module( $module ) {
|
| 65 |
global $wpdb;
|
| 66 |
|
| 74 |
$items[] = new Red_Item( $row );
|
| 75 |
}
|
| 76 |
}
|
| 77 |
+
|
| 78 |
+
return $items;
|
| 79 |
}
|
| 80 |
+
|
| 81 |
function exists( $url ) {
|
| 82 |
global $wpdb;
|
| 83 |
|
| 85 |
return true;
|
| 86 |
return false;
|
| 87 |
}
|
| 88 |
+
|
| 89 |
function get_for_url( $url, $type ) {
|
| 90 |
global $wpdb;
|
| 91 |
|
| 96 |
$items = array();
|
| 97 |
if ( count( $rows ) > 0 ) {
|
| 98 |
foreach ( $rows AS $row ) {
|
| 99 |
+
$items[$row->group_pos * 1000 + $row->position] = new Red_Item( $row );
|
| 100 |
}
|
| 101 |
}
|
| 102 |
|
| 105 |
$items = array_values( $items );
|
| 106 |
return $items;
|
| 107 |
}
|
| 108 |
+
|
| 109 |
function get_by_module( &$pager, $module ) {
|
| 110 |
global $wpdb;
|
| 111 |
+
|
| 112 |
$sql = "SELECT SQL_CALC_FOUND_ROWS * FROM {$wpdb->prefix}redirection_items INNER JOIN {$wpdb->prefix}redirection_groups ON {$wpdb->prefix}redirection_groups.id={$wpdb->prefix}redirection_items.group_id";
|
| 113 |
$sql .= $pager->to_limits( "{$wpdb->prefix}redirection_groups.module_id=".$module, array( 'url', 'action_data' ));
|
| 114 |
+
|
| 115 |
$rows = $wpdb->get_results( $sql );
|
| 116 |
$pager->set_total( $wpdb->get_var( "SELECT FOUND_ROWS()" ));
|
| 117 |
$items = array();
|
| 120 |
foreach( $rows AS $row)
|
| 121 |
$items[] = new Red_Item( $row);
|
| 122 |
}
|
| 123 |
+
|
| 124 |
return $items;
|
| 125 |
}
|
| 126 |
+
|
| 127 |
/**
|
| 128 |
* Get redirection items in a group
|
| 129 |
*/
|
| 139 |
$items[] = new Red_Item( $row );
|
| 140 |
}
|
| 141 |
}
|
| 142 |
+
|
| 143 |
return $items;
|
| 144 |
}
|
| 145 |
+
|
| 146 |
function get_by_id( $id ) {
|
| 147 |
global $wpdb;
|
| 148 |
+
|
| 149 |
$row = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}redirection_items WHERE id=%d", $id ) );
|
| 150 |
if ( $row )
|
| 151 |
return new Red_Item( $row );
|
| 152 |
return false;
|
| 153 |
}
|
| 154 |
+
|
| 155 |
function auto_generate() {
|
| 156 |
global $redirection;
|
| 157 |
+
|
| 158 |
$options = $redirection->get_options();
|
| 159 |
$id = time();
|
| 160 |
|
| 163 |
$url = str_replace( '$hex$', sprintf( '%x', $id), $url );
|
| 164 |
return $url;
|
| 165 |
}
|
| 166 |
+
|
| 167 |
function create( $details ) {
|
| 168 |
global $wpdb;
|
| 169 |
+
|
| 170 |
// Auto generate URLs
|
| 171 |
if ( $details['source'] == '' )
|
| 172 |
$details['source'] = Red_Item::auto_generate();
|
| 177 |
// Make sure we don't redirect to ourself
|
| 178 |
if ( $details['source'] == $details['target'] )
|
| 179 |
$details['target'] .= '-1';
|
| 180 |
+
|
| 181 |
$matcher = Red_Match::create( $details['match'] );
|
| 182 |
$group_id = intval( $details['group'] );
|
| 183 |
|
| 191 |
$action_code = 301;
|
| 192 |
elseif ( $action == 'error' )
|
| 193 |
$action_code = 404;
|
| 194 |
+
|
| 195 |
if ( isset( $details['action_code'] ) )
|
| 196 |
$action_code = intval( $details['action_code'] );
|
| 197 |
|
| 208 |
);
|
| 209 |
|
| 210 |
$wpdb->insert( $wpdb->prefix.'redirection_items', $data );
|
| 211 |
+
|
| 212 |
$group = Red_Group::get( $group_id );
|
| 213 |
Red_Module::flush( $group->module_id );
|
| 214 |
+
|
| 215 |
return Red_Item::get_by_id( $wpdb->insert_id );
|
| 216 |
}
|
| 217 |
|
| 218 |
return false;
|
| 219 |
}
|
| 220 |
+
|
| 221 |
function delete_by_group( $group ) {
|
| 222 |
global $wpdb;
|
| 223 |
|
| 224 |
RE_Log::delete_for_group( $group);
|
| 225 |
|
| 226 |
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}redirection_items WHERE group_id=%d", $group ) );
|
| 227 |
+
|
| 228 |
$group = Red_Group::get( $group_id );
|
| 229 |
Red_Module::flush( $group->module_id );
|
| 230 |
}
|
| 231 |
+
|
| 232 |
function delete( $id ) {
|
| 233 |
global $wpdb;
|
| 234 |
+
|
| 235 |
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}redirection_items WHERE id=%d", $id ) );
|
| 236 |
+
|
| 237 |
RE_Log::delete_for_id( $id );
|
| 238 |
+
|
| 239 |
// Reorder all elements
|
| 240 |
$rows = $wpdb->get_results( "SELECT id FROM {$wpdb->prefix}redirection_items ORDER BY position" );
|
| 241 |
if ( count( $rows) > 0 ) {
|
| 244 |
}
|
| 245 |
}
|
| 246 |
}
|
| 247 |
+
|
| 248 |
+
|
| 249 |
function sanitize_url( $url, $regex ) {
|
| 250 |
// Make sure that the old URL is relative
|
| 251 |
$url = preg_replace( '@^https?://(.*?)/@', '/', $url );
|
| 255 |
$url = '/'.$url;
|
| 256 |
return $url;
|
| 257 |
}
|
| 258 |
+
|
| 259 |
+
|
| 260 |
function update( $details ) {
|
| 261 |
if ( strlen( $details['old'] ) > 0 ) {
|
| 262 |
global $wpdb;
|
| 263 |
+
|
| 264 |
$this->regex = isset( $details['regex'] ) ? 1 : 0;
|
| 265 |
$this->url = $this->sanitize_url( $details['old'], $this->regex );
|
| 266 |
$this->title = $details['title'];
|
| 267 |
+
|
| 268 |
$data = $this->match->data( $details );
|
| 269 |
+
|
| 270 |
$this->action_code = 0;
|
| 271 |
if ( isset( $details['action_code'] ) )
|
| 272 |
$this->action_code = intval( $details['action_code'] );
|
| 273 |
|
| 274 |
if ( isset( $details['group_id'] ) )
|
| 275 |
$this->group_id = intval( $details['group_id'] );
|
| 276 |
+
|
| 277 |
// Save this
|
| 278 |
global $wpdb;
|
| 279 |
$wpdb->update( $wpdb->prefix.'redirection_items', array( 'url' => $this->url, 'regex' => $this->regex, 'action_code' => $this->action_code, 'action_data' => $data, 'group_id' => $this->group_id, 'title' => $this->title ), array( 'id' => $this->id ) );
|
| 280 |
+
|
| 281 |
$group = Red_Group::get( $this->group_id );
|
| 282 |
if ( $group )
|
| 283 |
Red_Module::flush( $group->module_id );
|
| 284 |
}
|
| 285 |
}
|
| 286 |
+
|
| 287 |
function save_order( $items, $start ) {
|
| 288 |
global $wpdb;
|
| 289 |
+
|
| 290 |
foreach ( $items AS $pos => $id ) {
|
| 291 |
$wpdb->update( $wpdb->prefix.'redirection_items', array( 'position' => $pos + $start ), array( 'id' => $id ) );
|
| 292 |
}
|
| 293 |
+
|
| 294 |
$item = Red_Item::get_by_id( $id );
|
| 295 |
$group = Red_Group::get( $item->group_id );
|
| 296 |
if ( $group )
|
| 310 |
$target = $this->replaceSpecialTags( $target );
|
| 311 |
|
| 312 |
$this->visit( $url, $target );
|
| 313 |
+
|
| 314 |
if ( $this->status == 'enabled' )
|
| 315 |
return $this->action->process_before( $this->action_code, $target );
|
| 316 |
}
|
| 317 |
}
|
| 318 |
+
|
| 319 |
return false;
|
| 320 |
}
|
| 321 |
+
|
| 322 |
function replaceSpecialTags( $target ) {
|
| 323 |
if ( is_numeric( $target ) )
|
| 324 |
$target = get_permalink( $target );
|
| 330 |
$target = str_replace( '%userurl%', isset( $user->user_url ) ? $user->user_url : '', $target );
|
| 331 |
}
|
| 332 |
}
|
| 333 |
+
|
| 334 |
return $target;
|
| 335 |
}
|
| 336 |
|
| 352 |
$log = RE_Log::create( $url, $target, $_SERVER['HTTP_USER_AGENT'], $ip, isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '', $this->id, $this->module_id, $this->group_id);
|
| 353 |
}
|
| 354 |
}
|
| 355 |
+
|
| 356 |
function reset() {
|
| 357 |
global $wpdb;
|
| 358 |
+
|
| 359 |
$this->last_count = 0;
|
| 360 |
$this->last_access = '0000-00-00 00:00:00';
|
| 361 |
+
|
| 362 |
$wpdb->update( $wpdb->prefix.'redirection_items', array( 'last_count' => 0, 'last_access' => $this->last_access ), array( 'id' => $this->id ) );
|
| 363 |
+
|
| 364 |
RE_Log::delete_for_id( $this->id );
|
| 365 |
}
|
| 366 |
|
| 367 |
function show_url( $url ) {
|
| 368 |
return implode( '​/', explode( '/', $url ) );
|
| 369 |
}
|
| 370 |
+
|
| 371 |
function move_to( $group ) {
|
| 372 |
global $wpdb;
|
| 373 |
|
| 374 |
$wpdb->update( $wpdb->prefix.'redirection_items', array( 'group_id' => $group ), array( 'id' => $this->id ) );
|
| 375 |
}
|
| 376 |
+
|
| 377 |
function toggle_status() {
|
| 378 |
global $wpdb;
|
| 379 |
|
| 389 |
'error' => __( 'Error (404)', 'redirection' ),
|
| 390 |
'nothing' => __( 'Do nothing', 'redirection' ),
|
| 391 |
);
|
| 392 |
+
|
| 393 |
if ( $action )
|
| 394 |
return $actions[$action];
|
| 395 |
return $actions;
|
| 396 |
}
|
| 397 |
+
|
| 398 |
function match_name() {
|
| 399 |
return $this->match->match_name();
|
| 400 |
}
|
| 401 |
+
|
| 402 |
function type() {
|
| 403 |
if ( ( $this->action_type == 'url' || $this->action_type == 'error' || $this->action_type == 'random' ) && $this->action_code > 0 )
|
| 404 |
return $this->action_code;
|
modules/404.php
CHANGED
|
@@ -3,12 +3,12 @@
|
|
| 3 |
class Error404_Module extends Red_Module
|
| 4 |
{
|
| 5 |
var $log_404 = true;
|
| 6 |
-
|
| 7 |
function start ()
|
| 8 |
{
|
| 9 |
add_action ('template_redirect', array (&$this, 'template_redirect'));
|
| 10 |
}
|
| 11 |
-
|
| 12 |
function load ($data)
|
| 13 |
{
|
| 14 |
$mine = array ('log_404');
|
|
@@ -18,18 +18,18 @@ class Error404_Module extends Red_Module
|
|
| 18 |
$this->$key = $data[$key];
|
| 19 |
}
|
| 20 |
}
|
| 21 |
-
|
| 22 |
function save ($data)
|
| 23 |
{
|
| 24 |
$save = array
|
| 25 |
(
|
| 26 |
'log_404' => isset ($data['log_404']) ? true : false
|
| 27 |
);
|
| 28 |
-
|
| 29 |
$this->load ($save);
|
| 30 |
return $save;
|
| 31 |
}
|
| 32 |
-
|
| 33 |
function config ()
|
| 34 |
{
|
| 35 |
?>
|
|
@@ -39,7 +39,7 @@ class Error404_Module extends Red_Module
|
|
| 39 |
</tr>
|
| 40 |
<?php
|
| 41 |
}
|
| 42 |
-
|
| 43 |
function options ()
|
| 44 |
{
|
| 45 |
if (!$this->is_valid ())
|
|
@@ -47,10 +47,10 @@ class Error404_Module extends Red_Module
|
|
| 47 |
else
|
| 48 |
{
|
| 49 |
$options = array ();
|
| 50 |
-
|
| 51 |
if (!empty ($this->log_404))
|
| 52 |
$options[] = '404s are logged';
|
| 53 |
-
|
| 54 |
if (count ($options) > 0)
|
| 55 |
echo '<small>'.ucfirst (implode (', ', $options)).'</small>';
|
| 56 |
else
|
|
@@ -61,7 +61,7 @@ class Error404_Module extends Red_Module
|
|
| 61 |
function template_redirect ()
|
| 62 |
{
|
| 63 |
global $redirection;
|
| 64 |
-
|
| 65 |
if (is_404 () && !$redirection->hasMatched ())
|
| 66 |
{
|
| 67 |
$url = $_SERVER['REQUEST_URI'];
|
|
@@ -72,7 +72,7 @@ class Error404_Module extends Red_Module
|
|
| 72 |
{
|
| 73 |
if ($item->matches ($url))
|
| 74 |
{
|
| 75 |
-
$redirection->setMatched (true);
|
| 76 |
$this->matched = $item;
|
| 77 |
break;
|
| 78 |
}
|
|
@@ -82,7 +82,7 @@ class Error404_Module extends Red_Module
|
|
| 82 |
if (empty ($this->matched))
|
| 83 |
{
|
| 84 |
$modules = Red_Module::get_by_type ('404');
|
| 85 |
-
|
| 86 |
if (count ($modules) > 0)
|
| 87 |
{
|
| 88 |
foreach ($modules AS $module)
|
| 3 |
class Error404_Module extends Red_Module
|
| 4 |
{
|
| 5 |
var $log_404 = true;
|
| 6 |
+
|
| 7 |
function start ()
|
| 8 |
{
|
| 9 |
add_action ('template_redirect', array (&$this, 'template_redirect'));
|
| 10 |
}
|
| 11 |
+
|
| 12 |
function load ($data)
|
| 13 |
{
|
| 14 |
$mine = array ('log_404');
|
| 18 |
$this->$key = $data[$key];
|
| 19 |
}
|
| 20 |
}
|
| 21 |
+
|
| 22 |
function save ($data)
|
| 23 |
{
|
| 24 |
$save = array
|
| 25 |
(
|
| 26 |
'log_404' => isset ($data['log_404']) ? true : false
|
| 27 |
);
|
| 28 |
+
|
| 29 |
$this->load ($save);
|
| 30 |
return $save;
|
| 31 |
}
|
| 32 |
+
|
| 33 |
function config ()
|
| 34 |
{
|
| 35 |
?>
|
| 39 |
</tr>
|
| 40 |
<?php
|
| 41 |
}
|
| 42 |
+
|
| 43 |
function options ()
|
| 44 |
{
|
| 45 |
if (!$this->is_valid ())
|
| 47 |
else
|
| 48 |
{
|
| 49 |
$options = array ();
|
| 50 |
+
|
| 51 |
if (!empty ($this->log_404))
|
| 52 |
$options[] = '404s are logged';
|
| 53 |
+
|
| 54 |
if (count ($options) > 0)
|
| 55 |
echo '<small>'.ucfirst (implode (', ', $options)).'</small>';
|
| 56 |
else
|
| 61 |
function template_redirect ()
|
| 62 |
{
|
| 63 |
global $redirection;
|
| 64 |
+
|
| 65 |
if (is_404 () && !$redirection->hasMatched ())
|
| 66 |
{
|
| 67 |
$url = $_SERVER['REQUEST_URI'];
|
| 72 |
{
|
| 73 |
if ($item->matches ($url))
|
| 74 |
{
|
| 75 |
+
$redirection->setMatched (true);
|
| 76 |
$this->matched = $item;
|
| 77 |
break;
|
| 78 |
}
|
| 82 |
if (empty ($this->matched))
|
| 83 |
{
|
| 84 |
$modules = Red_Module::get_by_type ('404');
|
| 85 |
+
|
| 86 |
if (count ($modules) > 0)
|
| 87 |
{
|
| 88 |
foreach ($modules AS $module)
|
modules/apache.php
CHANGED
|
@@ -6,21 +6,21 @@ class Apache_Module extends Red_Module
|
|
| 6 |
var $allow_ip = false;
|
| 7 |
var $raw;
|
| 8 |
var $ban_ip = false;
|
| 9 |
-
|
| 10 |
var $site = '';
|
| 11 |
var $location = '';
|
| 12 |
var $canonical = '';
|
| 13 |
var $strip_index = '';
|
| 14 |
var $memory_limit = '';
|
| 15 |
var $error_level = '';
|
| 16 |
-
|
| 17 |
function is_valid ()
|
| 18 |
{
|
| 19 |
if (!$this->location || !file_exists (dirname ($this->location)) && !is_writable (dirname ($this->location)))
|
| 20 |
return false;
|
| 21 |
return true;
|
| 22 |
}
|
| 23 |
-
|
| 24 |
function load ($data)
|
| 25 |
{
|
| 26 |
$mine = array ('location', 'canonical', 'strip_index', 'memory_limit', 'error_level', 'ban_ip', 'allow_ip', 'raw', 'site');
|
|
@@ -30,12 +30,12 @@ class Apache_Module extends Red_Module
|
|
| 30 |
$this->$key = $data[$key];
|
| 31 |
}
|
| 32 |
}
|
| 33 |
-
|
| 34 |
function module_flush_delete ()
|
| 35 |
{
|
| 36 |
@unlink ($this->location);
|
| 37 |
}
|
| 38 |
-
|
| 39 |
function module_flush ($items)
|
| 40 |
{
|
| 41 |
// Produce the .htaccess file
|
|
@@ -47,10 +47,10 @@ class Apache_Module extends Red_Module
|
|
| 47 |
foreach ($items AS $item)
|
| 48 |
$htaccess->add ($item);
|
| 49 |
}
|
| 50 |
-
|
| 51 |
$htaccess->save ($this->location, $this->name);
|
| 52 |
}
|
| 53 |
-
|
| 54 |
function save ($data)
|
| 55 |
{
|
| 56 |
$save = array
|
|
@@ -65,11 +65,11 @@ class Apache_Module extends Red_Module
|
|
| 65 |
'raw' => $data['raw'],
|
| 66 |
'site' => preg_replace ('@https?://@', '', $data['site'])
|
| 67 |
);
|
| 68 |
-
|
| 69 |
$this->load ($save);
|
| 70 |
return $save;
|
| 71 |
}
|
| 72 |
-
|
| 73 |
function config ()
|
| 74 |
{
|
| 75 |
?>
|
|
@@ -89,7 +89,7 @@ class Apache_Module extends Red_Module
|
|
| 89 |
<select name="canonical">
|
| 90 |
<?php echo $this->select (array ('default' => __ ('Leave as is', 'redirection'), 'nowww' => sprintf (__ ('Strip WWW (%s)', 'redirection'), preg_replace ('@https?://(www)?@', '', get_bloginfo ('url'))), 'www' => sprintf (__ ('Force WWW (www.%s)', 'redirection'), preg_replace ('@https?://(www)?@', '', get_bloginfo ('url')))), $this->canonical); ?>
|
| 91 |
</select>
|
| 92 |
-
|
| 93 |
<br/>
|
| 94 |
<strong><?php _e ('Strip Index', 'redirection'); ?>:</strong>
|
| 95 |
<select name="strip_index">
|
|
@@ -103,7 +103,7 @@ class Apache_Module extends Red_Module
|
|
| 103 |
<select name="memory_limit">
|
| 104 |
<?php echo $this->select (array ('0' => __ ('Server default', 'redirection'), '8' => '8MB', '16' => '16MB', '32' => '32MB', '64' => '64MB', '128' => '128MB'), $this->memory_limit); ?>
|
| 105 |
</select>
|
| 106 |
-
|
| 107 |
<strong><?php _e ('Error Level', 'redirection'); ?>:</strong>
|
| 108 |
<select name="error_level">
|
| 109 |
<?php echo $this->select (array ('default' => __ ('Server default', 'redirection'), 'none' => __ ('No errors', 'redirection'), 'error' => __ ('Show errors', 'redirection')), $this->error_level); ?>
|
|
@@ -135,10 +135,10 @@ class Apache_Module extends Red_Module
|
|
| 135 |
<span class="sub"><?php _e ('Advanced: For management of external sites', 'redirection'); ?></span>
|
| 136 |
</td>
|
| 137 |
</tr>
|
| 138 |
-
|
| 139 |
<?php
|
| 140 |
}
|
| 141 |
-
|
| 142 |
function options ()
|
| 143 |
{
|
| 144 |
echo '<p>';
|
|
@@ -162,26 +162,26 @@ class Apache_Module extends Red_Module
|
|
| 162 |
else
|
| 163 |
echo __ ('<strong>Disabled: enter the location of an <code>.htaccess</code> file for this to be valid</strong>', 'redirection');
|
| 164 |
echo '</p>';
|
| 165 |
-
|
| 166 |
$options = array ();
|
| 167 |
if ($this->canonical != 'default' && !empty ($this->canonical))
|
| 168 |
$options[] = ($this->canonical == 'nowww') ? __ ('strip WWW', 'redirection') : __ ('force WWW', 'redirection');
|
| 169 |
-
|
| 170 |
if ($this->strip_index != 'default' && !empty ($this->strip_index))
|
| 171 |
$options[] = __ ('strip index', 'redirection');
|
| 172 |
-
|
| 173 |
if ($this->memory_limit > 0 && !empty ($this->memory_limit))
|
| 174 |
$options[] = sprintf (__ ('memory limit at %dMB', 'redirection'), $this->memory_limit);
|
| 175 |
-
|
| 176 |
if ($this->error_level != 'default' && !empty ($this->error_level))
|
| 177 |
$options[] = ($this->error_level == 'none') ? __ ('no errors', 'redirection') : __ ('show errors', 'redirection');
|
| 178 |
-
|
| 179 |
if (!empty ($this->ban_ip))
|
| 180 |
$options[] = __ ('IPs are banned', 'redirection');
|
| 181 |
-
|
| 182 |
if (!empty ($this->allow_ip))
|
| 183 |
$options[] = __ ('IPs are allowed', 'redirection');
|
| 184 |
-
|
| 185 |
echo '<small>'.ucfirst (implode (', ', $options)).'</small>';
|
| 186 |
-
}
|
| 187 |
}
|
| 6 |
var $allow_ip = false;
|
| 7 |
var $raw;
|
| 8 |
var $ban_ip = false;
|
| 9 |
+
|
| 10 |
var $site = '';
|
| 11 |
var $location = '';
|
| 12 |
var $canonical = '';
|
| 13 |
var $strip_index = '';
|
| 14 |
var $memory_limit = '';
|
| 15 |
var $error_level = '';
|
| 16 |
+
|
| 17 |
function is_valid ()
|
| 18 |
{
|
| 19 |
if (!$this->location || !file_exists (dirname ($this->location)) && !is_writable (dirname ($this->location)))
|
| 20 |
return false;
|
| 21 |
return true;
|
| 22 |
}
|
| 23 |
+
|
| 24 |
function load ($data)
|
| 25 |
{
|
| 26 |
$mine = array ('location', 'canonical', 'strip_index', 'memory_limit', 'error_level', 'ban_ip', 'allow_ip', 'raw', 'site');
|
| 30 |
$this->$key = $data[$key];
|
| 31 |
}
|
| 32 |
}
|
| 33 |
+
|
| 34 |
function module_flush_delete ()
|
| 35 |
{
|
| 36 |
@unlink ($this->location);
|
| 37 |
}
|
| 38 |
+
|
| 39 |
function module_flush ($items)
|
| 40 |
{
|
| 41 |
// Produce the .htaccess file
|
| 47 |
foreach ($items AS $item)
|
| 48 |
$htaccess->add ($item);
|
| 49 |
}
|
| 50 |
+
|
| 51 |
$htaccess->save ($this->location, $this->name);
|
| 52 |
}
|
| 53 |
+
|
| 54 |
function save ($data)
|
| 55 |
{
|
| 56 |
$save = array
|
| 65 |
'raw' => $data['raw'],
|
| 66 |
'site' => preg_replace ('@https?://@', '', $data['site'])
|
| 67 |
);
|
| 68 |
+
|
| 69 |
$this->load ($save);
|
| 70 |
return $save;
|
| 71 |
}
|
| 72 |
+
|
| 73 |
function config ()
|
| 74 |
{
|
| 75 |
?>
|
| 89 |
<select name="canonical">
|
| 90 |
<?php echo $this->select (array ('default' => __ ('Leave as is', 'redirection'), 'nowww' => sprintf (__ ('Strip WWW (%s)', 'redirection'), preg_replace ('@https?://(www)?@', '', get_bloginfo ('url'))), 'www' => sprintf (__ ('Force WWW (www.%s)', 'redirection'), preg_replace ('@https?://(www)?@', '', get_bloginfo ('url')))), $this->canonical); ?>
|
| 91 |
</select>
|
| 92 |
+
|
| 93 |
<br/>
|
| 94 |
<strong><?php _e ('Strip Index', 'redirection'); ?>:</strong>
|
| 95 |
<select name="strip_index">
|
| 103 |
<select name="memory_limit">
|
| 104 |
<?php echo $this->select (array ('0' => __ ('Server default', 'redirection'), '8' => '8MB', '16' => '16MB', '32' => '32MB', '64' => '64MB', '128' => '128MB'), $this->memory_limit); ?>
|
| 105 |
</select>
|
| 106 |
+
|
| 107 |
<strong><?php _e ('Error Level', 'redirection'); ?>:</strong>
|
| 108 |
<select name="error_level">
|
| 109 |
<?php echo $this->select (array ('default' => __ ('Server default', 'redirection'), 'none' => __ ('No errors', 'redirection'), 'error' => __ ('Show errors', 'redirection')), $this->error_level); ?>
|
| 135 |
<span class="sub"><?php _e ('Advanced: For management of external sites', 'redirection'); ?></span>
|
| 136 |
</td>
|
| 137 |
</tr>
|
| 138 |
+
|
| 139 |
<?php
|
| 140 |
}
|
| 141 |
+
|
| 142 |
function options ()
|
| 143 |
{
|
| 144 |
echo '<p>';
|
| 162 |
else
|
| 163 |
echo __ ('<strong>Disabled: enter the location of an <code>.htaccess</code> file for this to be valid</strong>', 'redirection');
|
| 164 |
echo '</p>';
|
| 165 |
+
|
| 166 |
$options = array ();
|
| 167 |
if ($this->canonical != 'default' && !empty ($this->canonical))
|
| 168 |
$options[] = ($this->canonical == 'nowww') ? __ ('strip WWW', 'redirection') : __ ('force WWW', 'redirection');
|
| 169 |
+
|
| 170 |
if ($this->strip_index != 'default' && !empty ($this->strip_index))
|
| 171 |
$options[] = __ ('strip index', 'redirection');
|
| 172 |
+
|
| 173 |
if ($this->memory_limit > 0 && !empty ($this->memory_limit))
|
| 174 |
$options[] = sprintf (__ ('memory limit at %dMB', 'redirection'), $this->memory_limit);
|
| 175 |
+
|
| 176 |
if ($this->error_level != 'default' && !empty ($this->error_level))
|
| 177 |
$options[] = ($this->error_level == 'none') ? __ ('no errors', 'redirection') : __ ('show errors', 'redirection');
|
| 178 |
+
|
| 179 |
if (!empty ($this->ban_ip))
|
| 180 |
$options[] = __ ('IPs are banned', 'redirection');
|
| 181 |
+
|
| 182 |
if (!empty ($this->allow_ip))
|
| 183 |
$options[] = __ ('IPs are allowed', 'redirection');
|
| 184 |
+
|
| 185 |
echo '<small>'.ucfirst (implode (', ', $options)).'</small>';
|
| 186 |
+
}
|
| 187 |
}
|
modules/wordpress.php
CHANGED
|
@@ -12,16 +12,16 @@ class WordPress_Module extends Red_Module {
|
|
| 12 |
add_action( 'send_headers', array( &$this, 'send_headers' ) );
|
| 13 |
add_filter( 'permalink_redirect_skip', array( &$this, 'permalink_redirect_skip' ) );
|
| 14 |
add_filter( 'wp_redirect', array( &$this, 'wp_redirect' ), 1, 2 );
|
| 15 |
-
|
| 16 |
// Remove WordPress 2.3 redirection
|
| 17 |
// XXX still needed?
|
| 18 |
remove_action( 'template_redirect', 'wp_old_slug_redirect' );
|
| 19 |
remove_action( 'edit_form_advanced', 'wp_remember_old_slug' );
|
| 20 |
}
|
| 21 |
-
|
| 22 |
function init() {
|
| 23 |
global $redirection;
|
| 24 |
-
|
| 25 |
$url = $_SERVER['REQUEST_URI'];
|
| 26 |
|
| 27 |
// Make sure we don't try and redirect something essential
|
|
@@ -41,12 +41,12 @@ class WordPress_Module extends Red_Module {
|
|
| 41 |
do_action( 'redirection_last', $url, $this );
|
| 42 |
}
|
| 43 |
}
|
| 44 |
-
|
| 45 |
function protected_url( $url )
|
| 46 |
{
|
| 47 |
global $redirection;
|
| 48 |
$part = explode( '?', $url );
|
| 49 |
-
|
| 50 |
if ( $part[0] == str_replace( get_bloginfo( 'url' ), '', $redirection->url() ).'/ajax.php' || strpos($url, 'wp-cron.php' ) !== false )
|
| 51 |
return true;
|
| 52 |
return false;
|
|
@@ -69,7 +69,7 @@ class WordPress_Module extends Red_Module {
|
|
| 69 |
function set_header_410() {
|
| 70 |
return 'HTTP/1.1 410 Gone';
|
| 71 |
}
|
| 72 |
-
|
| 73 |
function wp_redirect( $url, $status )
|
| 74 |
{
|
| 75 |
global $wp_version, $is_IIS;
|
|
@@ -95,11 +95,11 @@ class WordPress_Module extends Red_Module {
|
|
| 95 |
return $url;
|
| 96 |
}
|
| 97 |
}
|
| 98 |
-
|
| 99 |
function save( $data ) {
|
| 100 |
return array();
|
| 101 |
}
|
| 102 |
-
|
| 103 |
function permalink_redirect_skip( $skip ) {
|
| 104 |
// only want this if we:ve matched using redirection
|
| 105 |
if ( $this->matched )
|
|
@@ -114,7 +114,7 @@ class WordPress_Module extends Red_Module {
|
|
| 114 |
return false;
|
| 115 |
return true;
|
| 116 |
}
|
| 117 |
-
|
| 118 |
function options()
|
| 119 |
{
|
| 120 |
if ( !$this->is_valid() )
|
| 12 |
add_action( 'send_headers', array( &$this, 'send_headers' ) );
|
| 13 |
add_filter( 'permalink_redirect_skip', array( &$this, 'permalink_redirect_skip' ) );
|
| 14 |
add_filter( 'wp_redirect', array( &$this, 'wp_redirect' ), 1, 2 );
|
| 15 |
+
|
| 16 |
// Remove WordPress 2.3 redirection
|
| 17 |
// XXX still needed?
|
| 18 |
remove_action( 'template_redirect', 'wp_old_slug_redirect' );
|
| 19 |
remove_action( 'edit_form_advanced', 'wp_remember_old_slug' );
|
| 20 |
}
|
| 21 |
+
|
| 22 |
function init() {
|
| 23 |
global $redirection;
|
| 24 |
+
|
| 25 |
$url = $_SERVER['REQUEST_URI'];
|
| 26 |
|
| 27 |
// Make sure we don't try and redirect something essential
|
| 41 |
do_action( 'redirection_last', $url, $this );
|
| 42 |
}
|
| 43 |
}
|
| 44 |
+
|
| 45 |
function protected_url( $url )
|
| 46 |
{
|
| 47 |
global $redirection;
|
| 48 |
$part = explode( '?', $url );
|
| 49 |
+
|
| 50 |
if ( $part[0] == str_replace( get_bloginfo( 'url' ), '', $redirection->url() ).'/ajax.php' || strpos($url, 'wp-cron.php' ) !== false )
|
| 51 |
return true;
|
| 52 |
return false;
|
| 69 |
function set_header_410() {
|
| 70 |
return 'HTTP/1.1 410 Gone';
|
| 71 |
}
|
| 72 |
+
|
| 73 |
function wp_redirect( $url, $status )
|
| 74 |
{
|
| 75 |
global $wp_version, $is_IIS;
|
| 95 |
return $url;
|
| 96 |
}
|
| 97 |
}
|
| 98 |
+
|
| 99 |
function save( $data ) {
|
| 100 |
return array();
|
| 101 |
}
|
| 102 |
+
|
| 103 |
function permalink_redirect_skip( $skip ) {
|
| 104 |
// only want this if we:ve matched using redirection
|
| 105 |
if ( $this->matched )
|
| 114 |
return false;
|
| 115 |
return true;
|
| 116 |
}
|
| 117 |
+
|
| 118 |
function options()
|
| 119 |
{
|
| 120 |
if ( !$this->is_valid() )
|
plugin.php
CHANGED
|
@@ -138,7 +138,7 @@ class Redirection_Plugin {
|
|
| 138 |
|
| 139 |
$this->add_action( 'init', 'load_locale' );
|
| 140 |
}
|
| 141 |
-
|
| 142 |
/**
|
| 143 |
* Hook called to change the locale directory
|
| 144 |
* @return void
|
|
@@ -166,7 +166,7 @@ class Redirection_Plugin {
|
|
| 166 |
function add_action( $actions, $function = '', $priority = 10, $accepted_args = 1 ) {
|
| 167 |
if ( !is_array( $actions ) )
|
| 168 |
$actions = array( $actions );
|
| 169 |
-
|
| 170 |
foreach ( $actions AS $action ) {
|
| 171 |
add_action( $action, array( &$this, $function == '' ? $actions[0] : $function ), $priority, $accepted_args );
|
| 172 |
}
|
|
@@ -185,7 +185,7 @@ class Redirection_Plugin {
|
|
| 185 |
function add_filter( $filters, $function = '', $priority = 10, $accepted_args = 1 ) {
|
| 186 |
if ( !is_array( $filters ) )
|
| 187 |
$filters = array( $filters );
|
| 188 |
-
|
| 189 |
foreach ( $filters AS $filter ) {
|
| 190 |
add_filter( $filter, array( &$this, $function == '' ? $filters[0] : $function ), $priority, $accepted_args );
|
| 191 |
}
|
|
@@ -206,7 +206,7 @@ class Redirection_Plugin {
|
|
| 206 |
function register_ajax( $action, $function = '', $priority = 10 ) {
|
| 207 |
add_action( 'wp_ajax_'.$action, array( &$this, $function == '' ? $action : $function ), $priority );
|
| 208 |
}
|
| 209 |
-
|
| 210 |
/**
|
| 211 |
* Special deactivation function that takes into account the plugin directory
|
| 212 |
*
|
|
@@ -217,7 +217,7 @@ class Redirection_Plugin {
|
|
| 217 |
function register_deactivation( $pluginfile, $function = '' ) {
|
| 218 |
add_action( 'deactivate_'.basename( dirname( $pluginfile ) ).'/'.basename( $pluginfile ), array( &$this, $function == '' ? 'deactivate' : $function ) );
|
| 219 |
}
|
| 220 |
-
|
| 221 |
function register_plugin_settings( $pluginfile, $function = '' ) {
|
| 222 |
add_action( 'plugin_action_links_'.basename( dirname( $pluginfile ) ).'/'.basename( $pluginfile ), array( &$this, $function == '' ? 'plugin_settings' : $function ), 10, 4 );
|
| 223 |
}
|
|
@@ -342,7 +342,7 @@ class Redirection_Plugin {
|
|
| 342 |
$parts = explode( '?', basename( $_SERVER['REQUEST_URI'] ) );
|
| 343 |
return $parts[0];
|
| 344 |
}
|
| 345 |
-
|
| 346 |
/**
|
| 347 |
* Get a URL to the plugin. Useful for specifying JS and CSS files
|
| 348 |
*
|
|
@@ -479,7 +479,7 @@ class Redirection_Plugin {
|
|
| 479 |
return mb_strlen( $text );
|
| 480 |
return strlen( $text );
|
| 481 |
}
|
| 482 |
-
|
| 483 |
/**
|
| 484 |
* Returns version of plugin
|
| 485 |
*
|
|
@@ -487,7 +487,7 @@ class Redirection_Plugin {
|
|
| 487 |
**/
|
| 488 |
function version() {
|
| 489 |
$plugin_data = implode( '', file( $this->plugin_base ) );
|
| 490 |
-
|
| 491 |
if ( preg_match( '|Version:(.*)|i', $plugin_data, $version ) )
|
| 492 |
return trim( $version[1] );
|
| 493 |
return '';
|
|
@@ -513,4 +513,4 @@ if ( !function_exists( '_n' ) ) {
|
|
| 513 |
function _n($single, $plural, $number, $domain = 'default') {
|
| 514 |
return __ngettext($single, $plural, $number, $domain = 'default');
|
| 515 |
}
|
| 516 |
-
}
|
| 138 |
|
| 139 |
$this->add_action( 'init', 'load_locale' );
|
| 140 |
}
|
| 141 |
+
|
| 142 |
/**
|
| 143 |
* Hook called to change the locale directory
|
| 144 |
* @return void
|
| 166 |
function add_action( $actions, $function = '', $priority = 10, $accepted_args = 1 ) {
|
| 167 |
if ( !is_array( $actions ) )
|
| 168 |
$actions = array( $actions );
|
| 169 |
+
|
| 170 |
foreach ( $actions AS $action ) {
|
| 171 |
add_action( $action, array( &$this, $function == '' ? $actions[0] : $function ), $priority, $accepted_args );
|
| 172 |
}
|
| 185 |
function add_filter( $filters, $function = '', $priority = 10, $accepted_args = 1 ) {
|
| 186 |
if ( !is_array( $filters ) )
|
| 187 |
$filters = array( $filters );
|
| 188 |
+
|
| 189 |
foreach ( $filters AS $filter ) {
|
| 190 |
add_filter( $filter, array( &$this, $function == '' ? $filters[0] : $function ), $priority, $accepted_args );
|
| 191 |
}
|
| 206 |
function register_ajax( $action, $function = '', $priority = 10 ) {
|
| 207 |
add_action( 'wp_ajax_'.$action, array( &$this, $function == '' ? $action : $function ), $priority );
|
| 208 |
}
|
| 209 |
+
|
| 210 |
/**
|
| 211 |
* Special deactivation function that takes into account the plugin directory
|
| 212 |
*
|
| 217 |
function register_deactivation( $pluginfile, $function = '' ) {
|
| 218 |
add_action( 'deactivate_'.basename( dirname( $pluginfile ) ).'/'.basename( $pluginfile ), array( &$this, $function == '' ? 'deactivate' : $function ) );
|
| 219 |
}
|
| 220 |
+
|
| 221 |
function register_plugin_settings( $pluginfile, $function = '' ) {
|
| 222 |
add_action( 'plugin_action_links_'.basename( dirname( $pluginfile ) ).'/'.basename( $pluginfile ), array( &$this, $function == '' ? 'plugin_settings' : $function ), 10, 4 );
|
| 223 |
}
|
| 342 |
$parts = explode( '?', basename( $_SERVER['REQUEST_URI'] ) );
|
| 343 |
return $parts[0];
|
| 344 |
}
|
| 345 |
+
|
| 346 |
/**
|
| 347 |
* Get a URL to the plugin. Useful for specifying JS and CSS files
|
| 348 |
*
|
| 479 |
return mb_strlen( $text );
|
| 480 |
return strlen( $text );
|
| 481 |
}
|
| 482 |
+
|
| 483 |
/**
|
| 484 |
* Returns version of plugin
|
| 485 |
*
|
| 487 |
**/
|
| 488 |
function version() {
|
| 489 |
$plugin_data = implode( '', file( $this->plugin_base ) );
|
| 490 |
+
|
| 491 |
if ( preg_match( '|Version:(.*)|i', $plugin_data, $version ) )
|
| 492 |
return trim( $version[1] );
|
| 493 |
return '';
|
| 513 |
function _n($single, $plural, $number, $domain = 'default') {
|
| 514 |
return __ngettext($single, $plural, $number, $domain = 'default');
|
| 515 |
}
|
| 516 |
+
}
|
readme.txt
CHANGED
|
@@ -3,8 +3,8 @@ Contributors: johnny5
|
|
| 3 |
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.
|
| 7 |
-
Stable tag:
|
| 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 |
|
|
@@ -48,11 +48,13 @@ Redirection is available in:
|
|
| 48 |
* Polish by Kuba Majerczyk
|
| 49 |
* Arabic by Jerry John
|
| 50 |
* Brazilian Portuguese by Pedro Padron
|
| 51 |
-
* Dutch by Marlon Navas
|
| 52 |
* Hungarian by daSSad
|
| 53 |
* Turkish by Fatih Cevik
|
| 54 |
* Romanian translation, thanks to Alina
|
| 55 |
* Greek, thanks to Stefanos Kofopoulos
|
|
|
|
|
|
|
| 56 |
|
| 57 |
== Installation ==
|
| 58 |
|
|
@@ -87,6 +89,12 @@ Full documentation can be found on the [Redirection](http://urbangiraffe.com/plu
|
|
| 87 |
|
| 88 |
== Changelog ==
|
| 89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
= 2.2.10 =
|
| 91 |
* Fix XSS in referrers log
|
| 92 |
|
|
@@ -117,7 +125,7 @@ Full documentation can be found on the [Redirection](http://urbangiraffe.com/plu
|
|
| 117 |
* Remove debug from htaccess module
|
| 118 |
|
| 119 |
= 2.2.2 =
|
| 120 |
-
* Fix encoding of JS strings
|
| 121 |
|
| 122 |
= 2.2.1 =
|
| 123 |
* More Dutch translation
|
|
@@ -167,114 +175,114 @@ Full documentation can be found on the [Redirection](http://urbangiraffe.com/plu
|
|
| 167 |
= 2.1.20 =
|
| 168 |
* Fix for some users with problems deleting redirections
|
| 169 |
|
| 170 |
-
= 2.1.19 =
|
| 171 |
* Add Hindi translation
|
| 172 |
* Fix some ajax
|
| 173 |
|
| 174 |
-
= 2.1.18 =
|
| 175 |
* Fix module deletion
|
| 176 |
|
| 177 |
-
= 2.1.17 =
|
| 178 |
* Log JS fixes
|
| 179 |
|
| 180 |
-
= 2.1.16 =
|
| 181 |
* Fix group edit and log add entry
|
| 182 |
|
| 183 |
-
= 2.1.15 =
|
| 184 |
* Use WP Ajax
|
| 185 |
* Add Japanese
|
| 186 |
|
| 187 |
-
= 2.1.14 =
|
| 188 |
* Fix #457
|
| 189 |
* Add #475, #427
|
| 190 |
* Add Catalan translation.
|
| 191 |
* WP2.8 compatibility
|
| 192 |
|
| 193 |
-
= 2.1.13 =
|
| 194 |
* Add Spanish and Chinese translation
|
| 195 |
|
| 196 |
-
= 2.1.12 =
|
| 197 |
* Add icons
|
| 198 |
* Disable category monitoring
|
| 199 |
|
| 200 |
-
= 2.1.11 =
|
| 201 |
* Errors on some sites
|
| 202 |
|
| 203 |
-
= 2.1.10 =
|
| 204 |
* Missing localisations
|
| 205 |
|
| 206 |
-
= 2.1.9
|
| 207 |
* Fix 'you do not permissions' error on some non-English sites
|
| 208 |
|
| 209 |
-
= 2.1.8
|
| 210 |
* Fix category change 'quick edit'
|
| 211 |
|
| 212 |
-
= 2.1.7
|
| 213 |
* Fix #422, #426
|
| 214 |
|
| 215 |
-
= 2.1.6
|
| 216 |
* Redirection loops
|
| 217 |
|
| 218 |
-
= 2.1.5
|
| 219 |
* Fix #366, #371, #378, #390, #400.
|
| 220 |
* Add #370, #357
|
| 221 |
|
| 222 |
-
= 2.1.4
|
| 223 |
* RSS feed token
|
| 224 |
|
| 225 |
-
= 2.1.3
|
| 226 |
* Re-enable import feature
|
| 227 |
|
| 228 |
-
= 2.1.2
|
| 229 |
* Minor button changes
|
| 230 |
|
| 231 |
-
= 2.1.1
|
| 232 |
* Force JS cache
|
| 233 |
* Fix log deletion
|
| 234 |
|
| 235 |
-
= 2.1
|
| 236 |
* Change to jQuery
|
| 237 |
* Nonce protection
|
| 238 |
* Fix #352, #353, #339, #351
|
| 239 |
* Add #358, #316.
|
| 240 |
|
| 241 |
-
= 2.0.12 =
|
| 242 |
* Disable category monitor in 2.7
|
| 243 |
|
| 244 |
-
= 2.0.11 =
|
| 245 |
* Hebrew translation
|
| 246 |
|
| 247 |
-
= 2.0.10 =
|
| 248 |
* Fix small issues in display with WP 2.7
|
| 249 |
|
| 250 |
-
= 2.0.9
|
| 251 |
* Fix delete redirects
|
| 252 |
|
| 253 |
-
= 2.0.8
|
| 254 |
* Refix log delete
|
| 255 |
|
| 256 |
-
= 2.0.7
|
| 257 |
* Fix incorrect automatic redirection with static home pages
|
| 258 |
|
| 259 |
-
= 2.0.6
|
| 260 |
* Support for wp-load.php
|
| 261 |
|
| 262 |
-
= 2.0.5
|
| 263 |
* Fix #264
|
| 264 |
|
| 265 |
-
= 2.0.4
|
| 266 |
* get_home_path seems not be available for some people
|
| 267 |
|
| 268 |
-
= 2.0.3
|
| 269 |
* Fix #248
|
| 270 |
* Update plugin.php to better handle odd directories
|
| 271 |
|
| 272 |
-
= 2.0.2
|
| 273 |
* Correct DB install
|
| 274 |
* Fix IIS problem
|
| 275 |
|
| 276 |
-
= 2.0.1
|
| 277 |
* Install defaults when no existing redirection setup
|
| 278 |
|
| 279 |
-
= 2.0
|
| 280 |
* New version
|
| 3 |
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.11
|
| 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 |
|
| 48 |
* Polish by Kuba Majerczyk
|
| 49 |
* Arabic by Jerry John
|
| 50 |
* Brazilian Portuguese by Pedro Padron
|
| 51 |
+
* Dutch by Marlon Navas, Pieter Carette, and Bart Kummel
|
| 52 |
* Hungarian by daSSad
|
| 53 |
* Turkish by Fatih Cevik
|
| 54 |
* Romanian translation, thanks to Alina
|
| 55 |
* Greek, thanks to Stefanos Kofopoulos
|
| 56 |
+
* Belarusian, thanks to Alexander Ovsov
|
| 57 |
+
* Czech, thanks to Martin Jurica
|
| 58 |
|
| 59 |
== Installation ==
|
| 60 |
|
| 89 |
|
| 90 |
== Changelog ==
|
| 91 |
|
| 92 |
+
= 2.2.11 =
|
| 93 |
+
* Add Lithuanian
|
| 94 |
+
* Add Belarusian
|
| 95 |
+
* Add Czech
|
| 96 |
+
* Fix order of redirects, thanks to Nicolas Hatier
|
| 97 |
+
|
| 98 |
= 2.2.10 =
|
| 99 |
* Fix XSS in referrers log
|
| 100 |
|
| 125 |
* Remove debug from htaccess module
|
| 126 |
|
| 127 |
= 2.2.2 =
|
| 128 |
+
* Fix encoding of JS strings
|
| 129 |
|
| 130 |
= 2.2.1 =
|
| 131 |
* More Dutch translation
|
| 175 |
= 2.1.20 =
|
| 176 |
* Fix for some users with problems deleting redirections
|
| 177 |
|
| 178 |
+
= 2.1.19 =
|
| 179 |
* Add Hindi translation
|
| 180 |
* Fix some ajax
|
| 181 |
|
| 182 |
+
= 2.1.18 =
|
| 183 |
* Fix module deletion
|
| 184 |
|
| 185 |
+
= 2.1.17 =
|
| 186 |
* Log JS fixes
|
| 187 |
|
| 188 |
+
= 2.1.16 =
|
| 189 |
* Fix group edit and log add entry
|
| 190 |
|
| 191 |
+
= 2.1.15 =
|
| 192 |
* Use WP Ajax
|
| 193 |
* Add Japanese
|
| 194 |
|
| 195 |
+
= 2.1.14 =
|
| 196 |
* Fix #457
|
| 197 |
* Add #475, #427
|
| 198 |
* Add Catalan translation.
|
| 199 |
* WP2.8 compatibility
|
| 200 |
|
| 201 |
+
= 2.1.13 =
|
| 202 |
* Add Spanish and Chinese translation
|
| 203 |
|
| 204 |
+
= 2.1.12 =
|
| 205 |
* Add icons
|
| 206 |
* Disable category monitoring
|
| 207 |
|
| 208 |
+
= 2.1.11 =
|
| 209 |
* Errors on some sites
|
| 210 |
|
| 211 |
+
= 2.1.10 =
|
| 212 |
* Missing localisations
|
| 213 |
|
| 214 |
+
= 2.1.9 =
|
| 215 |
* Fix 'you do not permissions' error on some non-English sites
|
| 216 |
|
| 217 |
+
= 2.1.8 =
|
| 218 |
* Fix category change 'quick edit'
|
| 219 |
|
| 220 |
+
= 2.1.7 =
|
| 221 |
* Fix #422, #426
|
| 222 |
|
| 223 |
+
= 2.1.6 =
|
| 224 |
* Redirection loops
|
| 225 |
|
| 226 |
+
= 2.1.5 =
|
| 227 |
* Fix #366, #371, #378, #390, #400.
|
| 228 |
* Add #370, #357
|
| 229 |
|
| 230 |
+
= 2.1.4 =
|
| 231 |
* RSS feed token
|
| 232 |
|
| 233 |
+
= 2.1.3 =
|
| 234 |
* Re-enable import feature
|
| 235 |
|
| 236 |
+
= 2.1.2 =
|
| 237 |
* Minor button changes
|
| 238 |
|
| 239 |
+
= 2.1.1 =
|
| 240 |
* Force JS cache
|
| 241 |
* Fix log deletion
|
| 242 |
|
| 243 |
+
= 2.1 =
|
| 244 |
* Change to jQuery
|
| 245 |
* Nonce protection
|
| 246 |
* Fix #352, #353, #339, #351
|
| 247 |
* Add #358, #316.
|
| 248 |
|
| 249 |
+
= 2.0.12 =
|
| 250 |
* Disable category monitor in 2.7
|
| 251 |
|
| 252 |
+
= 2.0.11 =
|
| 253 |
* Hebrew translation
|
| 254 |
|
| 255 |
+
= 2.0.10 =
|
| 256 |
* Fix small issues in display with WP 2.7
|
| 257 |
|
| 258 |
+
= 2.0.9 =
|
| 259 |
* Fix delete redirects
|
| 260 |
|
| 261 |
+
= 2.0.8 =
|
| 262 |
* Refix log delete
|
| 263 |
|
| 264 |
+
= 2.0.7 =
|
| 265 |
* Fix incorrect automatic redirection with static home pages
|
| 266 |
|
| 267 |
+
= 2.0.6 =
|
| 268 |
* Support for wp-load.php
|
| 269 |
|
| 270 |
+
= 2.0.5 =
|
| 271 |
* Fix #264
|
| 272 |
|
| 273 |
+
= 2.0.4 =
|
| 274 |
* get_home_path seems not be available for some people
|
| 275 |
|
| 276 |
+
= 2.0.3 =
|
| 277 |
* Fix #248
|
| 278 |
* Update plugin.php to better handle odd directories
|
| 279 |
|
| 280 |
+
= 2.0.2 =
|
| 281 |
* Correct DB install
|
| 282 |
* Fix IIS problem
|
| 283 |
|
| 284 |
+
= 2.0.1 =
|
| 285 |
* Install defaults when no existing redirection setup
|
| 286 |
|
| 287 |
+
= 2.0 =
|
| 288 |
* New version
|
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.
|
| 7 |
Author: John Godley
|
| 8 |
Author URI: http://urbangiraffe.com
|
| 9 |
============================================================================================================
|
|
@@ -37,18 +37,18 @@ if ( class_exists( 'Redirection' ) )
|
|
| 37 |
|
| 38 |
class Redirection extends Redirection_Plugin {
|
| 39 |
var $hasMatched = false;
|
| 40 |
-
|
| 41 |
function Redirection() {
|
| 42 |
$this->register_plugin( 'redirection', __FILE__ );
|
| 43 |
-
|
| 44 |
if ( is_admin() ) {
|
| 45 |
$this->add_action( 'admin_menu' );
|
| 46 |
$this->add_action( 'load-tools_page_redirection', 'redirection_head' );
|
| 47 |
$this->add_action( 'init', 'inject' );
|
| 48 |
-
|
| 49 |
$this->register_activation( __FILE__ );
|
| 50 |
$this->register_plugin_settings( __FILE__ );
|
| 51 |
-
|
| 52 |
// Ajax functions
|
| 53 |
if ( defined( 'DOING_AJAX' ) ) {
|
| 54 |
include_once dirname( __FILE__ ).'/ajax.php';
|
|
@@ -57,18 +57,18 @@ class Redirection extends Redirection_Plugin {
|
|
| 57 |
}
|
| 58 |
else {
|
| 59 |
$this->update();
|
| 60 |
-
|
| 61 |
// Create a WordPress exporter and let it handle the load
|
| 62 |
$this->wp = new WordPress_Module();
|
| 63 |
$this->wp->start();
|
| 64 |
-
|
| 65 |
$this->error = new Error404_Module();
|
| 66 |
$this->error->start();
|
| 67 |
}
|
| 68 |
-
|
| 69 |
$this->monitor = new Red_Monitor( $this->get_options() );
|
| 70 |
}
|
| 71 |
-
|
| 72 |
function update() {
|
| 73 |
$version = get_option( 'redirection_version' );
|
| 74 |
|
|
@@ -78,10 +78,10 @@ class Redirection extends Redirection_Plugin {
|
|
| 78 |
$db = new RE_Database();
|
| 79 |
return $db->upgrade( $version, REDIRECTION_VERSION );
|
| 80 |
}
|
| 81 |
-
|
| 82 |
return true;
|
| 83 |
}
|
| 84 |
-
|
| 85 |
function activate() {
|
| 86 |
if ( $this->update() === false ) {
|
| 87 |
$db = new RE_Database();
|
|
@@ -89,16 +89,16 @@ class Redirection extends Redirection_Plugin {
|
|
| 89 |
exit();
|
| 90 |
}
|
| 91 |
}
|
| 92 |
-
|
| 93 |
function plugin_settings( $links ) {
|
| 94 |
$settings_link = '<a href="tools.php?page='.basename( __FILE__ ).'">'.__( 'Settings', 'redirection' ).'</a>';
|
| 95 |
array_unshift( $links, $settings_link );
|
| 96 |
return $links;
|
| 97 |
}
|
| 98 |
-
|
| 99 |
function version() {
|
| 100 |
$plugin_data = implode( '', file( __FILE__ ) );
|
| 101 |
-
|
| 102 |
if ( preg_match( '|Version:(.*)|i', $plugin_data, $version ) )
|
| 103 |
return trim( $version[1] );
|
| 104 |
return '';
|
|
@@ -107,7 +107,7 @@ class Redirection extends Redirection_Plugin {
|
|
| 107 |
function redirection_head() {
|
| 108 |
wp_enqueue_script( 'redirection', plugin_dir_url( __FILE__ ).'js/redirection.js', array( 'jquery-form', 'jquery-ui-sortable' ), $this->version() );
|
| 109 |
wp_enqueue_style( 'redirection', plugin_dir_url( __FILE__ ).'admin.css', $this->version() );
|
| 110 |
-
|
| 111 |
wp_localize_script( 'redirection', 'Redirectioni10n', array(
|
| 112 |
'please_wait' => __( 'Please wait...', 'redirection' ),
|
| 113 |
'type' => 1,
|
|
@@ -146,32 +146,32 @@ class Redirection extends Redirection_Plugin {
|
|
| 146 |
|
| 147 |
return $this->admin_redirects( isset( $_GET['id'] ) ? intval( $_GET['id'] ) : 0 );
|
| 148 |
}
|
| 149 |
-
|
| 150 |
function admin_screen_modules() {
|
| 151 |
if ( isset( $_POST['create'] ) && check_admin_referer( 'redirection-module_add' ) ) {
|
| 152 |
$data = stripslashes_deep( $_POST );
|
| 153 |
-
|
| 154 |
if ( ( $module = Red_Module::create( $data ) ) ) {
|
| 155 |
$moduleid = 0;
|
| 156 |
if ( isset( $_POST['module'] ) )
|
| 157 |
$moduleid = intval( $_POST['module'] );
|
| 158 |
-
|
| 159 |
$this->render_message( __( 'Your module was successfully created', 'redirection' ) );
|
| 160 |
Red_Module::flush( $moduleid );
|
| 161 |
}
|
| 162 |
else
|
| 163 |
$this->render_error( __( 'Your module was not created - did you provide a name?', 'redirection' ) );
|
| 164 |
}
|
| 165 |
-
|
| 166 |
$options = $this->get_options();
|
| 167 |
$this->render_admin( 'module_list', array( 'modules' => Red_Module::get_all(), 'module_types' => Red_Module::get_types(), 'token' => $options['token'] ) );
|
| 168 |
}
|
| 169 |
-
|
| 170 |
function get_options() {
|
| 171 |
$options = get_option( 'redirection_options' );
|
| 172 |
if ( $options === false )
|
| 173 |
$options = array();
|
| 174 |
-
|
| 175 |
$defaults = array (
|
| 176 |
'lookup' => 'http://urbangiraffe.com/map/?from=redirection&ip=',
|
| 177 |
'support' => false,
|
|
@@ -183,21 +183,21 @@ class Redirection extends Redirection_Plugin {
|
|
| 183 |
'monitor_post' => 0,
|
| 184 |
'auto_target' => '',
|
| 185 |
);
|
| 186 |
-
|
| 187 |
foreach ( $defaults AS $key => $value ) {
|
| 188 |
if ( !isset( $options[$key] ) )
|
| 189 |
$options[$key] = $value;
|
| 190 |
}
|
| 191 |
-
|
| 192 |
if ( $options['lookup'] == 'http://geomaplookup.cinnamonthoughts.org/?ip=' || $options['lookup'] == 'http://geomaplookup.net/?ip=' )
|
| 193 |
$options['lookup'] = 'http://urbangiraffe.com/map/?from=redirection&ip=';
|
| 194 |
-
|
| 195 |
return $options;
|
| 196 |
}
|
| 197 |
-
|
| 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 |
|
|
@@ -219,10 +219,10 @@ class Redirection extends Redirection_Plugin {
|
|
| 219 |
$options['monitor_new_posts'] = isset( $_POST['monitor_new_posts'] ) ? true : false;
|
| 220 |
$options['expire'] = intval( $_POST['expire'] );
|
| 221 |
$options['token'] = stripslashes( $_POST['token'] );
|
| 222 |
-
|
| 223 |
if ( trim( $options['token'] ) == '' )
|
| 224 |
$options['token'] = md5( uniqid() );
|
| 225 |
-
|
| 226 |
update_option( 'redirection_options', $options );
|
| 227 |
|
| 228 |
$this->render_message( __( 'Your options were updated', 'redirection' ) );
|
|
@@ -232,15 +232,15 @@ class Redirection extends Redirection_Plugin {
|
|
| 232 |
|
| 233 |
$db = new RE_Database;
|
| 234 |
$db->remove( __FILE__ );
|
| 235 |
-
|
| 236 |
$this->render_message( __( 'Redirection data has been deleted and the plugin disabled', 'redirection' ) );
|
| 237 |
return;
|
| 238 |
}
|
| 239 |
elseif ( isset( $_POST['import'] ) && check_admin_referer( 'redirection-import' ) ) {
|
| 240 |
include dirname( __FILE__ ).'/models/file_io.php';
|
| 241 |
-
|
| 242 |
$importer = new Red_FileIO;
|
| 243 |
-
|
| 244 |
$count = $importer->import( $_POST['group'], $_FILES['upload'] );
|
| 245 |
if ( $count > 0 )
|
| 246 |
$this->render_message( sprintf( _n( '%d redirection was successfully imported','%d redirections were successfully imported', $count, 'redirection' ), $count ) );
|
|
@@ -254,7 +254,7 @@ class Redirection extends Redirection_Plugin {
|
|
| 254 |
|
| 255 |
function admin_screen_log() {
|
| 256 |
include dirname( __FILE__ ).'/models/pager.php';
|
| 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, $_SERVER['REQUEST_URI'], 'created', 'DESC', 'log' ) );
|
|
@@ -262,12 +262,12 @@ class Redirection extends Redirection_Plugin {
|
|
| 262 |
RE_Log::delete_all( array( 'group_id' => intval( $_GET['group'] ) ), new RE_Pager( $_GET, $_SERVER['REQUEST_URI'], 'created', 'DESC', 'log' ) );
|
| 263 |
else
|
| 264 |
RE_Log::delete_all( array(), new RE_Pager( $_GET, $_SERVER['REQUEST_URI'], 'created', 'DESC', 'log' ) );
|
| 265 |
-
|
| 266 |
$this->render_message( __( 'Your logs have been deleted', 'redirection' ) );
|
| 267 |
}
|
| 268 |
-
|
| 269 |
$pager = new RE_Pager( $_GET, $_SERVER['REQUEST_URI'], 'created', 'DESC', 'log' );
|
| 270 |
-
|
| 271 |
if ( isset( $_GET['module'] ) )
|
| 272 |
$logs = RE_Log::get_by_module( $pager, intval( $_GET['module'] ) );
|
| 273 |
else if (isset($_GET['group']))
|
|
@@ -276,14 +276,14 @@ class Redirection extends Redirection_Plugin {
|
|
| 276 |
$logs = RE_Log::get_by_redirect( $pager, intval( $_GET['redirect'] ) );
|
| 277 |
else
|
| 278 |
$logs = RE_Log::get( $pager );
|
| 279 |
-
|
| 280 |
$options = $this->get_options();
|
| 281 |
$this->render_admin( 'log', array( 'logs' => $logs, 'pager' => $pager, 'lookup' => $options['lookup'] ) );
|
| 282 |
}
|
| 283 |
-
|
| 284 |
function admin_groups( $module ) {
|
| 285 |
include dirname( __FILE__ ).'/models/pager.php';
|
| 286 |
-
|
| 287 |
if ( isset( $_POST['add'] ) && check_admin_referer( 'redirection-add_group' ) ) {
|
| 288 |
if ( Red_Group::create( stripslashes_deep( $_POST ) ) ) {
|
| 289 |
$this->render_message( __( 'Your group was added successfully', 'redirection' ) );
|
|
@@ -292,7 +292,7 @@ class Redirection extends Redirection_Plugin {
|
|
| 292 |
else
|
| 293 |
$this->render_error( __( 'Please specify a group name', 'redirection' ) );
|
| 294 |
}
|
| 295 |
-
|
| 296 |
if ( $module == 0 )
|
| 297 |
$module = Red_Module::get_first_id();
|
| 298 |
|
|
@@ -301,13 +301,13 @@ class Redirection extends Redirection_Plugin {
|
|
| 301 |
|
| 302 |
$this->render_admin( 'group_list', array( 'groups' => $items, 'pager' => $pager, 'modules' => Red_Module::get_for_select(), 'module' => Red_Module::get( $module ) ) );
|
| 303 |
}
|
| 304 |
-
|
| 305 |
function admin_redirects( $group ) {
|
| 306 |
include dirname( __FILE__ ).'/models/pager.php';
|
| 307 |
-
|
| 308 |
if ( $group == 0 )
|
| 309 |
$group = Red_Group::get_first_id();
|
| 310 |
-
|
| 311 |
$pager = new RE_Pager( $_GET, $_SERVER['REQUEST_URI'], 'position', 'ASC' );
|
| 312 |
$items = Red_Item::get_by_group( $group, $pager );
|
| 313 |
|
|
@@ -317,16 +317,16 @@ class Redirection extends Redirection_Plugin {
|
|
| 317 |
function setMatched( $match ) {
|
| 318 |
$this->hasMatched = $match;
|
| 319 |
}
|
| 320 |
-
|
| 321 |
function hasMatched() {
|
| 322 |
return $this->hasMatched;
|
| 323 |
}
|
| 324 |
-
|
| 325 |
function locales() {
|
| 326 |
$locales = array();
|
| 327 |
if ( file_exists( dirname( __FILE__ ).'/readme.txt' ) ) {
|
| 328 |
$readme = file_get_contents( dirname( __FILE__ ).'/readme.txt' );
|
| 329 |
-
|
| 330 |
$start = strpos( $readme, __( 'Redirection is available in' ) );
|
| 331 |
$end = strpos( $readme, '==', $start );
|
| 332 |
if ( $start !== false && $end !== false ) {
|
|
@@ -334,10 +334,10 @@ class Redirection extends Redirection_Plugin {
|
|
| 334 |
$locales = $matches[1];
|
| 335 |
}
|
| 336 |
}
|
| 337 |
-
|
| 338 |
sort( $locales );
|
| 339 |
}
|
| 340 |
-
|
| 341 |
return $locales;
|
| 342 |
}
|
| 343 |
}
|
| 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.11
|
| 7 |
Author: John Godley
|
| 8 |
Author URI: http://urbangiraffe.com
|
| 9 |
============================================================================================================
|
| 37 |
|
| 38 |
class Redirection extends Redirection_Plugin {
|
| 39 |
var $hasMatched = false;
|
| 40 |
+
|
| 41 |
function Redirection() {
|
| 42 |
$this->register_plugin( 'redirection', __FILE__ );
|
| 43 |
+
|
| 44 |
if ( is_admin() ) {
|
| 45 |
$this->add_action( 'admin_menu' );
|
| 46 |
$this->add_action( 'load-tools_page_redirection', 'redirection_head' );
|
| 47 |
$this->add_action( 'init', 'inject' );
|
| 48 |
+
|
| 49 |
$this->register_activation( __FILE__ );
|
| 50 |
$this->register_plugin_settings( __FILE__ );
|
| 51 |
+
|
| 52 |
// Ajax functions
|
| 53 |
if ( defined( 'DOING_AJAX' ) ) {
|
| 54 |
include_once dirname( __FILE__ ).'/ajax.php';
|
| 57 |
}
|
| 58 |
else {
|
| 59 |
$this->update();
|
| 60 |
+
|
| 61 |
// Create a WordPress exporter and let it handle the load
|
| 62 |
$this->wp = new WordPress_Module();
|
| 63 |
$this->wp->start();
|
| 64 |
+
|
| 65 |
$this->error = new Error404_Module();
|
| 66 |
$this->error->start();
|
| 67 |
}
|
| 68 |
+
|
| 69 |
$this->monitor = new Red_Monitor( $this->get_options() );
|
| 70 |
}
|
| 71 |
+
|
| 72 |
function update() {
|
| 73 |
$version = get_option( 'redirection_version' );
|
| 74 |
|
| 78 |
$db = new RE_Database();
|
| 79 |
return $db->upgrade( $version, REDIRECTION_VERSION );
|
| 80 |
}
|
| 81 |
+
|
| 82 |
return true;
|
| 83 |
}
|
| 84 |
+
|
| 85 |
function activate() {
|
| 86 |
if ( $this->update() === false ) {
|
| 87 |
$db = new RE_Database();
|
| 89 |
exit();
|
| 90 |
}
|
| 91 |
}
|
| 92 |
+
|
| 93 |
function plugin_settings( $links ) {
|
| 94 |
$settings_link = '<a href="tools.php?page='.basename( __FILE__ ).'">'.__( 'Settings', 'redirection' ).'</a>';
|
| 95 |
array_unshift( $links, $settings_link );
|
| 96 |
return $links;
|
| 97 |
}
|
| 98 |
+
|
| 99 |
function version() {
|
| 100 |
$plugin_data = implode( '', file( __FILE__ ) );
|
| 101 |
+
|
| 102 |
if ( preg_match( '|Version:(.*)|i', $plugin_data, $version ) )
|
| 103 |
return trim( $version[1] );
|
| 104 |
return '';
|
| 107 |
function redirection_head() {
|
| 108 |
wp_enqueue_script( 'redirection', plugin_dir_url( __FILE__ ).'js/redirection.js', array( 'jquery-form', 'jquery-ui-sortable' ), $this->version() );
|
| 109 |
wp_enqueue_style( 'redirection', plugin_dir_url( __FILE__ ).'admin.css', $this->version() );
|
| 110 |
+
|
| 111 |
wp_localize_script( 'redirection', 'Redirectioni10n', array(
|
| 112 |
'please_wait' => __( 'Please wait...', 'redirection' ),
|
| 113 |
'type' => 1,
|
| 146 |
|
| 147 |
return $this->admin_redirects( isset( $_GET['id'] ) ? intval( $_GET['id'] ) : 0 );
|
| 148 |
}
|
| 149 |
+
|
| 150 |
function admin_screen_modules() {
|
| 151 |
if ( isset( $_POST['create'] ) && check_admin_referer( 'redirection-module_add' ) ) {
|
| 152 |
$data = stripslashes_deep( $_POST );
|
| 153 |
+
|
| 154 |
if ( ( $module = Red_Module::create( $data ) ) ) {
|
| 155 |
$moduleid = 0;
|
| 156 |
if ( isset( $_POST['module'] ) )
|
| 157 |
$moduleid = intval( $_POST['module'] );
|
| 158 |
+
|
| 159 |
$this->render_message( __( 'Your module was successfully created', 'redirection' ) );
|
| 160 |
Red_Module::flush( $moduleid );
|
| 161 |
}
|
| 162 |
else
|
| 163 |
$this->render_error( __( 'Your module was not created - did you provide a name?', 'redirection' ) );
|
| 164 |
}
|
| 165 |
+
|
| 166 |
$options = $this->get_options();
|
| 167 |
$this->render_admin( 'module_list', array( 'modules' => Red_Module::get_all(), 'module_types' => Red_Module::get_types(), 'token' => $options['token'] ) );
|
| 168 |
}
|
| 169 |
+
|
| 170 |
function get_options() {
|
| 171 |
$options = get_option( 'redirection_options' );
|
| 172 |
if ( $options === false )
|
| 173 |
$options = array();
|
| 174 |
+
|
| 175 |
$defaults = array (
|
| 176 |
'lookup' => 'http://urbangiraffe.com/map/?from=redirection&ip=',
|
| 177 |
'support' => false,
|
| 183 |
'monitor_post' => 0,
|
| 184 |
'auto_target' => '',
|
| 185 |
);
|
| 186 |
+
|
| 187 |
foreach ( $defaults AS $key => $value ) {
|
| 188 |
if ( !isset( $options[$key] ) )
|
| 189 |
$options[$key] = $value;
|
| 190 |
}
|
| 191 |
+
|
| 192 |
if ( $options['lookup'] == 'http://geomaplookup.cinnamonthoughts.org/?ip=' || $options['lookup'] == 'http://geomaplookup.net/?ip=' )
|
| 193 |
$options['lookup'] = 'http://urbangiraffe.com/map/?from=redirection&ip=';
|
| 194 |
+
|
| 195 |
return $options;
|
| 196 |
}
|
| 197 |
+
|
| 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 |
|
| 219 |
$options['monitor_new_posts'] = isset( $_POST['monitor_new_posts'] ) ? true : false;
|
| 220 |
$options['expire'] = intval( $_POST['expire'] );
|
| 221 |
$options['token'] = stripslashes( $_POST['token'] );
|
| 222 |
+
|
| 223 |
if ( trim( $options['token'] ) == '' )
|
| 224 |
$options['token'] = md5( uniqid() );
|
| 225 |
+
|
| 226 |
update_option( 'redirection_options', $options );
|
| 227 |
|
| 228 |
$this->render_message( __( 'Your options were updated', 'redirection' ) );
|
| 232 |
|
| 233 |
$db = new RE_Database;
|
| 234 |
$db->remove( __FILE__ );
|
| 235 |
+
|
| 236 |
$this->render_message( __( 'Redirection data has been deleted and the plugin disabled', 'redirection' ) );
|
| 237 |
return;
|
| 238 |
}
|
| 239 |
elseif ( isset( $_POST['import'] ) && check_admin_referer( 'redirection-import' ) ) {
|
| 240 |
include dirname( __FILE__ ).'/models/file_io.php';
|
| 241 |
+
|
| 242 |
$importer = new Red_FileIO;
|
| 243 |
+
|
| 244 |
$count = $importer->import( $_POST['group'], $_FILES['upload'] );
|
| 245 |
if ( $count > 0 )
|
| 246 |
$this->render_message( sprintf( _n( '%d redirection was successfully imported','%d redirections were successfully imported', $count, 'redirection' ), $count ) );
|
| 254 |
|
| 255 |
function admin_screen_log() {
|
| 256 |
include dirname( __FILE__ ).'/models/pager.php';
|
| 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, $_SERVER['REQUEST_URI'], 'created', 'DESC', 'log' ) );
|
| 262 |
RE_Log::delete_all( array( 'group_id' => intval( $_GET['group'] ) ), new RE_Pager( $_GET, $_SERVER['REQUEST_URI'], 'created', 'DESC', 'log' ) );
|
| 263 |
else
|
| 264 |
RE_Log::delete_all( array(), new RE_Pager( $_GET, $_SERVER['REQUEST_URI'], 'created', 'DESC', 'log' ) );
|
| 265 |
+
|
| 266 |
$this->render_message( __( 'Your logs have been deleted', 'redirection' ) );
|
| 267 |
}
|
| 268 |
+
|
| 269 |
$pager = new RE_Pager( $_GET, $_SERVER['REQUEST_URI'], 'created', 'DESC', 'log' );
|
| 270 |
+
|
| 271 |
if ( isset( $_GET['module'] ) )
|
| 272 |
$logs = RE_Log::get_by_module( $pager, intval( $_GET['module'] ) );
|
| 273 |
else if (isset($_GET['group']))
|
| 276 |
$logs = RE_Log::get_by_redirect( $pager, intval( $_GET['redirect'] ) );
|
| 277 |
else
|
| 278 |
$logs = RE_Log::get( $pager );
|
| 279 |
+
|
| 280 |
$options = $this->get_options();
|
| 281 |
$this->render_admin( 'log', array( 'logs' => $logs, 'pager' => $pager, 'lookup' => $options['lookup'] ) );
|
| 282 |
}
|
| 283 |
+
|
| 284 |
function admin_groups( $module ) {
|
| 285 |
include dirname( __FILE__ ).'/models/pager.php';
|
| 286 |
+
|
| 287 |
if ( isset( $_POST['add'] ) && check_admin_referer( 'redirection-add_group' ) ) {
|
| 288 |
if ( Red_Group::create( stripslashes_deep( $_POST ) ) ) {
|
| 289 |
$this->render_message( __( 'Your group was added successfully', 'redirection' ) );
|
| 292 |
else
|
| 293 |
$this->render_error( __( 'Please specify a group name', 'redirection' ) );
|
| 294 |
}
|
| 295 |
+
|
| 296 |
if ( $module == 0 )
|
| 297 |
$module = Red_Module::get_first_id();
|
| 298 |
|
| 301 |
|
| 302 |
$this->render_admin( 'group_list', array( 'groups' => $items, 'pager' => $pager, 'modules' => Red_Module::get_for_select(), 'module' => Red_Module::get( $module ) ) );
|
| 303 |
}
|
| 304 |
+
|
| 305 |
function admin_redirects( $group ) {
|
| 306 |
include dirname( __FILE__ ).'/models/pager.php';
|
| 307 |
+
|
| 308 |
if ( $group == 0 )
|
| 309 |
$group = Red_Group::get_first_id();
|
| 310 |
+
|
| 311 |
$pager = new RE_Pager( $_GET, $_SERVER['REQUEST_URI'], 'position', 'ASC' );
|
| 312 |
$items = Red_Item::get_by_group( $group, $pager );
|
| 313 |
|
| 317 |
function setMatched( $match ) {
|
| 318 |
$this->hasMatched = $match;
|
| 319 |
}
|
| 320 |
+
|
| 321 |
function hasMatched() {
|
| 322 |
return $this->hasMatched;
|
| 323 |
}
|
| 324 |
+
|
| 325 |
function locales() {
|
| 326 |
$locales = array();
|
| 327 |
if ( file_exists( dirname( __FILE__ ).'/readme.txt' ) ) {
|
| 328 |
$readme = file_get_contents( dirname( __FILE__ ).'/readme.txt' );
|
| 329 |
+
|
| 330 |
$start = strpos( $readme, __( 'Redirection is available in' ) );
|
| 331 |
$end = strpos( $readme, '==', $start );
|
| 332 |
if ( $start !== false && $end !== false ) {
|
| 334 |
$locales = $matches[1];
|
| 335 |
}
|
| 336 |
}
|
| 337 |
+
|
| 338 |
sort( $locales );
|
| 339 |
}
|
| 340 |
+
|
| 341 |
return $locales;
|
| 342 |
}
|
| 343 |
}
|
view/admin/add.php
CHANGED
|
@@ -18,12 +18,12 @@
|
|
| 18 |
<select name="match">
|
| 19 |
<?php echo $this->select (Red_Match::all ()); ?>
|
| 20 |
</select>
|
| 21 |
-
|
| 22 |
<strong><?php _e ('Action', 'redirection'); ?>:</strong>
|
| 23 |
<select name="red_action" onchange="return change_add_redirect (this)">
|
| 24 |
<?php echo $this->select (Red_Item::actions (), 'url'); ?>
|
| 25 |
</select>
|
| 26 |
-
|
| 27 |
<label><?php _e ('Regular expression', 'redirection'); ?>: <input id="regex" type="checkbox" name="regex"/></label>
|
| 28 |
</td>
|
| 29 |
</tr>
|
|
@@ -44,10 +44,10 @@
|
|
| 44 |
<?php if (isset($group)) : ?>
|
| 45 |
<input type="hidden" name="group" value="<?php echo esc_attr( $group ) ?>"/>
|
| 46 |
<?php endif; ?>
|
| 47 |
-
|
| 48 |
<input type="hidden" name="action" value="red_redirect_add"/>
|
| 49 |
<input type="hidden" name="_ajax_nonce" value="<?php echo wp_create_nonce( 'redirection-redirect_add' ); ?>"/>
|
| 50 |
-
|
| 51 |
<div id="error"></div>
|
| 52 |
</td>
|
| 53 |
</tr>
|
| 18 |
<select name="match">
|
| 19 |
<?php echo $this->select (Red_Match::all ()); ?>
|
| 20 |
</select>
|
| 21 |
+
|
| 22 |
<strong><?php _e ('Action', 'redirection'); ?>:</strong>
|
| 23 |
<select name="red_action" onchange="return change_add_redirect (this)">
|
| 24 |
<?php echo $this->select (Red_Item::actions (), 'url'); ?>
|
| 25 |
</select>
|
| 26 |
+
|
| 27 |
<label><?php _e ('Regular expression', 'redirection'); ?>: <input id="regex" type="checkbox" name="regex"/></label>
|
| 28 |
</td>
|
| 29 |
</tr>
|
| 44 |
<?php if (isset($group)) : ?>
|
| 45 |
<input type="hidden" name="group" value="<?php echo esc_attr( $group ) ?>"/>
|
| 46 |
<?php endif; ?>
|
| 47 |
+
|
| 48 |
<input type="hidden" name="action" value="red_redirect_add"/>
|
| 49 |
<input type="hidden" name="_ajax_nonce" value="<?php echo wp_create_nonce( 'redirection-redirect_add' ); ?>"/>
|
| 50 |
+
|
| 51 |
<div id="error"></div>
|
| 52 |
</td>
|
| 53 |
</tr>
|
view/admin/annoy.php
CHANGED
|
@@ -4,9 +4,9 @@
|
|
| 4 |
$sub = isset ($_GET['sub']) ? $_GET['sub'] : '';
|
| 5 |
$url = explode ('&', $_SERVER['REQUEST_URI']);
|
| 6 |
$url = $url[0];
|
| 7 |
-
|
| 8 |
if (!$options['support']) :?>
|
| 9 |
<div style="text-align: center; width: 80px; height: 50px; float: right; margin: 5px 15px 1px 0; padding: 4px 3px 0px 3px;-moz-border-radius: 5px; -webkit-border-radius: 5px;" id="support-annoy">
|
| 10 |
<a href="<?php echo $this->base(); ?>?page=redirection.php&sub=support"><img src="<?php echo $this->url () ?>/images/donate.gif" alt="support" /></a>
|
| 11 |
</div>
|
| 12 |
-
<?php endif; ?>
|
| 4 |
$sub = isset ($_GET['sub']) ? $_GET['sub'] : '';
|
| 5 |
$url = explode ('&', $_SERVER['REQUEST_URI']);
|
| 6 |
$url = $url[0];
|
| 7 |
+
|
| 8 |
if (!$options['support']) :?>
|
| 9 |
<div style="text-align: center; width: 80px; height: 50px; float: right; margin: 5px 15px 1px 0; padding: 4px 3px 0px 3px;-moz-border-radius: 5px; -webkit-border-radius: 5px;" id="support-annoy">
|
| 10 |
<a href="<?php echo $this->base(); ?>?page=redirection.php&sub=support"><img src="<?php echo $this->url () ?>/images/donate.gif" alt="support" /></a>
|
| 11 |
</div>
|
| 12 |
+
<?php endif; ?>
|
view/admin/group_edit.php
CHANGED
|
@@ -20,7 +20,7 @@
|
|
| 20 |
<input class="button-primary" type="submit" name="save" value="<?php _e ('Save', 'redirection'); ?>"/>
|
| 21 |
<input class="button-secondary" type="submit" name="cancel" value="<?php _e ('Cancel', 'redirection'); ?>"/>
|
| 22 |
<img class="loader" src="<?php echo $this->url(); ?>/images/progress.gif" alt="loading" width="50" height="16" style="display: none"/>
|
| 23 |
-
|
| 24 |
<input type="hidden" name="action" value="red_group_save"/>
|
| 25 |
<input type="hidden" name="id" value="<?php echo $group->id; ?>"/>
|
| 26 |
<input type="hidden" name="_ajax_nonce" value="<?php echo wp_create_nonce ('redirection-group_save_'.$group->id); ?>"/>
|
| 20 |
<input class="button-primary" type="submit" name="save" value="<?php _e ('Save', 'redirection'); ?>"/>
|
| 21 |
<input class="button-secondary" type="submit" name="cancel" value="<?php _e ('Cancel', 'redirection'); ?>"/>
|
| 22 |
<img class="loader" src="<?php echo $this->url(); ?>/images/progress.gif" alt="loading" width="50" height="16" style="display: none"/>
|
| 23 |
+
|
| 24 |
<input type="hidden" name="action" value="red_group_save"/>
|
| 25 |
<input type="hidden" name="id" value="<?php echo $group->id; ?>"/>
|
| 26 |
<input type="hidden" name="_ajax_nonce" value="<?php echo wp_create_nonce ('redirection-group_save_'.$group->id); ?>"/>
|
view/admin/group_item.php
CHANGED
|
@@ -16,9 +16,9 @@
|
|
| 16 |
<a href="<?php echo $this->base (); ?>?page=redirection.php&sub=redirects&id=<?php echo $group->id ?>">
|
| 17 |
<?php echo esc_html( $group->name ); ?>
|
| 18 |
</a>
|
| 19 |
-
|
| 20 |
<?php echo $group->items () ?>
|
| 21 |
-
|
| 22 |
<?php if ($group->status == 'disabled') : ?>
|
| 23 |
— <?php _e ('disabled', 'redirection'); ?>
|
| 24 |
<?php endif; ?>
|
| 16 |
<a href="<?php echo $this->base (); ?>?page=redirection.php&sub=redirects&id=<?php echo $group->id ?>">
|
| 17 |
<?php echo esc_html( $group->name ); ?>
|
| 18 |
</a>
|
| 19 |
+
|
| 20 |
<?php echo $group->items () ?>
|
| 21 |
+
|
| 22 |
<?php if ($group->status == 'disabled') : ?>
|
| 23 |
— <?php _e ('disabled', 'redirection'); ?>
|
| 24 |
<?php endif; ?>
|
view/admin/group_list.php
CHANGED
|
@@ -4,9 +4,9 @@
|
|
| 4 |
<?php $this->render_admin( 'annoy' ); ?>
|
| 5 |
|
| 6 |
<h2><?php _e( 'Groups for module', 'redirection' ); ?>: <a href="edit.php?page=redirection.php&sub=modules"><?php echo esc_html( $module->name ) ?></a></h2>
|
| 7 |
-
|
| 8 |
<?php $this->render_admin( 'submenu' ); ?>
|
| 9 |
-
|
| 10 |
<div id="pager" class="pager">
|
| 11 |
<form method="get" action="<?php echo $this->url( $pager->url ) ?>">
|
| 12 |
<input type="hidden" name="page" value="<?php echo esc_attr( $_GET['page'] ) ?>"/>
|
|
@@ -17,8 +17,8 @@
|
|
| 17 |
<select name="id">
|
| 18 |
<?php echo $this->select( $modules, isset($_GET['id'] ) ? intval( $_GET['id'] ) : '' )?>
|
| 19 |
</select>
|
| 20 |
-
|
| 21 |
-
<?php _e( 'Search', 'redirection' ); ?>:
|
| 22 |
<input type="text" class="search-input" name="search" value="<?php echo isset($_GET['search'] ) ? esc_attr( $_GET['search'] ) : '' ?>" style="font-size: 0.8em"/>
|
| 23 |
|
| 24 |
<?php $pager->per_page( 'redirection' ); ?>
|
|
@@ -28,7 +28,7 @@
|
|
| 28 |
</div>
|
| 29 |
|
| 30 |
<br/>
|
| 31 |
-
|
| 32 |
<?php if ( count( $groups ) > 0 ) : ?>
|
| 33 |
<ul id="redirections_header" class="redirections_header">
|
| 34 |
<li>
|
|
@@ -37,7 +37,7 @@
|
|
| 37 |
<div class="item"><?php echo $pager->sortable( 'name', __( 'Name', 'redirection' ) ) ?></div>
|
| 38 |
</li>
|
| 39 |
</ul>
|
| 40 |
-
|
| 41 |
<ul class="redirections" id="items">
|
| 42 |
<?php if ( count( $groups ) > 0 ) : ?>
|
| 43 |
<?php foreach ( $groups AS $group ) : ?>
|
|
@@ -45,7 +45,7 @@
|
|
| 45 |
<?php endforeach; ?>
|
| 46 |
<?php endif; ?>
|
| 47 |
</ul>
|
| 48 |
-
|
| 49 |
<?php if ( $pager->total_pages() > 0 ) : ?>
|
| 50 |
<div class="pagertools">
|
| 51 |
<?php foreach ( $pager->area_pages() AS $page ) : ?>
|
|
@@ -57,7 +57,7 @@
|
|
| 57 |
<?php if ( count( $groups ) > 0 ) : ?>
|
| 58 |
<div class="pager pagertools">
|
| 59 |
<a class="select-all" href="#select-all"><?php _e( 'Select All', 'redirection' ); ?></a> |
|
| 60 |
-
<a class="toggle-all" href="#toggle-all"><?php _e( 'Toggle', 'redirection' ); ?></a> |
|
| 61 |
<a class="reset-all" href="#reset-all"><?php _e( 'Reset Hits', 'redirection' ); ?></a> |
|
| 62 |
<a class="delete-all" href="#delete-all"><?php _e( 'Delete', 'redirection' ); ?></a> |
|
| 63 |
|
|
@@ -65,10 +65,10 @@
|
|
| 65 |
<select name="move" id="move">
|
| 66 |
<?php echo $this->select( $modules )?>
|
| 67 |
</select>
|
| 68 |
-
|
| 69 |
<input class="button-secondary move-all" type="submit" value="<?php _e( 'Go', 'redirection' ); ?>"/>
|
| 70 |
</div>
|
| 71 |
-
|
| 72 |
<div class="sort" id="sort">
|
| 73 |
<img src="<?php echo $this->url() ?>/images/sort.png" width="16" height="16" alt="Sort"/>
|
| 74 |
|
|
@@ -76,11 +76,11 @@
|
|
| 76 |
<a class="sort-save" id="toggle_sort_off" href="#" style="display: none"><?php _e( 'save order', 'redirection' ); ?></a>
|
| 77 |
</div>
|
| 78 |
<?php endif; ?>
|
| 79 |
-
|
| 80 |
<div id="loading" style="display: none">
|
| 81 |
<img src="<?php echo $this->url() ?>/images/loading.gif" alt="loading" width="32" height="32"/>
|
| 82 |
</div>
|
| 83 |
-
|
| 84 |
<?php global $is_IE; if ( !$is_IE ) : ?>
|
| 85 |
<div style="clear: both"></div>
|
| 86 |
<?php endif; ?>
|
|
@@ -92,7 +92,7 @@
|
|
| 92 |
|
| 93 |
<div class="wrap">
|
| 94 |
<h2><?php _e( 'Add Group', 'redirection' ); ?></h2>
|
| 95 |
-
|
| 96 |
<form action="<?php echo $this->url( $_SERVER['REQUEST_URI'] ) ?>" method="post" accept-charset="utf-8">
|
| 97 |
<?php wp_nonce_field( 'redirection-add_group' ); ?>
|
| 98 |
<table class="form-table">
|
|
@@ -118,7 +118,7 @@ jQuery(document ).ready( function() {
|
|
| 118 |
are_you_sure: '<?php echo esc_js( __( 'Are you sure?', 'redirection') ); ?>',
|
| 119 |
page: <?php echo( $pager->current_page - 1 ) * $pager->per_page ?>
|
| 120 |
} );
|
| 121 |
-
|
| 122 |
redirection.edit_items( 'group' );
|
| 123 |
} );
|
| 124 |
-
</script>
|
| 4 |
<?php $this->render_admin( 'annoy' ); ?>
|
| 5 |
|
| 6 |
<h2><?php _e( 'Groups for module', 'redirection' ); ?>: <a href="edit.php?page=redirection.php&sub=modules"><?php echo esc_html( $module->name ) ?></a></h2>
|
| 7 |
+
|
| 8 |
<?php $this->render_admin( 'submenu' ); ?>
|
| 9 |
+
|
| 10 |
<div id="pager" class="pager">
|
| 11 |
<form method="get" action="<?php echo $this->url( $pager->url ) ?>">
|
| 12 |
<input type="hidden" name="page" value="<?php echo esc_attr( $_GET['page'] ) ?>"/>
|
| 17 |
<select name="id">
|
| 18 |
<?php echo $this->select( $modules, isset($_GET['id'] ) ? intval( $_GET['id'] ) : '' )?>
|
| 19 |
</select>
|
| 20 |
+
|
| 21 |
+
<?php _e( 'Search', 'redirection' ); ?>:
|
| 22 |
<input type="text" class="search-input" name="search" value="<?php echo isset($_GET['search'] ) ? esc_attr( $_GET['search'] ) : '' ?>" style="font-size: 0.8em"/>
|
| 23 |
|
| 24 |
<?php $pager->per_page( 'redirection' ); ?>
|
| 28 |
</div>
|
| 29 |
|
| 30 |
<br/>
|
| 31 |
+
|
| 32 |
<?php if ( count( $groups ) > 0 ) : ?>
|
| 33 |
<ul id="redirections_header" class="redirections_header">
|
| 34 |
<li>
|
| 37 |
<div class="item"><?php echo $pager->sortable( 'name', __( 'Name', 'redirection' ) ) ?></div>
|
| 38 |
</li>
|
| 39 |
</ul>
|
| 40 |
+
|
| 41 |
<ul class="redirections" id="items">
|
| 42 |
<?php if ( count( $groups ) > 0 ) : ?>
|
| 43 |
<?php foreach ( $groups AS $group ) : ?>
|
| 45 |
<?php endforeach; ?>
|
| 46 |
<?php endif; ?>
|
| 47 |
</ul>
|
| 48 |
+
|
| 49 |
<?php if ( $pager->total_pages() > 0 ) : ?>
|
| 50 |
<div class="pagertools">
|
| 51 |
<?php foreach ( $pager->area_pages() AS $page ) : ?>
|
| 57 |
<?php if ( count( $groups ) > 0 ) : ?>
|
| 58 |
<div class="pager pagertools">
|
| 59 |
<a class="select-all" href="#select-all"><?php _e( 'Select All', 'redirection' ); ?></a> |
|
| 60 |
+
<a class="toggle-all" href="#toggle-all"><?php _e( 'Toggle', 'redirection' ); ?></a> |
|
| 61 |
<a class="reset-all" href="#reset-all"><?php _e( 'Reset Hits', 'redirection' ); ?></a> |
|
| 62 |
<a class="delete-all" href="#delete-all"><?php _e( 'Delete', 'redirection' ); ?></a> |
|
| 63 |
|
| 65 |
<select name="move" id="move">
|
| 66 |
<?php echo $this->select( $modules )?>
|
| 67 |
</select>
|
| 68 |
+
|
| 69 |
<input class="button-secondary move-all" type="submit" value="<?php _e( 'Go', 'redirection' ); ?>"/>
|
| 70 |
</div>
|
| 71 |
+
|
| 72 |
<div class="sort" id="sort">
|
| 73 |
<img src="<?php echo $this->url() ?>/images/sort.png" width="16" height="16" alt="Sort"/>
|
| 74 |
|
| 76 |
<a class="sort-save" id="toggle_sort_off" href="#" style="display: none"><?php _e( 'save order', 'redirection' ); ?></a>
|
| 77 |
</div>
|
| 78 |
<?php endif; ?>
|
| 79 |
+
|
| 80 |
<div id="loading" style="display: none">
|
| 81 |
<img src="<?php echo $this->url() ?>/images/loading.gif" alt="loading" width="32" height="32"/>
|
| 82 |
</div>
|
| 83 |
+
|
| 84 |
<?php global $is_IE; if ( !$is_IE ) : ?>
|
| 85 |
<div style="clear: both"></div>
|
| 86 |
<?php endif; ?>
|
| 92 |
|
| 93 |
<div class="wrap">
|
| 94 |
<h2><?php _e( 'Add Group', 'redirection' ); ?></h2>
|
| 95 |
+
|
| 96 |
<form action="<?php echo $this->url( $_SERVER['REQUEST_URI'] ) ?>" method="post" accept-charset="utf-8">
|
| 97 |
<?php wp_nonce_field( 'redirection-add_group' ); ?>
|
| 98 |
<table class="form-table">
|
| 118 |
are_you_sure: '<?php echo esc_js( __( 'Are you sure?', 'redirection') ); ?>',
|
| 119 |
page: <?php echo( $pager->current_page - 1 ) * $pager->per_page ?>
|
| 120 |
} );
|
| 121 |
+
|
| 122 |
redirection.edit_items( 'group' );
|
| 123 |
} );
|
| 124 |
+
</script>
|
view/admin/item.php
CHANGED
|
@@ -18,11 +18,11 @@
|
|
| 18 |
|
| 19 |
<div class="item<?php if ($redirect->regex) echo ' item-regex' ?>">
|
| 20 |
<input type="checkbox" class="check" name="checkall[]" value="<?php echo $redirect->id ?>"/>
|
| 21 |
-
|
| 22 |
<a href="<?php echo $this->url ($redirect->url) ?>" class="redirection-edit"><?php if ($redirect->title) echo esc_html( $redirect->title ); else echo RE_Log::show_url ($redirect->url); ?></a>
|
| 23 |
-
|
| 24 |
<?php if ($redirect->match_type != 'url') echo '('.esc_html( $redirect->match_name() ).')' ?>
|
| 25 |
-
|
| 26 |
<?php if ($redirect->status == 'disabled') : ?>
|
| 27 |
— <?php _e ('disabled', 'redirection'); ?>
|
| 28 |
<?php endif; ?>
|
| 18 |
|
| 19 |
<div class="item<?php if ($redirect->regex) echo ' item-regex' ?>">
|
| 20 |
<input type="checkbox" class="check" name="checkall[]" value="<?php echo $redirect->id ?>"/>
|
| 21 |
+
|
| 22 |
<a href="<?php echo $this->url ($redirect->url) ?>" class="redirection-edit"><?php if ($redirect->title) echo esc_html( $redirect->title ); else echo RE_Log::show_url ($redirect->url); ?></a>
|
| 23 |
+
|
| 24 |
<?php if ($redirect->match_type != 'url') echo '('.esc_html( $redirect->match_name() ).')' ?>
|
| 25 |
+
|
| 26 |
<?php if ($redirect->status == 'disabled') : ?>
|
| 27 |
— <?php _e ('disabled', 'redirection'); ?>
|
| 28 |
<?php endif; ?>
|
view/admin/item_edit.php
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?php if ( !defined( 'ABSPATH' ) ) die( 'No direct access allowed' ); ?>
|
| 2 |
<form method="post" accept-charset="utf-8" action="<?php echo admin_url( 'admin-ajax.php' ) ?>" style="padding: 3px">
|
| 3 |
<h3><?php printf( __( '%s by matching %s', 'redirection' ), esc_html( $redirect->actions( $redirect->action_type ) ), esc_html( $redirect->match->name() ) ) ?></h3>
|
| 4 |
-
|
| 5 |
<table class="edit">
|
| 6 |
<tr>
|
| 7 |
<th width="100"><?php _e ('Title', 'redirection'); ?>:</th>
|
| 1 |
<?php if ( !defined( 'ABSPATH' ) ) die( 'No direct access allowed' ); ?>
|
| 2 |
<form method="post" accept-charset="utf-8" action="<?php echo admin_url( 'admin-ajax.php' ) ?>" style="padding: 3px">
|
| 3 |
<h3><?php printf( __( '%s by matching %s', 'redirection' ), esc_html( $redirect->actions( $redirect->action_type ) ), esc_html( $redirect->match->name() ) ) ?></h3>
|
| 4 |
+
|
| 5 |
<table class="edit">
|
| 6 |
<tr>
|
| 7 |
<th width="100"><?php _e ('Title', 'redirection'); ?>:</th>
|
view/admin/item_list.php
CHANGED
|
@@ -5,14 +5,14 @@
|
|
| 5 |
|
| 6 |
<h2>
|
| 7 |
<?php _e ('Redirections for group', 'redirection'); ?>:
|
| 8 |
-
|
| 9 |
<?php if ( $group ) : ?>
|
| 10 |
<a href="<?php echo $this->base (); ?>?page=redirection.php&sub=groups&id=<?php echo $group->module_id ?>">
|
| 11 |
<?php echo esc_html( $group->name ); ?>
|
| 12 |
</a>
|
| 13 |
<?php endif; ?>
|
| 14 |
</h2>
|
| 15 |
-
|
| 16 |
<?php $this->render_admin( 'submenu' ); ?>
|
| 17 |
|
| 18 |
<div id="pager" class="pager">
|
|
@@ -25,8 +25,8 @@
|
|
| 25 |
<select name="id">
|
| 26 |
<?php echo $this->select ($groups, isset( $_GET['id'] ) ? intval( $_GET['id'] ) : '')?>
|
| 27 |
</select>
|
| 28 |
-
|
| 29 |
-
<?php _e ('Search', 'redirection'); ?>:
|
| 30 |
<input type="text" class="search-input" name="search" value="<?php echo isset($_GET['search']) ? esc_attr( $_GET['search'] ) : '' ?>" style="font-size: 0.8em"/>
|
| 31 |
|
| 32 |
<?php $pager->per_page ('redirection'); ?>
|
|
@@ -35,7 +35,7 @@
|
|
| 35 |
</form>
|
| 36 |
</div>
|
| 37 |
<br/>
|
| 38 |
-
|
| 39 |
<ul id="redirections_header" class="redirections_header">
|
| 40 |
<li>
|
| 41 |
<div class="date" style="width: 8em"><?php echo $pager->sortable ('last_access', __ ('Last Access', 'redirection')) ?></div>
|
|
@@ -44,7 +44,7 @@
|
|
| 44 |
<div class="item"><?php echo $pager->sortable ('url', __ ('URL', 'redirection')) ?> / <?php echo $pager->sortable ('position', __ ('Position', 'redirection')) ?></div>
|
| 45 |
</li>
|
| 46 |
</ul>
|
| 47 |
-
|
| 48 |
<ul class="redirections" id="items">
|
| 49 |
<?php if (is_array ($items) && count ($items) > 0) : ?>
|
| 50 |
<?php foreach ($items AS $redirect) : ?>
|
|
@@ -54,7 +54,7 @@
|
|
| 54 |
<?php endforeach; ?>
|
| 55 |
<?php endif; ?>
|
| 56 |
</ul>
|
| 57 |
-
|
| 58 |
<?php if ($pager->total_pages () > 0) : ?>
|
| 59 |
<div class="pagertools">
|
| 60 |
<?php foreach ($pager->area_pages () AS $page) : ?>
|
|
@@ -62,10 +62,10 @@
|
|
| 62 |
<?php endforeach; ?>
|
| 63 |
</div>
|
| 64 |
<?php endif;?>
|
| 65 |
-
|
| 66 |
<div class="pager pagertools">
|
| 67 |
<a class="select-all" href="#select-all"><?php _e ('Select All', 'redirection'); ?></a> |
|
| 68 |
-
<a class="toggle-all" href="#toggle-all"><?php _e ('Toggle', 'redirection'); ?></a> |
|
| 69 |
<a class="reset-all" href="#reset-all"><?php _e ('Reset Hits', 'redirection'); ?></a> |
|
| 70 |
<a class="delete-all" href="#delete-all"><?php _e ('Delete', 'redirection'); ?></a> |
|
| 71 |
|
|
@@ -73,10 +73,10 @@
|
|
| 73 |
<select name="move" id="move">
|
| 74 |
<?php echo $this->select( $groups )?>
|
| 75 |
</select>
|
| 76 |
-
|
| 77 |
<input class="button-secondary move-all" type="submit" value="<?php _e( 'Go', 'redirection'); ?>"/>
|
| 78 |
</div>
|
| 79 |
-
|
| 80 |
<div class="sort" id="sort">
|
| 81 |
<img src="<?php echo $this->url () ?>/images/sort.png" width="16" height="16" alt="Sort"/>
|
| 82 |
|
|
@@ -87,13 +87,13 @@
|
|
| 87 |
<?php if (!is_array ($items) || count ($items) == 0) : ?>
|
| 88 |
<p id="none"><?php _e ('You have no redirections.', 'redirection') ?></p>
|
| 89 |
<?php endif; ?>
|
| 90 |
-
|
| 91 |
<div id="loading" style="display: none">
|
| 92 |
<img src="<?php echo $this->url () ?>/images/loading.gif" alt="loading" width="32" height="32"/>
|
| 93 |
</div>
|
| 94 |
-
|
| 95 |
<img src="<?php echo $this->url () ?>/images/progress.gif" width="50" height="16" alt="Progress" style="display: none"/>
|
| 96 |
-
|
| 97 |
<?php global $is_IE; if (!$is_IE) : ?>
|
| 98 |
<div style="clear: both"></div>
|
| 99 |
<?php endif; ?>
|
|
@@ -110,10 +110,10 @@ jQuery(document).ready( function() {
|
|
| 110 |
ajaxurl: '<?php echo esc_js( admin_url( 'admin-ajax.php' ) ) ?>',
|
| 111 |
nonce: '<?php echo esc_js( wp_create_nonce( 'redirection-items' ) ); ?>',
|
| 112 |
none_select: '<?php echo esc_js( __( 'No items have been selected', 'redirection' ) ); ?>',
|
| 113 |
-
are_you_sure: '<?php echo esc_js( __( 'Are you sure?', 'redirection') ); ?>',
|
| 114 |
page: <?php echo ($pager->current_page - 1) * $pager->per_page ?>
|
| 115 |
});
|
| 116 |
-
|
| 117 |
redirection.edit_items( 'redirect' );
|
| 118 |
});
|
| 119 |
-
</script>
|
| 5 |
|
| 6 |
<h2>
|
| 7 |
<?php _e ('Redirections for group', 'redirection'); ?>:
|
| 8 |
+
|
| 9 |
<?php if ( $group ) : ?>
|
| 10 |
<a href="<?php echo $this->base (); ?>?page=redirection.php&sub=groups&id=<?php echo $group->module_id ?>">
|
| 11 |
<?php echo esc_html( $group->name ); ?>
|
| 12 |
</a>
|
| 13 |
<?php endif; ?>
|
| 14 |
</h2>
|
| 15 |
+
|
| 16 |
<?php $this->render_admin( 'submenu' ); ?>
|
| 17 |
|
| 18 |
<div id="pager" class="pager">
|
| 25 |
<select name="id">
|
| 26 |
<?php echo $this->select ($groups, isset( $_GET['id'] ) ? intval( $_GET['id'] ) : '')?>
|
| 27 |
</select>
|
| 28 |
+
|
| 29 |
+
<?php _e ('Search', 'redirection'); ?>:
|
| 30 |
<input type="text" class="search-input" name="search" value="<?php echo isset($_GET['search']) ? esc_attr( $_GET['search'] ) : '' ?>" style="font-size: 0.8em"/>
|
| 31 |
|
| 32 |
<?php $pager->per_page ('redirection'); ?>
|
| 35 |
</form>
|
| 36 |
</div>
|
| 37 |
<br/>
|
| 38 |
+
|
| 39 |
<ul id="redirections_header" class="redirections_header">
|
| 40 |
<li>
|
| 41 |
<div class="date" style="width: 8em"><?php echo $pager->sortable ('last_access', __ ('Last Access', 'redirection')) ?></div>
|
| 44 |
<div class="item"><?php echo $pager->sortable ('url', __ ('URL', 'redirection')) ?> / <?php echo $pager->sortable ('position', __ ('Position', 'redirection')) ?></div>
|
| 45 |
</li>
|
| 46 |
</ul>
|
| 47 |
+
|
| 48 |
<ul class="redirections" id="items">
|
| 49 |
<?php if (is_array ($items) && count ($items) > 0) : ?>
|
| 50 |
<?php foreach ($items AS $redirect) : ?>
|
| 54 |
<?php endforeach; ?>
|
| 55 |
<?php endif; ?>
|
| 56 |
</ul>
|
| 57 |
+
|
| 58 |
<?php if ($pager->total_pages () > 0) : ?>
|
| 59 |
<div class="pagertools">
|
| 60 |
<?php foreach ($pager->area_pages () AS $page) : ?>
|
| 62 |
<?php endforeach; ?>
|
| 63 |
</div>
|
| 64 |
<?php endif;?>
|
| 65 |
+
|
| 66 |
<div class="pager pagertools">
|
| 67 |
<a class="select-all" href="#select-all"><?php _e ('Select All', 'redirection'); ?></a> |
|
| 68 |
+
<a class="toggle-all" href="#toggle-all"><?php _e ('Toggle', 'redirection'); ?></a> |
|
| 69 |
<a class="reset-all" href="#reset-all"><?php _e ('Reset Hits', 'redirection'); ?></a> |
|
| 70 |
<a class="delete-all" href="#delete-all"><?php _e ('Delete', 'redirection'); ?></a> |
|
| 71 |
|
| 73 |
<select name="move" id="move">
|
| 74 |
<?php echo $this->select( $groups )?>
|
| 75 |
</select>
|
| 76 |
+
|
| 77 |
<input class="button-secondary move-all" type="submit" value="<?php _e( 'Go', 'redirection'); ?>"/>
|
| 78 |
</div>
|
| 79 |
+
|
| 80 |
<div class="sort" id="sort">
|
| 81 |
<img src="<?php echo $this->url () ?>/images/sort.png" width="16" height="16" alt="Sort"/>
|
| 82 |
|
| 87 |
<?php if (!is_array ($items) || count ($items) == 0) : ?>
|
| 88 |
<p id="none"><?php _e ('You have no redirections.', 'redirection') ?></p>
|
| 89 |
<?php endif; ?>
|
| 90 |
+
|
| 91 |
<div id="loading" style="display: none">
|
| 92 |
<img src="<?php echo $this->url () ?>/images/loading.gif" alt="loading" width="32" height="32"/>
|
| 93 |
</div>
|
| 94 |
+
|
| 95 |
<img src="<?php echo $this->url () ?>/images/progress.gif" width="50" height="16" alt="Progress" style="display: none"/>
|
| 96 |
+
|
| 97 |
<?php global $is_IE; if (!$is_IE) : ?>
|
| 98 |
<div style="clear: both"></div>
|
| 99 |
<?php endif; ?>
|
| 110 |
ajaxurl: '<?php echo esc_js( admin_url( 'admin-ajax.php' ) ) ?>',
|
| 111 |
nonce: '<?php echo esc_js( wp_create_nonce( 'redirection-items' ) ); ?>',
|
| 112 |
none_select: '<?php echo esc_js( __( 'No items have been selected', 'redirection' ) ); ?>',
|
| 113 |
+
are_you_sure: '<?php echo esc_js( __( 'Are you sure?', 'redirection') ); ?>',
|
| 114 |
page: <?php echo ($pager->current_page - 1) * $pager->per_page ?>
|
| 115 |
});
|
| 116 |
+
|
| 117 |
redirection.edit_items( 'redirect' );
|
| 118 |
});
|
| 119 |
+
</script>
|
view/admin/log.php
CHANGED
|
@@ -22,14 +22,14 @@
|
|
| 22 |
|
| 23 |
<input type="submit" class="button" value="<?php _e ('Search', 'redirection'); ?>"/>
|
| 24 |
</p>
|
| 25 |
-
|
| 26 |
<div id="pager" class="tablenav">
|
| 27 |
<div class="alignleft actions">
|
| 28 |
<select name="action2" id="action2_select">
|
| 29 |
<option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option>
|
| 30 |
<option value="delete"><?php _e('Delete'); ?></option>
|
| 31 |
</select>
|
| 32 |
-
|
| 33 |
<input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="actionator" class="button-secondary action" />
|
| 34 |
|
| 35 |
<?php $pager->per_page ('redirection'); ?>
|
|
@@ -50,7 +50,7 @@
|
|
| 50 |
|
| 51 |
<br class="clear" />
|
| 52 |
</div>
|
| 53 |
-
|
| 54 |
<div class="tablenav-pages">
|
| 55 |
<?php echo $pager->page_links (); ?>
|
| 56 |
</div>
|
|
@@ -71,7 +71,7 @@
|
|
| 71 |
<th style="width:16px"></th>
|
| 72 |
</tr>
|
| 73 |
</thead>
|
| 74 |
-
|
| 75 |
<tbody>
|
| 76 |
<?php foreach ($logs AS $pos => $log) : ?>
|
| 77 |
<tr id="item_<?php echo $log->id ?>" <?php if ($pos % 2 == 1) echo ' class="alt"' ?>>
|
|
@@ -84,7 +84,7 @@
|
|
| 84 |
<?php else : ?>
|
| 85 |
<p><?php _e ('There are no logs to display!', 'redirection'); ?></p>
|
| 86 |
<?php endif; ?>
|
| 87 |
-
|
| 88 |
<div style="clear: both"></div>
|
| 89 |
</div>
|
| 90 |
|
|
@@ -93,10 +93,10 @@
|
|
| 93 |
<div class="wrap">
|
| 94 |
<h2><?php _e ('Process Current Logs', 'redirection'); ?></h2>
|
| 95 |
<p><?php _e ('These actions will affect all currently available logs (i.e. your search phrase will restrict the log items).', 'redirection'); ?></p>
|
| 96 |
-
|
| 97 |
<form action="<?php echo $this->url ($_SERVER['REQUEST_URI']) ?>" method="post" accept-charset="utf-8">
|
| 98 |
<?php wp_nonce_field ('redirection-process_logs'); ?>
|
| 99 |
-
|
| 100 |
<input class="button-primary" type="submit" name="deleteall" value="<?php _e ('Delete Logs', 'redirection'); ?>"/>
|
| 101 |
</form>
|
| 102 |
</div>
|
| 22 |
|
| 23 |
<input type="submit" class="button" value="<?php _e ('Search', 'redirection'); ?>"/>
|
| 24 |
</p>
|
| 25 |
+
|
| 26 |
<div id="pager" class="tablenav">
|
| 27 |
<div class="alignleft actions">
|
| 28 |
<select name="action2" id="action2_select">
|
| 29 |
<option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option>
|
| 30 |
<option value="delete"><?php _e('Delete'); ?></option>
|
| 31 |
</select>
|
| 32 |
+
|
| 33 |
<input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="actionator" class="button-secondary action" />
|
| 34 |
|
| 35 |
<?php $pager->per_page ('redirection'); ?>
|
| 50 |
|
| 51 |
<br class="clear" />
|
| 52 |
</div>
|
| 53 |
+
|
| 54 |
<div class="tablenav-pages">
|
| 55 |
<?php echo $pager->page_links (); ?>
|
| 56 |
</div>
|
| 71 |
<th style="width:16px"></th>
|
| 72 |
</tr>
|
| 73 |
</thead>
|
| 74 |
+
|
| 75 |
<tbody>
|
| 76 |
<?php foreach ($logs AS $pos => $log) : ?>
|
| 77 |
<tr id="item_<?php echo $log->id ?>" <?php if ($pos % 2 == 1) echo ' class="alt"' ?>>
|
| 84 |
<?php else : ?>
|
| 85 |
<p><?php _e ('There are no logs to display!', 'redirection'); ?></p>
|
| 86 |
<?php endif; ?>
|
| 87 |
+
|
| 88 |
<div style="clear: both"></div>
|
| 89 |
</div>
|
| 90 |
|
| 93 |
<div class="wrap">
|
| 94 |
<h2><?php _e ('Process Current Logs', 'redirection'); ?></h2>
|
| 95 |
<p><?php _e ('These actions will affect all currently available logs (i.e. your search phrase will restrict the log items).', 'redirection'); ?></p>
|
| 96 |
+
|
| 97 |
<form action="<?php echo $this->url ($_SERVER['REQUEST_URI']) ?>" method="post" accept-charset="utf-8">
|
| 98 |
<?php wp_nonce_field ('redirection-process_logs'); ?>
|
| 99 |
+
|
| 100 |
<input class="button-primary" type="submit" name="deleteall" value="<?php _e ('Delete Logs', 'redirection'); ?>"/>
|
| 101 |
</form>
|
| 102 |
</div>
|
view/admin/log_item_details.php
CHANGED
|
@@ -18,7 +18,7 @@
|
|
| 18 |
<?php endif; ?>
|
| 19 |
<tr>
|
| 20 |
<th><?php _e ('User Agent', 'redirection'); ?>:</th>
|
| 21 |
-
<td><input style="width: 95%" type="text" readonly="readonly" name="other" value="<?php echo
|
| 22 |
</tr>
|
| 23 |
<tr>
|
| 24 |
<td></td>
|
| 18 |
<?php endif; ?>
|
| 19 |
<tr>
|
| 20 |
<th><?php _e ('User Agent', 'redirection'); ?>:</th>
|
| 21 |
+
<td><input style="width: 95%" type="text" readonly="readonly" name="other" value="<?php echo esc_attr ($log->agent) ?>"/></td>
|
| 22 |
</tr>
|
| 23 |
<tr>
|
| 24 |
<td></td>
|
view/admin/module_edit.php
CHANGED
|
@@ -20,14 +20,14 @@
|
|
| 20 |
</tr>
|
| 21 |
|
| 22 |
<?php $module->config(); ?>
|
| 23 |
-
|
| 24 |
<tr>
|
| 25 |
<th></th>
|
| 26 |
<td>
|
| 27 |
<input class="button-primary" type="submit" name="save" value="<?php _e( 'Save', 'redirection' ); ?>"/>
|
| 28 |
<input class="button-secondary" type="submit" name="cancel" value="<?php _e( 'Cancel', 'redirection' ); ?>"/>
|
| 29 |
<img class="loader" src="<?php echo $this->url(); ?>/images/progress.gif" alt="loading" width="50" height="16" style="display: none"/>
|
| 30 |
-
|
| 31 |
<input type="hidden" name="action" value="red_module_save"/>
|
| 32 |
<input type="hidden" name="id" value="<?php echo $module->id; ?>"/>
|
| 33 |
<input type="hidden" name="_ajax_nonce" value="<?php echo wp_create_nonce( 'redirection-module_save_'.$module->id ); ?>"/>
|
| 20 |
</tr>
|
| 21 |
|
| 22 |
<?php $module->config(); ?>
|
| 23 |
+
|
| 24 |
<tr>
|
| 25 |
<th></th>
|
| 26 |
<td>
|
| 27 |
<input class="button-primary" type="submit" name="save" value="<?php _e( 'Save', 'redirection' ); ?>"/>
|
| 28 |
<input class="button-secondary" type="submit" name="cancel" value="<?php _e( 'Cancel', 'redirection' ); ?>"/>
|
| 29 |
<img class="loader" src="<?php echo $this->url(); ?>/images/progress.gif" alt="loading" width="50" height="16" style="display: none"/>
|
| 30 |
+
|
| 31 |
<input type="hidden" name="action" value="red_module_save"/>
|
| 32 |
<input type="hidden" name="id" value="<?php echo $module->id; ?>"/>
|
| 33 |
<input type="hidden" name="_ajax_nonce" value="<?php echo wp_create_nonce( 'redirection-module_save_'.$module->id ); ?>"/>
|
view/admin/module_item.php
CHANGED
|
@@ -15,13 +15,13 @@
|
|
| 15 |
<h4>
|
| 16 |
<a href="<?php echo $this->base(); ?>?page=redirection.php&sub=groups&id=<?php echo $module->id ?>"><?php echo esc_html( $module->name ); ?></a>
|
| 17 |
</h4>
|
| 18 |
-
|
| 19 |
<?php $module->options(); ?>
|
| 20 |
-
|
| 21 |
<?php if ( $module->is_valid() ) : ?>
|
| 22 |
<div class="toolbar">
|
| 23 |
<strong><?php _e( 'View as', 'redirection' ); ?>:</strong>
|
| 24 |
-
|
| 25 |
<a href="<?php echo $this->base(); ?>?page=redirection.php&sub=csv&module=<?php echo $module->id ?>&token=<?php echo $token ?>"><?php _e( 'CSV', 'redirection' ); ?></a>
|
| 26 |
<a href="<?php echo $this->base(); ?>?page=redirection.php&sub=xml&module=<?php echo $module->id ?>&token=<?php echo $token ?>"><?php _e( 'XML', 'redirection' ); ?></a>
|
| 27 |
<a href="<?php echo $this->base(); ?>?page=redirection.php&sub=apache&module=<?php echo $module->id ?>&token=<?php echo $token ?>"><?php _e( 'Apache', 'redirection' ); ?></a>
|
|
@@ -44,7 +44,7 @@
|
|
| 44 |
|
|
| 45 |
<a class="reset" href="<?php echo admin_url( 'admin-ajax.php' ); ?>?action=red_module_reset&id=<?php echo $module->id; ?>&_ajax_nonce=<?php echo wp_create_nonce( 'redirection-module_'.$module->id ); ?>"><?php _e( 'reset', 'redirection' ); ?></a>
|
| 46 |
</div>
|
| 47 |
-
|
| 48 |
<img class="loader" src="<?php echo $this->url(); ?>/images/progress.gif" alt="loading" width="50" height="16" style="display: none"/>
|
| 49 |
</td>
|
| 50 |
|
| 15 |
<h4>
|
| 16 |
<a href="<?php echo $this->base(); ?>?page=redirection.php&sub=groups&id=<?php echo $module->id ?>"><?php echo esc_html( $module->name ); ?></a>
|
| 17 |
</h4>
|
| 18 |
+
|
| 19 |
<?php $module->options(); ?>
|
| 20 |
+
|
| 21 |
<?php if ( $module->is_valid() ) : ?>
|
| 22 |
<div class="toolbar">
|
| 23 |
<strong><?php _e( 'View as', 'redirection' ); ?>:</strong>
|
| 24 |
+
|
| 25 |
<a href="<?php echo $this->base(); ?>?page=redirection.php&sub=csv&module=<?php echo $module->id ?>&token=<?php echo $token ?>"><?php _e( 'CSV', 'redirection' ); ?></a>
|
| 26 |
<a href="<?php echo $this->base(); ?>?page=redirection.php&sub=xml&module=<?php echo $module->id ?>&token=<?php echo $token ?>"><?php _e( 'XML', 'redirection' ); ?></a>
|
| 27 |
<a href="<?php echo $this->base(); ?>?page=redirection.php&sub=apache&module=<?php echo $module->id ?>&token=<?php echo $token ?>"><?php _e( 'Apache', 'redirection' ); ?></a>
|
| 44 |
|
|
| 45 |
<a class="reset" href="<?php echo admin_url( 'admin-ajax.php' ); ?>?action=red_module_reset&id=<?php echo $module->id; ?>&_ajax_nonce=<?php echo wp_create_nonce( 'redirection-module_'.$module->id ); ?>"><?php _e( 'reset', 'redirection' ); ?></a>
|
| 46 |
</div>
|
| 47 |
+
|
| 48 |
<img class="loader" src="<?php echo $this->url(); ?>/images/progress.gif" alt="loading" width="50" height="16" style="display: none"/>
|
| 49 |
</td>
|
| 50 |
|
view/admin/module_list.php
CHANGED
|
@@ -17,7 +17,7 @@
|
|
| 17 |
<th><?php _e( 'Hits', 'redirection' ); ?></th>
|
| 18 |
<th><?php _e( 'Operations', 'redirection' ); ?></th>
|
| 19 |
</tr>
|
| 20 |
-
|
| 21 |
<?php foreach ( $modules AS $pos => $module ): ?>
|
| 22 |
<tr id="item_<?php echo $module->id ?>">
|
| 23 |
<?php $this->render_admin( 'module_item', array( 'module' => $module, 'token' => $token ) ); ?>
|
|
@@ -36,7 +36,7 @@
|
|
| 36 |
|
| 37 |
<form action="<?php echo $this->url( $_SERVER['REQUEST_URI'] ) ?>" method="post" accept-charset="utf-8">
|
| 38 |
<?php wp_nonce_field( 'redirection-module_add' ); ?>
|
| 39 |
-
|
| 40 |
<table class="edit" summary="modules">
|
| 41 |
<tr>
|
| 42 |
<th width="100"><?php _e( 'Name', 'redirection' ); ?>:</th>
|
| 17 |
<th><?php _e( 'Hits', 'redirection' ); ?></th>
|
| 18 |
<th><?php _e( 'Operations', 'redirection' ); ?></th>
|
| 19 |
</tr>
|
| 20 |
+
|
| 21 |
<?php foreach ( $modules AS $pos => $module ): ?>
|
| 22 |
<tr id="item_<?php echo $module->id ?>">
|
| 23 |
<?php $this->render_admin( 'module_item', array( 'module' => $module, 'token' => $token ) ); ?>
|
| 36 |
|
| 37 |
<form action="<?php echo $this->url( $_SERVER['REQUEST_URI'] ) ?>" method="post" accept-charset="utf-8">
|
| 38 |
<?php wp_nonce_field( 'redirection-module_add' ); ?>
|
| 39 |
+
|
| 40 |
<table class="edit" summary="modules">
|
| 41 |
<tr>
|
| 42 |
<th width="100"><?php _e( 'Name', 'redirection' ); ?>:</th>
|
view/admin/options.php
CHANGED
|
@@ -5,11 +5,11 @@
|
|
| 5 |
|
| 6 |
<h2><?php _e( 'Options', 'redirection' ) ?></h2>
|
| 7 |
<?php $this->render_admin( 'submenu' ); ?>
|
| 8 |
-
|
| 9 |
<form method="post" action="<?php echo $this->url( $_SERVER['REQUEST_URI'] ) ?>" style="clear: both">
|
| 10 |
-
|
| 11 |
<?php wp_nonce_field( 'redirection-update_options' ); ?>
|
| 12 |
-
|
| 13 |
<table cellpadding="3" width="100%" class="form-table">
|
| 14 |
<tr>
|
| 15 |
<th valign="top" align="right"><?php _e( 'Auto-generate URL', 'redirection' ) ?>:</th>
|
|
@@ -29,16 +29,16 @@
|
|
| 29 |
<tr>
|
| 30 |
<th align="right"><?php _e( 'Plugin Support', 'redirection' ); ?>:</th>
|
| 31 |
<td>
|
| 32 |
-
<input type="checkbox" name="support" <?php echo $this->checked( $options['support'] ) ?> id="support"/>
|
| 33 |
<label for="support"><span class="sub"><?php _e( 'I\'m a nice person and I have helped support the author of this plugin', 'redirection' ); ?></span></label>
|
| 34 |
</td>
|
| 35 |
</tr>
|
| 36 |
<tr>
|
| 37 |
<th align="right"><?php _e( 'Logging', 'redirection' ); ?>:</th>
|
| 38 |
<td>
|
| 39 |
-
<input type="checkbox" name="log_redirections" <?php echo $this->checked( $options['log_redirections'] ) ?> id="log_redirections"/>
|
| 40 |
<label for="log_redirections"><span class="sub"><?php _e( 'log redirected requests', 'redirection' ); ?></span></label><br />
|
| 41 |
-
<input type="checkbox" name="log_404s" <?php echo $this->checked( $options['log_404s'] ) ?> id="log_404s"/>
|
| 42 |
<label for="log_404s"><span class="sub"><?php _e( 'log 404 Not Found requests', 'redirection' ); ?></span></label><br />
|
| 43 |
<?php _e( 'Uncheck one or both of these to turn off logging and reduce database load if your redirected URLs are hit very frequently, and/or your site is very busy and pages are often not found.', 'redirection' ); ?>
|
| 44 |
</td>
|
|
@@ -58,7 +58,7 @@
|
|
| 58 |
</td>
|
| 59 |
</tr>
|
| 60 |
</table>
|
| 61 |
-
|
| 62 |
<h3><?php _e( 'URL Monitoring', 'redirection' ); ?></h3>
|
| 63 |
<p><?php _e( 'You can have Redirection detect changes in URLs and have an automatic redirection created in a specific group.', 'redirection' ); ?></p>
|
| 64 |
|
|
@@ -93,20 +93,20 @@
|
|
| 93 |
|
| 94 |
<div class="wrap">
|
| 95 |
<h2><?php _e( 'Import', 'redirection' ); ?></h2>
|
| 96 |
-
|
| 97 |
<p><?php _e( 'Here you can import redirections from an existing .htaccess file, a CSV file, or a Redirection XML.', 'redirection' ); ?></p>
|
| 98 |
-
|
| 99 |
<form action="<?php echo $this->url( $_SERVER['REQUEST_URI'] ) ?>" method="post" accept-charset="utf-8" enctype="multipart/form-data">
|
| 100 |
<?php wp_nonce_field( 'redirection-import' ); ?>
|
| 101 |
-
|
| 102 |
<input type="file" name="upload" value=""/>
|
| 103 |
-
|
| 104 |
<?php _e( 'Import into', 'redirection' ); ?>: <select name="group">
|
| 105 |
<?php echo $this->select( $groups );?>
|
| 106 |
</select>
|
| 107 |
<input class="button-primary" type="submit" name="import" value="<?php _e( 'Upload', 'redirection' ); ?>"/>
|
| 108 |
</form>
|
| 109 |
-
|
| 110 |
<p><?php _e( 'Note that the group is ignored when uploading an XML file.', 'redirection' ); ?></p>
|
| 111 |
</div>
|
| 112 |
|
|
@@ -116,7 +116,7 @@
|
|
| 116 |
|
| 117 |
<form action="<?php echo $this->url( $_SERVER['REQUEST_URI'] ) ?>" method="post" accept-charset="utf-8">
|
| 118 |
<?php wp_nonce_field( 'redirection-delete_plugin' ); ?>
|
| 119 |
-
|
| 120 |
<input class="button-primary" type="submit" name="delete" value="<?php _e( 'Delete', 'redirection' ) ?>"/>
|
| 121 |
</form>
|
| 122 |
-
</div>
|
| 5 |
|
| 6 |
<h2><?php _e( 'Options', 'redirection' ) ?></h2>
|
| 7 |
<?php $this->render_admin( 'submenu' ); ?>
|
| 8 |
+
|
| 9 |
<form method="post" action="<?php echo $this->url( $_SERVER['REQUEST_URI'] ) ?>" style="clear: both">
|
| 10 |
+
|
| 11 |
<?php wp_nonce_field( 'redirection-update_options' ); ?>
|
| 12 |
+
|
| 13 |
<table cellpadding="3" width="100%" class="form-table">
|
| 14 |
<tr>
|
| 15 |
<th valign="top" align="right"><?php _e( 'Auto-generate URL', 'redirection' ) ?>:</th>
|
| 29 |
<tr>
|
| 30 |
<th align="right"><?php _e( 'Plugin Support', 'redirection' ); ?>:</th>
|
| 31 |
<td>
|
| 32 |
+
<input type="checkbox" name="support" <?php echo $this->checked( $options['support'] ) ?> id="support"/>
|
| 33 |
<label for="support"><span class="sub"><?php _e( 'I\'m a nice person and I have helped support the author of this plugin', 'redirection' ); ?></span></label>
|
| 34 |
</td>
|
| 35 |
</tr>
|
| 36 |
<tr>
|
| 37 |
<th align="right"><?php _e( 'Logging', 'redirection' ); ?>:</th>
|
| 38 |
<td>
|
| 39 |
+
<input type="checkbox" name="log_redirections" <?php echo $this->checked( $options['log_redirections'] ) ?> id="log_redirections"/>
|
| 40 |
<label for="log_redirections"><span class="sub"><?php _e( 'log redirected requests', 'redirection' ); ?></span></label><br />
|
| 41 |
+
<input type="checkbox" name="log_404s" <?php echo $this->checked( $options['log_404s'] ) ?> id="log_404s"/>
|
| 42 |
<label for="log_404s"><span class="sub"><?php _e( 'log 404 Not Found requests', 'redirection' ); ?></span></label><br />
|
| 43 |
<?php _e( 'Uncheck one or both of these to turn off logging and reduce database load if your redirected URLs are hit very frequently, and/or your site is very busy and pages are often not found.', 'redirection' ); ?>
|
| 44 |
</td>
|
| 58 |
</td>
|
| 59 |
</tr>
|
| 60 |
</table>
|
| 61 |
+
|
| 62 |
<h3><?php _e( 'URL Monitoring', 'redirection' ); ?></h3>
|
| 63 |
<p><?php _e( 'You can have Redirection detect changes in URLs and have an automatic redirection created in a specific group.', 'redirection' ); ?></p>
|
| 64 |
|
| 93 |
|
| 94 |
<div class="wrap">
|
| 95 |
<h2><?php _e( 'Import', 'redirection' ); ?></h2>
|
| 96 |
+
|
| 97 |
<p><?php _e( 'Here you can import redirections from an existing .htaccess file, a CSV file, or a Redirection XML.', 'redirection' ); ?></p>
|
| 98 |
+
|
| 99 |
<form action="<?php echo $this->url( $_SERVER['REQUEST_URI'] ) ?>" method="post" accept-charset="utf-8" enctype="multipart/form-data">
|
| 100 |
<?php wp_nonce_field( 'redirection-import' ); ?>
|
| 101 |
+
|
| 102 |
<input type="file" name="upload" value=""/>
|
| 103 |
+
|
| 104 |
<?php _e( 'Import into', 'redirection' ); ?>: <select name="group">
|
| 105 |
<?php echo $this->select( $groups );?>
|
| 106 |
</select>
|
| 107 |
<input class="button-primary" type="submit" name="import" value="<?php _e( 'Upload', 'redirection' ); ?>"/>
|
| 108 |
</form>
|
| 109 |
+
|
| 110 |
<p><?php _e( 'Note that the group is ignored when uploading an XML file.', 'redirection' ); ?></p>
|
| 111 |
</div>
|
| 112 |
|
| 116 |
|
| 117 |
<form action="<?php echo $this->url( $_SERVER['REQUEST_URI'] ) ?>" method="post" accept-charset="utf-8">
|
| 118 |
<?php wp_nonce_field( 'redirection-delete_plugin' ); ?>
|
| 119 |
+
|
| 120 |
<input class="button-primary" type="submit" name="delete" value="<?php _e( 'Delete', 'redirection' ) ?>"/>
|
| 121 |
</form>
|
| 122 |
+
</div>
|
view/admin/support.php
CHANGED
|
@@ -1,17 +1,17 @@
|
|
| 1 |
<?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?>
|
| 2 |
<div class="wrap supporter">
|
| 3 |
<?php screen_icon(); ?>
|
| 4 |
-
|
| 5 |
<h2><?php _e ('Redirection Support', 'redirection'); ?></h2>
|
| 6 |
<?php $this->render_admin( 'submenu' ); ?>
|
| 7 |
-
|
| 8 |
<p style="clear: both">
|
| 9 |
<?php _e( 'Redirection is free to use - life is wonderful and lovely! However, it has required a great deal of time and effort to develop and if it has been useful you can help support this development by <strong>making a small donation</strong>.', 'redirection'); ?>
|
| 10 |
<?php _e( 'This will act as an incentive for me to carry on developing, providing countless hours of support, and including new features and suggestions. You get some useful software and I get to carry on making it. Everybody wins.', 'redirection'); ?>
|
| 11 |
</p>
|
| 12 |
-
|
| 13 |
<p><?php _e( 'If you are using this plugin in a commercial setup, or feel that it\'s been particularly useful, then you may want to consider a <strong>commercial donation</strong>.', 'redirection' )?>
|
| 14 |
-
|
| 15 |
<ul class="donations">
|
| 16 |
<li>
|
| 17 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
|
@@ -32,7 +32,7 @@
|
|
| 32 |
<input type="hidden" name="bn" value="PP-DonationsBF">
|
| 33 |
<input type="image" style="border: none" src="<?php echo $this->url () ?>/images/donate.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"/>
|
| 34 |
</form>
|
| 35 |
-
|
| 36 |
<p><strong>$14</strong><br/><?php _e( 'Individual<br/>Donation', 'redirection' ); ?></p>
|
| 37 |
</li>
|
| 38 |
<li>
|
|
@@ -56,11 +56,11 @@
|
|
| 56 |
<p><strong>$$$</strong><br/><?php _e( 'Commercial<br/>Donation', 'redirection' ); ?></p>
|
| 57 |
</li>
|
| 58 |
</ul>
|
| 59 |
-
|
| 60 |
<h3 style="clear: both"><?php _e( 'Translations', 'redirection' )?></h3>
|
| 61 |
-
|
| 62 |
<p><?php _e( 'If you\'re multi-lingual then you may want to consider donating a translation:', 'redirection' )?>
|
| 63 |
-
|
| 64 |
<ul class="translators">
|
| 65 |
<?php foreach( $this->locales() AS $language ) : ?>
|
| 66 |
<li><?php echo esc_html( $language ); ?></li>
|
|
@@ -69,4 +69,4 @@
|
|
| 69 |
|
| 70 |
<p style="clear: both"><br/><?php _e( 'All translators will have a link to their website placed on the plugin homepage at <a href="http://urbangiraffe.com/plugins/redirection/">UrbanGiraffe</a>, in addition to being an individual supporter.', 'redirection' )?></p>
|
| 71 |
<p><?php _e( 'Full details of producing a translation can be found in this <a href="http://urbangiraffe.com/articles/translating-wordpress-themes-and-plugins/">guide to translating WordPress plugins</a>.', 'redirection' )?>
|
| 72 |
-
</div>
|
| 1 |
<?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?>
|
| 2 |
<div class="wrap supporter">
|
| 3 |
<?php screen_icon(); ?>
|
| 4 |
+
|
| 5 |
<h2><?php _e ('Redirection Support', 'redirection'); ?></h2>
|
| 6 |
<?php $this->render_admin( 'submenu' ); ?>
|
| 7 |
+
|
| 8 |
<p style="clear: both">
|
| 9 |
<?php _e( 'Redirection is free to use - life is wonderful and lovely! However, it has required a great deal of time and effort to develop and if it has been useful you can help support this development by <strong>making a small donation</strong>.', 'redirection'); ?>
|
| 10 |
<?php _e( 'This will act as an incentive for me to carry on developing, providing countless hours of support, and including new features and suggestions. You get some useful software and I get to carry on making it. Everybody wins.', 'redirection'); ?>
|
| 11 |
</p>
|
| 12 |
+
|
| 13 |
<p><?php _e( 'If you are using this plugin in a commercial setup, or feel that it\'s been particularly useful, then you may want to consider a <strong>commercial donation</strong>.', 'redirection' )?>
|
| 14 |
+
|
| 15 |
<ul class="donations">
|
| 16 |
<li>
|
| 17 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
| 32 |
<input type="hidden" name="bn" value="PP-DonationsBF">
|
| 33 |
<input type="image" style="border: none" src="<?php echo $this->url () ?>/images/donate.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"/>
|
| 34 |
</form>
|
| 35 |
+
|
| 36 |
<p><strong>$14</strong><br/><?php _e( 'Individual<br/>Donation', 'redirection' ); ?></p>
|
| 37 |
</li>
|
| 38 |
<li>
|
| 56 |
<p><strong>$$$</strong><br/><?php _e( 'Commercial<br/>Donation', 'redirection' ); ?></p>
|
| 57 |
</li>
|
| 58 |
</ul>
|
| 59 |
+
|
| 60 |
<h3 style="clear: both"><?php _e( 'Translations', 'redirection' )?></h3>
|
| 61 |
+
|
| 62 |
<p><?php _e( 'If you\'re multi-lingual then you may want to consider donating a translation:', 'redirection' )?>
|
| 63 |
+
|
| 64 |
<ul class="translators">
|
| 65 |
<?php foreach( $this->locales() AS $language ) : ?>
|
| 66 |
<li><?php echo esc_html( $language ); ?></li>
|
| 69 |
|
| 70 |
<p style="clear: both"><br/><?php _e( 'All translators will have a link to their website placed on the plugin homepage at <a href="http://urbangiraffe.com/plugins/redirection/">UrbanGiraffe</a>, in addition to being an individual supporter.', 'redirection' )?></p>
|
| 71 |
<p><?php _e( 'Full details of producing a translation can be found in this <a href="http://urbangiraffe.com/articles/translating-wordpress-themes-and-plugins/">guide to translating WordPress plugins</a>.', 'redirection' )?>
|
| 72 |
+
</div>
|
