Shortlinks by Pretty Links – Best WordPress Link Tracking Plugin - Version 1.4.56

Version Description

  • Updated to be fully compatible with WordPress 3.1 and WordPress MultiSite for all users
  • Fixed link rotation issue (weights not sticking) for Pro Users
  • Fixed auto link creation issue with the group not being set properly for Pro Users
  • Fixed the slug available routine for all users
  • Fixed the delete hits issue with simple click counting for all users
  • Fixed some keyword replacement deletion issues for pro users
Download this release

Release Info

Developer supercleanse
Plugin Icon 128x128 Shortlinks by Pretty Links – Best WordPress Link Tracking Plugin
Version 1.4.56
Comparing to
See all releases

Code changes from version 1.4.55 to 1.4.56

classes/controllers/PrliAppController.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class PrliAppController
3
+ {
4
+ function PrliAppController()
5
+ {
6
+ add_action('init', array(&$this,'parse_standalone_request'));
7
+ add_action('admin_notices', array(&$this, 'upgrade_database_headline'));
8
+ }
9
+
10
+ public function upgrade_database_headline()
11
+ {
12
+ global $prli_update, $prli_db_version, $prlipro_db_version, $prli_blogurl;
13
+
14
+ $old_prli_db_version = get_option('prli_db_version');
15
+ $show_db_upgrade_message = ( !$old_prli_db_version or ( intval($old_prli_db_version) < $prli_db_version ) );
16
+
17
+ if( !$show_db_upgrade_message and
18
+ $prli_update->pro_is_installed_and_authorized())
19
+ {
20
+ $old_prlipro_db_version = get_option('prlipro_db_version');
21
+ $show_db_upgrade_message = ( !$old_prlipro_db_version or ( intval($old_prlipro_db_version) < $prlipro_db_version ) );
22
+ }
23
+
24
+ if( $show_db_upgrade_message )
25
+ {
26
+ $db_upgrade_url = wp_nonce_url("{$prli_blogurl}/index.php?plugin=pretty-link&controller=admin&action=db_upgrade", "prli-db-upgrade");
27
+ ?>
28
+ <div class="error" style="padding-top: 5px; padding-bottom: 5px;"><?php printf(__('Database Upgrade is required for Pretty Link to work properly<br/>%1$sAutomatically Upgrade your Database%2$s', 'pretty-link'), "<a href=\"{$db_upgrade_url}\">",'</a>'); ?></div>
29
+ <?php
30
+ }
31
+ }
32
+
33
+ public function parse_standalone_request()
34
+ {
35
+ if( !empty($_REQUEST['plugin']) and $_REQUEST['plugin'] == 'pretty-link' and
36
+ !empty($_REQUEST['controller']) and !empty($_REQUEST['action']) )
37
+ {
38
+ $this->standalone_route($_REQUEST['controller'], $_REQUEST['action']);
39
+ exit;
40
+ }
41
+ }
42
+
43
+ public function standalone_route($controller, $action)
44
+ {
45
+ if($controller=='admin')
46
+ {
47
+ if($action=='db_upgrade')
48
+ $this->db_upgrade();
49
+ }
50
+ }
51
+
52
+ public function db_upgrade()
53
+ {
54
+ global $prli_blogurl, $prli_update, $prli_db_version, $prlipro_db_version;
55
+
56
+ if(!function_exists('wp_redirect'))
57
+ require_once(ABSPATH . WPINC . '/pluggable.php');
58
+
59
+ if( wp_verify_nonce( $_REQUEST['_wpnonce'], "prli-db-upgrade" ) and current_user_can( 'update_core' ) ) {
60
+ $old_prli_db_version = get_option('prli_db_version');
61
+ $upgrade_db = ( !$old_prli_db_version or ( intval($old_prli_db_version) < $prli_db_version ) );
62
+
63
+ if( !$upgrade_db and $prli_update->pro_is_installed_and_authorized()) {
64
+ $old_prlipro_db_version = get_option('prlipro_db_version');
65
+ $upgrade_db = ( !$old_prlipro_db_version or ( intval($old_prlipro_db_version) < $prlipro_db_version ) );
66
+ }
67
+
68
+ if( $upgrade_db ) {
69
+ prli_install();
70
+ wp_redirect("{$prli_blogurl}/wp-admin/admin.php?page=pretty-link/prli-links.php&message=" . urlencode(__('Your Database Has Been Successfully Upgraded.')));
71
+ }
72
+ else
73
+ wp_redirect($prli_blogurl);
74
+ }
75
+ else
76
+ wp_redirect($prli_blogurl);
77
+ }
78
+ }
79
+ ?>
classes/models/PrliClick.php CHANGED
@@ -93,8 +93,12 @@ class PrliClick
93
  // Delete all of the clicks from the database.
94
  function clearAllClicks()
95
  {
96
- global $wpdb;
97
- $query = "TRUNCATE TABLE " . $this->table_name;
 
 
 
 
98
  return $wpdb->query($query);
99
  }
100
 
93
  // Delete all of the clicks from the database.
94
  function clearAllClicks()
95
  {
96
+ global $wpdb, $prli_link_meta;
97
+
98
+ $query = $wpdb->prepare("DELETE FROM {$prli_link_meta->table_name} WHERE meta_key=%s OR meta_key=%s", 'static-clicks', 'static-uniques');
99
+ $wpdb->query($query);
100
+
101
+ $query = "TRUNCATE TABLE {$this->table_name}";
102
  return $wpdb->query($query);
103
  }
104
 
classes/models/PrliLink.php CHANGED
@@ -103,11 +103,14 @@ class PrliLink
103
  function destroy( $id )
104
  {
105
  require_once(PRLI_MODELS_PATH.'/models.inc.php');
106
- global $wpdb, $prli_click;
107
 
108
- $reset = 'DELETE FROM ' . $prli_click->table_name . ' WHERE link_id=' . $id;
109
- $destroy = 'DELETE FROM ' . $this->table_name . ' WHERE id=' . $id;
 
 
110
 
 
111
  $wpdb->query($reset);
112
  return $wpdb->query($destroy);
113
  }
@@ -115,9 +118,12 @@ class PrliLink
115
  function reset( $id )
116
  {
117
  require_once(PRLI_MODELS_PATH.'/models.inc.php');
118
- global $wpdb, $prli_click;
119
 
120
- $reset = 'DELETE FROM ' . $prli_click->table_name . ' WHERE link_id=' . $id;
 
 
 
121
  return $wpdb->query($reset);
122
  }
123
 
@@ -413,19 +419,18 @@ class PrliLink
413
  // Set defaults and grab get or post of each possible param
414
  function get_params_array()
415
  {
416
- $values = array(
417
- 'action' => (isset($_GET['action'])?$_GET['action']:(isset($_POST['action'])?$_POST['action']:'list')),
418
- 'regenerate' => (isset($_GET['regenerate'])?$_GET['regenerate']:(isset($_POST['regenerate'])?$_POST['regenerate']:'false')),
419
- 'id' => (isset($_GET['id'])?$_GET['id']:(isset($_POST['id'])?$_POST['id']:'')),
420
- 'group_name' => (isset($_GET['group_name'])?$_GET['group_name']:(isset($_POST['group_name'])?$_POST['group_name']:'')),
421
- 'paged' => (isset($_GET['paged'])?$_GET['paged']:(isset($_POST['paged'])?$_POST['paged']:1)),
422
- 'group' => (isset($_GET['group'])?$_GET['group']:(isset($_POST['group'])?$_POST['group']:'')),
423
- 'search' => (isset($_GET['search'])?$_GET['search']:(isset($_POST['search'])?$_POST['search']:'')),
424
- 'sort' => (isset($_GET['sort'])?$_GET['sort']:(isset($_POST['sort'])?$_POST['sort']:'')),
425
- 'sdir' => (isset($_GET['sdir'])?$_GET['sdir']:(isset($_POST['sdir'])?$_POST['sdir']:''))
 
426
  );
427
-
428
- return $values;
429
  }
430
 
431
  function validate( $values )
103
  function destroy( $id )
104
  {
105
  require_once(PRLI_MODELS_PATH.'/models.inc.php');
106
+ global $wpdb, $prli_click, $prli_link_meta;
107
 
108
+ do_action('prli_delete_link', $id);
109
+ $metas = $wpdb->prepare("DELETE FROM {$prli_link_meta->table_name} WHERE link_id=%d",$id);
110
+ $reset = $wpdb->prepare("DELETE FROM {$prli_click->table_name} WHERE link_id=%d",$id);
111
+ $destroy = $wpdb->prepare("DELETE FROM {$this->table_name} WHERE id=%d",$id);
112
 
113
+ $wpdb->query($metas);
114
  $wpdb->query($reset);
115
  return $wpdb->query($destroy);
116
  }
118
  function reset( $id )
119
  {
120
  require_once(PRLI_MODELS_PATH.'/models.inc.php');
121
+ global $wpdb, $prli_click, $prli_link_meta;
122
 
123
+ $prli_link_meta->delete_link_meta($id, 'static-clicks');
124
+ $prli_link_meta->delete_link_meta($id, 'static-uniques');
125
+
126
+ $reset = $wpdb->prepare("DELETE FROM {$prli_click->table_name} WHERE link_id=%d", $id);
127
  return $wpdb->query($reset);
128
  }
129
 
419
  // Set defaults and grab get or post of each possible param
420
  function get_params_array()
421
  {
422
+ return array(
423
+ 'action' => (isset($_REQUEST['action'])?$_REQUEST['action']:'list'),
424
+ 'regenerate' => (isset($_REQUEST['regenerate'])?$_REQUEST['regenerate']:'false'),
425
+ 'id' => (isset($_REQUEST['id'])?$_REQUEST['id']:''),
426
+ 'group_name' => (isset($_REQUEST['group_name'])?$_REQUEST['group_name']:''),
427
+ 'paged' => (isset($_REQUEST['paged'])?$_REQUEST['paged']:1),
428
+ 'group' => (isset($_REQUEST['group'])?$_REQUEST['group']:''),
429
+ 'search' => (isset($_REQUEST['search'])?$_REQUEST['search']:''),
430
+ 'sort' => (isset($_REQUEST['sort'])?$_REQUEST['sort']:''),
431
+ 'sdir' => (isset($_REQUEST['sdir'])?$_REQUEST['sdir']:''),
432
+ 'message' => (isset($_REQUEST['message'])?$_REQUEST['message']:'')
433
  );
 
 
434
  }
435
 
436
  function validate( $values )
classes/models/PrliUtils.php CHANGED
@@ -98,13 +98,11 @@ class PrliUtils
98
  $slug = $slug_components[0];
99
 
100
  // Check slug uniqueness against posts, pages and categories
101
- $posts_table = $wpdb->prefix . "posts";
102
- $terms_table = $wpdb->prefix . "terms";
103
 
104
- $post_slug = $wpdb->get_var("SELECT post_name FROM $posts_table WHERE post_name='$slug'");
105
- $term_slug = $wpdb->get_col("SELECT slug FROM $terms_table WHERE slug='$slug'");
106
-
107
- if( $post_slug == $slug or $term_slug == $slug )
108
  return false;
109
 
110
  // Check slug against files on the root wordpress install
@@ -118,10 +116,10 @@ class PrliUtils
118
 
119
  // Check slug against other slugs in the prli links database.
120
  // We'll use the full_slug here because its easier to guarantee uniqueness.
121
- if($id != null and $id != '')
122
- $query = "SELECT slug FROM " . $prli_link->table_name . " WHERE slug='" . $full_slug . "' AND id <> " . $id;
123
  else
124
- $query = "SELECT slug FROM " . $prli_link->table_name . " WHERE slug='" . $full_slug . "'";
125
 
126
  $link_slug = $wpdb->get_var($query);
127
 
@@ -703,12 +701,11 @@ class PrliUtils
703
 
704
  function install_pro_db()
705
  {
706
- global $wpdb;
707
 
708
- $pro_db_version = 1; // this is the version of the database we're moving to
709
  $old_pro_db_version = get_option('prlipro_db_version');
710
 
711
- if($pro_db_version != $old_pro_db_version)
712
  {
713
  $upgrade_path = ABSPATH . 'wp-admin/includes/upgrade.php';
714
  require_once($upgrade_path);
@@ -818,7 +815,7 @@ class PrliUtils
818
 
819
  /***** SAVE DB VERSION *****/
820
  delete_option('prlipro_db_version');
821
- add_option('prlipro_db_version',$pro_db_version);
822
  }
823
 
824
  // be careful with this one -- I use it to forceably reinstall pretty link pro
98
  $slug = $slug_components[0];
99
 
100
  // Check slug uniqueness against posts, pages and categories
101
+ $postname = $wpdb->get_var($wpdb->prepare("SELECT post_name FROM {$wpdb->posts} WHERE post_name=%s LIMIT 1",$slug));
102
+ $taxonomy = $wpdb->get_var($wpdb->prepare("SELECT taxonomy FROM {$wpdb->term_taxonomy} WHERE taxonomy=%s LIMIT 1",$slug));
103
 
104
+ // If anything was returned for these two calls then the slug has been taken
105
+ if( $postname or $taxonomy )
 
 
106
  return false;
107
 
108
  // Check slug against files on the root wordpress install
116
 
117
  // Check slug against other slugs in the prli links database.
118
  // We'll use the full_slug here because its easier to guarantee uniqueness.
119
+ if(!is_null($id) and !empty($id) and is_numeric($id))
120
+ $query = $wpdb->prepare("SELECT slug FROM {$prli_link->table_name} WHERE slug=%s AND id <> %d", $full_slug, $id);
121
  else
122
+ $query = $wpdb->prepare("SELECT slug FROM {$prli_link->table_name} WHERE slug=%s", $full_slug);
123
 
124
  $link_slug = $wpdb->get_var($query);
125
 
701
 
702
  function install_pro_db()
703
  {
704
+ global $wpdb, $prlipro_db_version;
705
 
 
706
  $old_pro_db_version = get_option('prlipro_db_version');
707
 
708
+ if($prlipro_db_version != $old_pro_db_version)
709
  {
710
  $upgrade_path = ABSPATH . 'wp-admin/includes/upgrade.php';
711
  require_once($upgrade_path);
815
 
816
  /***** SAVE DB VERSION *****/
817
  delete_option('prlipro_db_version');
818
+ add_option('prlipro_db_version',$prlipro_db_version);
819
  }
820
 
821
  // be careful with this one -- I use it to forceably reinstall pretty link pro
classes/models/models.inc.php CHANGED
@@ -23,6 +23,19 @@ $prli_utils = new PrliUtils();
23
  $prli_url_utils = new PrliUrlUtils();
24
  $prli_update = new PrliUpdate();
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  function prli_get_main_message( $message = "Get started by <a href=\"?page=pretty-link/prli-links.php&action=new\">adding a URL</a> that you want to turn into a pretty link.<br/>Come back to see how many times it was clicked.", $expiration=3600) // Get new messages every 1 hour
27
  {
28
  global $prli_update, $wp_version;
23
  $prli_url_utils = new PrliUrlUtils();
24
  $prli_update = new PrliUpdate();
25
 
26
+ global $prli_db_version;
27
+ global $prlipro_db_version;
28
+
29
+ $prli_db_version = 11; // this is the version of the database we're moving to
30
+ $prlipro_db_version = 1; // this is the version of the database we're moving to
31
+
32
+ // Load Controller(s)
33
+ require_once( PRLI_CONTROLLERS_PATH.'/PrliAppController.php');
34
+
35
+ global $prli_app_controller;
36
+
37
+ $prli_app_controller = new PrliAppController();
38
+
39
  function prli_get_main_message( $message = "Get started by <a href=\"?page=pretty-link/prli-links.php&action=new\">adding a URL</a> that you want to turn into a pretty link.<br/>Come back to see how many times it was clicked.", $expiration=3600) // Get new messages every 1 hour
40
  {
41
  global $prli_update, $wp_version;
classes/views/prli-links/list.php CHANGED
@@ -135,9 +135,9 @@
135
  <div class="link_actions">
136
  <a href="?page=<?php echo PRLI_PLUGIN_NAME; ?>/prli-links.php&action=edit&id=<?php echo $link->id; ?>" title="Edit <?php echo $link->slug; ?>">Edit</a>&nbsp;|
137
  <a href="?page=<?php echo PRLI_PLUGIN_NAME; ?>/prli-links.php&action=destroy&id=<?php echo $link->id; ?>" onclick="return confirm('Are you sure you want to delete your <?php echo $link->name; ?> Pretty Link? This will delete the Pretty Link and all of the statistical data about it in your database.');" title="Delete <?php echo $link->slug; ?>">Delete</a>
 
138
  <?php if( $link->track_me and $prli_options->extended_tracking!='count' ) { ?>
139
- |&nbsp;<a href="?page=<?php echo PRLI_PLUGIN_NAME; ?>/prli-links.php&action=reset&id=<?php echo $link->id; ?>" onclick="return confirm('Are you sure you want to reset your <?php echo $link->name; ?> Pretty Link? This will delete all of the statistical data about this Pretty Link in your database.');" title="Reset <?php echo $link->name; ?>">Reset</a>&nbsp;|
140
- <a href="?page=<?php echo PRLI_PLUGIN_NAME; ?>/prli-clicks.php&l=<?php echo $link->id; ?>" title="View clicks for <?php echo $link->slug; ?>">Hits</a>
141
  <?php do_action('prli-link-action',$link->id); ?>
142
  <?php } ?>
143
  <?php if( $link->redirect_type != 'pixel' )
135
  <div class="link_actions">
136
  <a href="?page=<?php echo PRLI_PLUGIN_NAME; ?>/prli-links.php&action=edit&id=<?php echo $link->id; ?>" title="Edit <?php echo $link->slug; ?>">Edit</a>&nbsp;|
137
  <a href="?page=<?php echo PRLI_PLUGIN_NAME; ?>/prli-links.php&action=destroy&id=<?php echo $link->id; ?>" onclick="return confirm('Are you sure you want to delete your <?php echo $link->name; ?> Pretty Link? This will delete the Pretty Link and all of the statistical data about it in your database.');" title="Delete <?php echo $link->slug; ?>">Delete</a>
138
+ |&nbsp;<a href="?page=<?php echo PRLI_PLUGIN_NAME; ?>/prli-links.php&action=reset&id=<?php echo $link->id; ?>" onclick="return confirm('Are you sure you want to reset your <?php echo $link->name; ?> Pretty Link? This will delete all of the statistical data about this Pretty Link in your database.');" title="Reset <?php echo $link->name; ?>">Reset</a>
139
  <?php if( $link->track_me and $prli_options->extended_tracking!='count' ) { ?>
140
+ |&nbsp;<a href="?page=<?php echo PRLI_PLUGIN_NAME; ?>/prli-clicks.php&l=<?php echo $link->id; ?>" title="View clicks for <?php echo $link->slug; ?>">Hits</a>
 
141
  <?php do_action('prli-link-action',$link->id); ?>
142
  <?php } ?>
143
  <?php if( $link->redirect_type != 'pixel' )
classes/views/prli-options/form.php CHANGED
@@ -95,11 +95,13 @@ if(!$permalink_structure or empty($permalink_structure))
95
 
96
  <h3>Trim Hit Database</h3>
97
 
 
98
  <p><a href="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI'] ); ?>&action=clear_30day_clicks" onclick="return confirm('***WARNING*** If you click OK you will delete ALL of the Hit data that is older than 30 days. Your data will be gone forever -- no way to retreive it. Do not click OK unless you are absolutely sure you want to delete this data because there is no going back!');">Delete Hits older than 30 days</a>
99
  <br/><span class="description">This will clear all hits in your database that are older than 30 days.</span></p>
100
 
101
  <p><a href="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI'] ); ?>&action=clear_90day_clicks" onclick="return confirm('***WARNING*** If you click OK you will delete ALL of the Hit data that is older than 90 days. Your data will be gone forever -- no way to retreive it. Do not click OK unless you are absolutely sure you want to delete this data because there is no going back!');">Delete Hits older than 90 days</a>
102
  <br/><span class="description">This will clear all hits in your database that are older than 90 days.</span></p>
 
103
 
104
  <p><a href="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI'] ); ?>&action=clear_all_clicks" onclick="return confirm('***WARNING*** If you click OK you will delete ALL of the Hit data in your Database. Your data will be gone forever -- no way to retreive it. Do not click OK unless you are absolutely sure you want to delete all your data because there is no going back!');">Delete All Hits</a>
105
  <br/><span class="description">Seriously, only click this link if you want to delete all the Hit data in your database.</span></p>
95
 
96
  <h3>Trim Hit Database</h3>
97
 
98
+ <?php if($prli_options->extended_tracking != 'count') { ?>
99
  <p><a href="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI'] ); ?>&action=clear_30day_clicks" onclick="return confirm('***WARNING*** If you click OK you will delete ALL of the Hit data that is older than 30 days. Your data will be gone forever -- no way to retreive it. Do not click OK unless you are absolutely sure you want to delete this data because there is no going back!');">Delete Hits older than 30 days</a>
100
  <br/><span class="description">This will clear all hits in your database that are older than 30 days.</span></p>
101
 
102
  <p><a href="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI'] ); ?>&action=clear_90day_clicks" onclick="return confirm('***WARNING*** If you click OK you will delete ALL of the Hit data that is older than 90 days. Your data will be gone forever -- no way to retreive it. Do not click OK unless you are absolutely sure you want to delete this data because there is no going back!');">Delete Hits older than 90 days</a>
103
  <br/><span class="description">This will clear all hits in your database that are older than 90 days.</span></p>
104
+ <?php } ?>
105
 
106
  <p><a href="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI'] ); ?>&action=clear_all_clicks" onclick="return confirm('***WARNING*** If you click OK you will delete ALL of the Hit data in your Database. Your data will be gone forever -- no way to retreive it. Do not click OK unless you are absolutely sure you want to delete all your data because there is no going back!');">Delete All Hits</a>
107
  <br/><span class="description">Seriously, only click this link if you want to delete all the Hit data in your database.</span></p>
pretty-link.php CHANGED
@@ -1,12 +1,12 @@
1
  <?php
2
  /*
3
- Plugin Name: Pretty Link (Lite Version)
4
  Plugin URI: http://blairwilliams.com/pretty-link
5
  Description: Shrink, track and share any URL on the Internet from your WordPress website!
6
- Version: 1.4.55
7
  Author: Caseproof
8
  Author URI: http://caseproof.com
9
- Copyright: 2009-2011, Caseproof, LLC
10
 
11
  GNU General Public License, Free Software Foundation <http://creativecommons.org/licenses/GPL/2.0/>
12
  This program is free software; you can redistribute it and/or modify
1
  <?php
2
  /*
3
+ Plugin Name: Pretty Link Lite
4
  Plugin URI: http://blairwilliams.com/pretty-link
5
  Description: Shrink, track and share any URL on the Internet from your WordPress website!
6
+ Version: 1.4.56
7
  Author: Caseproof
8
  Author URI: http://caseproof.com
9
+ Copyright: 2004-2011, Caseproof, LLC
10
 
11
  GNU General Public License, Free Software Foundation <http://creativecommons.org/licenses/GPL/2.0/>
12
  This program is free software; you can redistribute it and/or modify
prli-config.php CHANGED
@@ -2,6 +2,7 @@
2
  define('PRLI_PLUGIN_NAME',"pretty-link");
3
  define('PRLI_PATH',WP_PLUGIN_DIR.'/'.PRLI_PLUGIN_NAME);
4
  define('PRLI_MODELS_PATH',PRLI_PATH.'/classes/models');
 
5
  define('PRLI_VIEWS_PATH',PRLI_PATH.'/classes/views');
6
  //define(PRLI_URL,WP_PLUGIN_URL.'/'.PRLI_PLUGIN_NAME);
7
  define('PRLI_URL',plugins_url($path = '/'.PRLI_PLUGIN_NAME));
@@ -109,7 +110,7 @@ function setup_edit_vars($groups,$record)
109
  foreach($groups as $group)
110
  {
111
  $values['groups'][] = array( 'id' => $group->id,
112
- 'value' => ((isset($_REQUEST['group_id']) and (($_REQUEST['group_id'] == $group->id) or ($record->group_id == $group->id)))?' selected="true"':''),
113
  'name' => $group->name );
114
  }
115
 
2
  define('PRLI_PLUGIN_NAME',"pretty-link");
3
  define('PRLI_PATH',WP_PLUGIN_DIR.'/'.PRLI_PLUGIN_NAME);
4
  define('PRLI_MODELS_PATH',PRLI_PATH.'/classes/models');
5
+ define('PRLI_CONTROLLERS_PATH',PRLI_PATH.'/classes/controllers');
6
  define('PRLI_VIEWS_PATH',PRLI_PATH.'/classes/views');
7
  //define(PRLI_URL,WP_PLUGIN_URL.'/'.PRLI_PLUGIN_NAME);
8
  define('PRLI_URL',plugins_url($path = '/'.PRLI_PLUGIN_NAME));
110
  foreach($groups as $group)
111
  {
112
  $values['groups'][] = array( 'id' => $group->id,
113
+ 'value' => (((isset($_REQUEST['group_id']) and ($_REQUEST['group_id'] == $group->id)) or ($record->group_id == $group->id))?' selected="true"':''),
114
  'name' => $group->name );
115
  }
116
 
prli-links.php CHANGED
@@ -6,7 +6,9 @@ $params = $prli_link->get_params_array();
6
 
7
  if($params['action'] == 'list')
8
  {
9
- if(empty($params['group']))
 
 
10
  $prli_message = prli_get_main_message();
11
  else
12
  $prli_message = "Links in Group: " . $wpdb->get_var("SELECT name FROM " . $prli_group->table_name . " WHERE id=".$params['group']);
6
 
7
  if($params['action'] == 'list')
8
  {
9
+ if(!empty($params['message']))
10
+ $prli_message = $params['message'];
11
+ else if(empty($params['group']))
12
  $prli_message = prli_get_main_message();
13
  else
14
  $prli_message = "Links in Group: " . $wpdb->get_var("SELECT name FROM " . $prli_group->table_name . " WHERE id=".$params['group']);
prli-main.php CHANGED
@@ -197,8 +197,7 @@ add_filter('xmlrpc_methods', 'prli_export_api');
197
  /********* INSTALL PLUGIN ***********/
198
  function prli_install()
199
  {
200
- global $wpdb, $prli_utils, $prli_update;
201
- $db_version = 11; // this is the version of the database we're moving to
202
  $old_db_version = get_option('prli_db_version');
203
 
204
  $groups_table = $wpdb->prefix . "prli_groups";
@@ -215,7 +214,7 @@ function prli_install()
215
  $charset_collate .= " COLLATE $wpdb->collate";
216
  }
217
 
218
- if($db_version != $old_db_version)
219
  {
220
  $prli_utils->migrate_before_db_upgrade();
221
 
@@ -314,7 +313,7 @@ function prli_install()
314
  update_option('prli_options',$prli_options);
315
 
316
  /***** SAVE DB VERSION *****/
317
- update_option('prli_db_version',$db_version);
318
  }
319
 
320
  // Ensure this gets called on first install
197
  /********* INSTALL PLUGIN ***********/
198
  function prli_install()
199
  {
200
+ global $wpdb, $prli_utils, $prli_update, $prli_db_version;
 
201
  $old_db_version = get_option('prli_db_version');
202
 
203
  $groups_table = $wpdb->prefix . "prli_groups";
214
  $charset_collate .= " COLLATE $wpdb->collate";
215
  }
216
 
217
+ if($prli_db_version != $old_db_version)
218
  {
219
  $prli_utils->migrate_before_db_upgrade();
220
 
313
  update_option('prli_options',$prli_options);
314
 
315
  /***** SAVE DB VERSION *****/
316
+ update_option('prli_db_version',$prli_db_version);
317
  }
318
 
319
  // Ensure this gets called on first install
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === Pretty Link (Lite Version) ===
2
  Contributors: supercleanse
3
  Donate link: http://prettylinkpro.com
4
  Tags: links, link, url, urls, affiliate, affiliates, pretty, marketing, redirect, forward, plugin, twitter, tweet, rewrite, shorturl, hoplink, hop, shortlink, short, shorten, click, clicks, track, tracking, tiny, tinyurl, budurl, shrinking, domain, shrink, mask, masking, cloak, cloaking, slug, slugs, admin, administration, stats, statistics, stat, statistic, email, ajax, javascript, ui, csv, download, page, post, pages, posts, shortcode, seo, automation, widget, widgets, dashboard
5
  Requires at least: 2.9
6
- Tested up to: 3.0.4
7
- Stable tag: 1.4.55
8
 
9
  Shrink, track and share any URL on the Internet from your WordPress website. Create short links suitable for Twitter using your own domain name!
10
 
@@ -67,6 +67,14 @@ http://blairwilliams.com/w7a
67
 
68
  == Changelog ==
69
 
 
 
 
 
 
 
 
 
70
  = 1.4.55 =
71
  * Fixed the CSV export issues
72
  * Moved all Pretty Link images to Amazon CloudFront
@@ -281,6 +289,10 @@ http://blairwilliams.com/w7a
281
  * Fixed some issues surrounding keyword content caching in Pro
282
 
283
  == Upgrade Notice ==
 
 
 
 
284
  = 1.4.55 =
285
  * Everyone should upgrade -- this fixes the CSV export issue with hits.
286
 
1
+ === Pretty Link Lite ===
2
  Contributors: supercleanse
3
  Donate link: http://prettylinkpro.com
4
  Tags: links, link, url, urls, affiliate, affiliates, pretty, marketing, redirect, forward, plugin, twitter, tweet, rewrite, shorturl, hoplink, hop, shortlink, short, shorten, click, clicks, track, tracking, tiny, tinyurl, budurl, shrinking, domain, shrink, mask, masking, cloak, cloaking, slug, slugs, admin, administration, stats, statistics, stat, statistic, email, ajax, javascript, ui, csv, download, page, post, pages, posts, shortcode, seo, automation, widget, widgets, dashboard
5
  Requires at least: 2.9
6
+ Tested up to: 3.1
7
+ Stable tag: 1.4.56
8
 
9
  Shrink, track and share any URL on the Internet from your WordPress website. Create short links suitable for Twitter using your own domain name!
10
 
67
 
68
  == Changelog ==
69
 
70
+ = 1.4.56 =
71
+ * Updated to be fully compatible with WordPress 3.1 and WordPress MultiSite for all users
72
+ * Fixed link rotation issue (weights not sticking) for Pro Users
73
+ * Fixed auto link creation issue with the group not being set properly for Pro Users
74
+ * Fixed the slug available routine for all users
75
+ * Fixed the delete hits issue with simple click counting for all users
76
+ * Fixed some keyword replacement deletion issues for pro users
77
+
78
  = 1.4.55 =
79
  * Fixed the CSV export issues
80
  * Moved all Pretty Link images to Amazon CloudFront
289
  * Fixed some issues surrounding keyword content caching in Pro
290
 
291
  == Upgrade Notice ==
292
+
293
+ = 1.4.56 =
294
+ * This release fixes several issues including full WordPress 3.1 and MultiSite compatibility. So everyone should upgrade to this release.
295
+
296
  = 1.4.55 =
297
  * Everyone should upgrade -- this fixes the CSV export issue with hits.
298