Changeset 661179
- Timestamp:
- 01/30/2013 10:16:42 AM (13 years ago)
- Location:
- surly/trunk
- Files:
-
- 3 edited
-
lib/Surly.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
surly.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
surly/trunk/lib/Surly.php
r658049 r661179 633 633 } 634 634 635 publicfunction _performRequest($url, $method = 'GET', $params = null)635 function _performRequest($url, $method = 'GET', $params = null) 636 636 { 637 637 if (function_exists('curl_init')) { -
surly/trunk/readme.txt
r658049 r661179 28 28 == Changelog == 29 29 30 = 1.0.2 = 31 32 * Updated Sur.ly SDK 33 * Fixed notices in admin 34 30 35 = 1.0.1 = 31 36 32 Updated Sur.ly SDK37 * Updated Sur.ly SDK 33 38 34 39 = 1.0 = -
surly/trunk/surly.php
r658049 r661179 20 20 * Plugin URI: http://sur.ly 21 21 * Description: Protection of outbound links 22 * Version: 1.0 22 * Version: 1.0.1 23 23 * Author: Sur.ly 24 24 */ … … 97 97 if (isset($_POST['save_changes'])) 98 98 { 99 update_option('user_list', $_POST['user_list']); 99 if (isset($_POST['user_list'])) { 100 update_option('user_list', $_POST['user_list']); 101 } 102 100 103 foreach ($_POST['urls'] as $key => $v) 101 104 { … … 106 109 } 107 110 update_option('urls', $_POST['urls']); 108 update_option('replace_in_posts', $_POST['replace_in_posts']); 109 update_option('shorten_urls', $_POST['shorten_urls']); 110 update_option('settings', $_POST['settings']); 111 111 112 if (isset($_POST['replace_in_posts'])) { 113 update_option('replace_in_posts', $_POST['replace_in_posts']); 114 } 115 else { 116 update_option('replace_in_posts', 0); 117 } 118 119 if (isset($_POST['shorten_urls'])) { 120 update_option('shorten_urls', $_POST['shorten_urls']); 121 } 122 else { 123 update_option('shorten_urls', 0); 124 } 125 112 126 if ($_POST['settings'] == 'tab1') 113 127 { … … 118 132 } 119 133 } 120 elseif ($_POST['settings'] == 'tab2' AND$_POST['settings_id'] != '')134 elseif ($_POST['settings'] == 'tab2' && isset($_POST['settings_id']) && $_POST['settings_id'] != '') 121 135 { 122 update_option('settings_id', $_POST['settings_id']);136 update_option('settings_id', $_POST['settings_id']); 123 137 } 124 138 } … … 156 170 ?> 157 171 <div class="input_box"> 158 <input type="text" id="appendedInputButtons" name="urls[]" value="<?php echo $v;?>">172 <input type="text" id="appendedInputButtons" name="urls[]"> 159 173 <button type="button" class="button" onclick="delblockurl(this);">Remove</button> 160 174 <button type="button" class="button" onclick="addblockurl(this);">Add domain</button> … … 288 302 function cacheShortIds($url2shortIds) 289 303 { 304 if (!$url2shortIds) { 305 return; 306 } 307 290 308 global $wpdb; $insert = array(); 291 309 $page_is_cache_table = $wpdb->prefix.'shortener_cache'; … … 303 321 function getCachedShortIds($urls) 304 322 { 323 if (!$urls) { 324 array(); 325 } 326 305 327 global $wpdb; 306 328 $where = array();
Note: See TracChangeset
for help on using the changeset viewer.