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

Version Description

  • Critical performance fix
  • WP_Error on dashboard fix
Download this release

Release Info

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

Code changes from version 1.5.1 to 1.5.2

classes/models/PrliUpdate.php CHANGED
@@ -92,13 +92,15 @@ class PrliUpdate
92
  !empty($this->pro_password) )
93
  {
94
  $authorized = get_option($this->pro_auth_store);
95
- if(!$force_check and isset($authorized) and ($authorized===true or $authorized===false))
96
- return $authorized;
 
97
  else
98
  {
99
  $new_auth = $this->authorize_user($this->pro_username,$this->pro_password);
 
100
  update_option($this->pro_auth_store, $new_auth);
101
- return $new_auth;
102
  }
103
  }
104
 
@@ -217,16 +219,14 @@ class PrliUpdate
217
  if(!empty($user_authorized) and $user_authorized)
218
  {
219
  update_option($this->pro_cred_store, $creds);
220
- update_option($this->pro_auth_store, $user_authorized);
221
 
222
  extract($creds);
223
  $this->pro_username = ((isset($username) and !empty($username))?$username:'');
224
  $this->pro_password = ((isset($password) and !empty($password))?$password:'');
225
 
226
- if(!$this->pro_is_installed()) {
227
- $transient = get_site_transient("update_plugins");
228
- set_site_transient("update_plugins",$this->queue_update($transient, true));
229
- }
230
  }
231
 
232
  return $user_authorized;
@@ -301,4 +301,9 @@ class PrliUpdate
301
 
302
  return $transient;
303
  }
 
 
 
 
 
304
  }
92
  !empty($this->pro_password) )
93
  {
94
  $authorized = get_option($this->pro_auth_store);
95
+
96
+ if(!$force_check and isset($authorized) and $authorized and ($authorized=='true' or $authorized=='false'))
97
+ return ($authorized=='true');
98
  else
99
  {
100
  $new_auth = $this->authorize_user($this->pro_username,$this->pro_password);
101
+ $new_auth = ($new_auth?'true':'false');
102
  update_option($this->pro_auth_store, $new_auth);
103
+ return ($new_auth=='true');
104
  }
105
  }
106
 
219
  if(!empty($user_authorized) and $user_authorized)
220
  {
221
  update_option($this->pro_cred_store, $creds);
222
+ update_option($this->pro_auth_store, ($user_authorized?'true':'false'));
223
 
224
  extract($creds);
225
  $this->pro_username = ((isset($username) and !empty($username))?$username:'');
226
  $this->pro_password = ((isset($password) and !empty($password))?$password:'');
227
 
228
+ if(!$this->pro_is_installed())
229
+ $this->manually_queue_update();
 
 
230
  }
231
 
232
  return $user_authorized;
301
 
302
  return $transient;
303
  }
304
+
305
+ public function manually_queue_update() {
306
+ $transient = get_site_transient("update_plugins");
307
+ set_site_transient("update_plugins",$this->queue_update($transient, true));
308
+ }
309
  }
classes/models/models.inc.php CHANGED
@@ -55,7 +55,7 @@ function prli_get_main_message($message='',$expiration=1800) // Get new messages
55
  // if the messages array has expired go back to the mothership
56
  if(!$messages)
57
  {
58
- $remote_controller = !$prli_update->pro_is_installed_and_authorized() ? 'prlipro' : 'prli';
59
  $message_mothership = "http://prettylinkpro.com/index.php?controller={$remote_controller}&action=json_messages";
60
 
61
  if( !class_exists( 'WP_Http' ) )
@@ -64,7 +64,10 @@ function prli_get_main_message($message='',$expiration=1800) // Get new messages
64
  $http = new WP_Http;
65
  $response = $http->request( $message_mothership );
66
 
67
- if(isset($response) and isset($response['body']) and !empty($response['body']))
 
 
 
68
  $messages = json_decode($response['body']);
69
  else
70
  $messages = array($message);
55
  // if the messages array has expired go back to the mothership
56
  if(!$messages)
57
  {
58
+ $remote_controller = $prli_update->pro_is_installed_and_authorized() ? 'prlipro' : 'prli';
59
  $message_mothership = "http://prettylinkpro.com/index.php?controller={$remote_controller}&action=json_messages";
60
 
61
  if( !class_exists( 'WP_Http' ) )
64
  $http = new WP_Http;
65
  $response = $http->request( $message_mothership );
66
 
67
+ if( isset($response) and
68
+ is_array($response) and // if response is an error then WP_Error will be returned
69
+ isset($response['body']) and
70
+ !empty($response['body']))
71
  $messages = json_decode($response['body']);
72
  else
73
  $messages = array($message);
i18n/pretty-link.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the Pretty Link Lite package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Pretty Link Lite 1.5.1\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/pretty-link\n"
7
- "POT-Creation-Date: 2011-12-02 02:28:04+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -140,22 +140,22 @@ msgstr ""
140
  msgid "Your Pretty Link Pro Username or Password was Invalid"
141
  msgstr ""
142
 
143
- #: classes/models/PrliUpdate.php:151
144
  msgid ""
145
  "Your Username & Password was accepted<br/>Now you can %1$sUpgrade "
146
  "Automatically!%2$s"
147
  msgstr ""
148
 
149
- #: classes/models/PrliUpdate.php:161
150
  msgid ""
151
  "Your Username & Password was accepted<br/>Now you can %1$sGet Started!%2$s"
152
  msgstr ""
153
 
154
- #: classes/models/PrliUpdate.php:171
155
  msgid "ERROR"
156
  msgstr ""
157
 
158
- #: classes/models/PrliUpdate.php:206
159
  #: pro/classes/views/prlipro-options/form.php:432
160
  msgid "Save"
161
  msgstr ""
2
  # This file is distributed under the same license as the Pretty Link Lite package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Pretty Link Lite 1.5.2\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/pretty-link\n"
7
+ "POT-Creation-Date: 2011-12-03 18:00:29+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
140
  msgid "Your Pretty Link Pro Username or Password was Invalid"
141
  msgstr ""
142
 
143
+ #: classes/models/PrliUpdate.php:153
144
  msgid ""
145
  "Your Username & Password was accepted<br/>Now you can %1$sUpgrade "
146
  "Automatically!%2$s"
147
  msgstr ""
148
 
149
+ #: classes/models/PrliUpdate.php:163
150
  msgid ""
151
  "Your Username & Password was accepted<br/>Now you can %1$sGet Started!%2$s"
152
  msgstr ""
153
 
154
+ #: classes/models/PrliUpdate.php:173
155
  msgid "ERROR"
156
  msgstr ""
157
 
158
+ #: classes/models/PrliUpdate.php:208
159
  #: pro/classes/views/prlipro-options/form.php:432
160
  msgid "Save"
161
  msgstr ""
pretty-link.php CHANGED
@@ -3,7 +3,7 @@
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.5.1
7
  Author: Caseproof
8
  Author URI: http://caseproof.com
9
  Copyright: 2004-2011, Caseproof, LLC
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.5.2
7
  Author: Caseproof
8
  Author URI: http://caseproof.com
9
  Copyright: 2004-2011, Caseproof, LLC
prli-main.php CHANGED
@@ -349,7 +349,7 @@ function prli_pro_action_needed( $plugin )
349
  $prli_update->pro_is_authorized() and
350
  !$prli_update->pro_is_installed() )
351
  {
352
- $prli_update->queue_update(true);
353
  $inst_install_url = wp_nonce_url('update.php?action=upgrade-plugin&plugin=' . $plugin, 'upgrade-plugin_' . $plugin);
354
  ?>
355
  <td colspan="3" class="plugin-update"><div class="update-message" style="-moz-border-radius-bottomleft:5px; -moz-border-radius-bottomright:5px; -moz-border-radius-topleft:5px; -moz-border-radius-topright:5px; border-style:solid; border-width:1px; margin:5px; background-color:#FFEBE8; border-color:#CC0000; padding:3px 5px;"><?php printf(__('Your Pretty Link Pro installation isn\'t quite complete yet.<br/>%1$sAutomatically Upgrade to Enable Pretty Link Pro%2$s', 'pretty-link'), '<a href="'.$inst_install_url.'">', '</a>'); ?></div></td>
@@ -368,7 +368,7 @@ function prli_pro_get_started_headline()
368
  if( $prli_update->pro_is_authorized() and
369
  !$prli_update->pro_is_installed())
370
  {
371
- $prli_update->queue_update(true);
372
  $inst_install_url = wp_nonce_url('update.php?action=upgrade-plugin&plugin=' . $prli_update->plugin_name, 'upgrade-plugin_' . $prli_update->plugin_name);
373
  ?>
374
  <div class="error" style="padding-top: 5px; padding-bottom: 5px;"><?php printf(__('Your Pretty Link Pro installation isn\'t quite complete yet.<br/>%1$sAutomatically Upgrade to Enable Pretty Link Pro%2$s', 'pretty-link'), '<a href="'.$inst_install_url.'">','</a>'); ?></div>
349
  $prli_update->pro_is_authorized() and
350
  !$prli_update->pro_is_installed() )
351
  {
352
+ $prli_update->manually_queue_update();
353
  $inst_install_url = wp_nonce_url('update.php?action=upgrade-plugin&plugin=' . $plugin, 'upgrade-plugin_' . $plugin);
354
  ?>
355
  <td colspan="3" class="plugin-update"><div class="update-message" style="-moz-border-radius-bottomleft:5px; -moz-border-radius-bottomright:5px; -moz-border-radius-topleft:5px; -moz-border-radius-topright:5px; border-style:solid; border-width:1px; margin:5px; background-color:#FFEBE8; border-color:#CC0000; padding:3px 5px;"><?php printf(__('Your Pretty Link Pro installation isn\'t quite complete yet.<br/>%1$sAutomatically Upgrade to Enable Pretty Link Pro%2$s', 'pretty-link'), '<a href="'.$inst_install_url.'">', '</a>'); ?></div></td>
368
  if( $prli_update->pro_is_authorized() and
369
  !$prli_update->pro_is_installed())
370
  {
371
+ $prli_update->manually_queue_update();
372
  $inst_install_url = wp_nonce_url('update.php?action=upgrade-plugin&plugin=' . $prli_update->plugin_name, 'upgrade-plugin_' . $prli_update->plugin_name);
373
  ?>
374
  <div class="error" style="padding-top: 5px; padding-bottom: 5px;"><?php printf(__('Your Pretty Link Pro installation isn\'t quite complete yet.<br/>%1$sAutomatically Upgrade to Enable Pretty Link Pro%2$s', 'pretty-link'), '<a href="'.$inst_install_url.'">','</a>'); ?></div>
prli-pro-settings.php CHANGED
@@ -19,7 +19,7 @@ $prlipro_password_val = get_option( $prlipro_password );
19
  if($_GET['action'] == 'force-pro-reinstall')
20
  {
21
  // Queue the update and auto upgrade
22
- $prli_update->queue_update(true);
23
  $reinstall_url = wp_nonce_url('update.php?action=upgrade-plugin&plugin=pretty-link/pretty-link.php', 'upgrade-plugin_pretty-link/pretty-link.php');
24
  ?>
25
  <div class="updated"><p><strong><?php printf(__('You\'re almost done!<br/>%1$sFinish your Re-Install of Pretty Link Pro%2$s', 'pretty-link'), '<a href="'.$reinstall_url.'">', '</a>'); ?></strong></p></div>
19
  if($_GET['action'] == 'force-pro-reinstall')
20
  {
21
  // Queue the update and auto upgrade
22
+ $prli_update->manually_queue_update();
23
  $reinstall_url = wp_nonce_url('update.php?action=upgrade-plugin&plugin=pretty-link/pretty-link.php', 'upgrade-plugin_pretty-link/pretty-link.php');
24
  ?>
25
  <div class="updated"><p><strong><?php printf(__('You\'re almost done!<br/>%1$sFinish your Re-Install of Pretty Link Pro%2$s', 'pretty-link'), '<a href="'.$reinstall_url.'">', '</a>'); ?></strong></p></div>
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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: 3.0
6
  Tested up to: 3.2.1
7
- Stable tag: 1.5.1
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,10 @@ http://blairwilliams.com/w7a
67
 
68
  == Changelog ==
69
 
 
 
 
 
70
  = 1.5.1 =
71
  * Fixed issue with mt_rand overflowing
72
  * Fixed another XSS Vulnerability
@@ -307,6 +311,9 @@ http://blairwilliams.com/w7a
307
 
308
  == Upgrade Notice ==
309
 
 
 
 
310
  = 1.5.1 =
311
  * This release contains several optimizations and fixes that will benefit most users.
312
 
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: 3.0
6
  Tested up to: 3.2.1
7
+ Stable tag: 1.5.2
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.5.2 =
71
+ * Critical performance fix
72
+ * WP_Error on dashboard fix
73
+
74
  = 1.5.1 =
75
  * Fixed issue with mt_rand overflowing
76
  * Fixed another XSS Vulnerability
311
 
312
  == Upgrade Notice ==
313
 
314
+ = 1.5.2 =
315
+ * CRITICAL UPGRADE ... this release contains several critical performance fixes
316
+
317
  = 1.5.1 =
318
  * This release contains several optimizations and fixes that will benefit most users.
319