Changeset 55
- Timestamp:
- 02/08/08 15:27:54 (10 months ago)
- Location:
- trunk
- Files:
-
- 3 modified
-
badhosts.txt (modified) (1 diff)
-
lib/settings.php (modified) (1 diff)
-
wassup.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/badhosts.txt
r34 r55 6749 6749 zwallet.com 6750 6750 zxcvbdf.com 6751 irclogs.net -
trunk/lib/settings.php
r54 r55 169 169 </select></p> 170 170 <br /><hr /> 171 <p style="padding-left:0;padding-top:15px;"><input type="submit" name="submit" value="<?php _e('Save Settings','wassup'); ?>" /> <input type="reset" name="reset" value="<?php _e('Reset','wassup'); ?>" /> </p>171 <p style="padding-left:0;padding-top:15px;"><input type="submit" name="submit" value="<?php _e('Save Settings','wassup'); ?>" /> <input type="reset" name="reset" value="<?php _e('Reset','wassup'); ?>" /> <input type="submit" name="reset-to-default" value="Reset to Default Settings" /></p> 172 172 </form> 173 173 <br /> -
trunk/wassup.php
r54 r55 31 31 add_action('wp_head', 'add_wassup_meta_info'); 32 32 33 //#add initial options and create table when Wassup activated 34 function wassup_install() { 35 global $wpdb; 36 //#initial wassup settings for options 37 $defaultdata = array( 33 //#initial wassup settings for options this is here because 34 //I need it in more then one function (using global) 35 $defaultWdata = array( 38 36 'wassup_active' => "1", 39 37 'wassup_loggedin' => "1", … … 69 67 ); 70 68 69 //#add initial options and create table when Wassup activated 70 function wassup_install() { 71 global $wpdb, $defaultWdata; 71 72 //### add/update wassup settings to Wordpress options table 72 73 $wassup_settings = get_option('wassup_settings'); 73 74 if (empty($wassup_settings)) { 74 75 //# initialize wassup settings to default values 75 add_option('wassup_settings', $default data, 'Options for WassUp');76 add_option('wassup_settings', $defaultWdata, 'Options for WassUp'); 76 77 } else { 77 78 //# update wassup settings for 'spamcheck', 'refspam', and 'spam' … … 320 321 321 322 function WassUp() { 322 global $wpdb, $version, $wpurl ;323 global $wpdb, $version, $wpurl, $defaultWdata; 323 324 $hash = wp_hash('wassup'); 324 325 $table_name = $wpdb->prefix . "wassup"; … … 361 362 $wassup_settings['wassup_refspam'] = $_POST['wassup_refspam']; 362 363 update_option('wassup_settings', $wassup_settings); 363 } 364 } elseif (isset($_POST['reset-to-default'])) { 365 print_r($defaultWdata); 366 delete_option('wassup_settings'); 367 update_option('wassup_settings', $defaultWdata); 368 $wassup_settings = get_option('wassup_settings'); 369 } 370 371 364 372 if ($_GET['page'] == "wassup-spy") { 365 373 $class_spy="class='current'";
