Changeset 714097
- Timestamp:
- 05/16/2013 10:27:18 PM (13 years ago)
- Location:
- admangler
- Files:
-
- 3 edited
- 11 copied
-
tags/0.1.2 (copied) (copied from admangler/trunk)
-
tags/0.1.2/adMangler.class.php (copied) (copied from admangler/trunk/adMangler.class.php) (5 diffs)
-
tags/0.1.2/adMangler.php (copied) (copied from admangler/trunk/adMangler.php) (2 diffs)
-
tags/0.1.2/adManglerWidget.class.php (copied) (copied from admangler/trunk/adManglerWidget.class.php)
-
tags/0.1.2/classes (copied) (copied from admangler/trunk/classes)
-
tags/0.1.2/classes/webapi.php (copied) (copied from admangler/trunk/classes/webapi.php)
-
tags/0.1.2/forms/banners.php (copied) (copied from admangler/trunk/forms/banners.php)
-
tags/0.1.2/forms/dashboard.php (copied) (copied from admangler/trunk/forms/dashboard.php)
-
tags/0.1.2/js/shortcode.js (copied) (copied from admangler/trunk/js/shortcode.js)
-
tags/0.1.2/readme.txt (copied) (copied from admangler/trunk/readme.txt) (2 diffs)
-
tags/0.1.2/shortcode.php (copied) (copied from admangler/trunk/shortcode.php)
-
trunk/adMangler.class.php (modified) (5 diffs)
-
trunk/adMangler.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
admangler/tags/0.1.2/adMangler.class.php
r714088 r714097 23 23 $this->positionsTable = $wpdb->prefix."AdMangler_positions"; 24 24 25 add_action( 'init', function () { 26 wp_enqueue_script("jquery"); 27 //wp_enqueue_script('jquery.validate', '/' . PLUGINDIR . '/admangler/js/jquery.validate.min.js'); 28 }); 29 25 30 // Generate the Admin Menu 26 31 if ( is_admin() ) 27 32 { 28 add_action( 'init', function () { 29 wp_enqueue_script("jquery"); 30 //wp_enqueue_script('jquery.validate', '/' . PLUGINDIR . '/admangler/js/jquery.validate.min.js'); 31 }); 33 add_action('admin_init', array($this, "activate") ); 32 34 //register_activation_hook(__FILE__, array($this, "activate")); 33 35 add_action('admin_menu', array($this, 'admin_menu')); … … 75 77 function activate() 76 78 { 79 77 80 ob_start(); 78 81 global $wpdb; 79 82 // Installed plugin database table version 80 $installed_version = get_option('AdMangler_db_version'); 81 if ( false === $installed_version ) 82 $installed_version = '0.0.0'; 83 $db_version = get_option('AdMangler_db_version'); 84 if ( false === $db_version ) 85 { 86 $db_version = '0.0.0'; 87 } 88 89 $code_version = get_option('AdMangler_code_version'); 90 if ( false === $code_version ) 91 $code_version = '0.0.0'; 92 if ( version_compare( $code_version, $this->codeVersion, '<') ) 93 { 94 if (get_option('AdMangler_code_version')) 95 { 96 update_option('AdMangler_code_version', $this->codeVersion); 97 $action = 'update'; 98 } 99 else 100 { 101 add_option('AdMangler_code_version', $this->codeVersion); 102 $action = 'install'; 103 } 104 $this->send_statistics($action); 105 } 83 106 84 107 // If the database has changed, update the structure while preserving data 85 if ( version_compare( $ installed_version, $this->dbVersion, '<') )108 if ( version_compare( $db_version, $this->dbVersion, '<') ) 86 109 { 87 110 // Plugin database table version … … 143 166 144 167 } 145 $this->send_statistics(); 168 169 146 170 //file_put_contents(dirname(__FILE__)."/log.txt", var_export($this, true), FILE_APPEND); 147 171 return true; … … 516 540 } 517 541 518 function send_statistics($ url=null)542 function send_statistics($action) 519 543 { 520 544 if (in_array ('curl', get_loaded_extensions())) … … 528 552 $phone->addChild('version', $this->codeVersion); 529 553 $phone->addChild('database', $this->dbVersion); 530 $phone->addChild('status', 'install');554 $phone->addChild('status', $action); 531 555 $phone->addChild('domain', urlencode($_SERVER['SERVER_NAME'])); 532 556 $api->add_request($phone); -
admangler/tags/0.1.2/adMangler.php
r714088 r714097 4 4 Plugin URI: http://www.webternals.com/projects/admangler/ 5 5 Description: AdMangler (Beta) Display, sell, and manage ad space on your Wordpress powered site. 6 Version: 0.1. 16 Version: 0.1.2 7 7 Author: Webternals, LLC - Allen Sanford 8 8 Author URI: http://www.webternals.com/ … … 16 16 17 17 18 $codeVersion = '0.1. 1';19 $dbVersion = '0.0. 8';18 $codeVersion = '0.1.2'; 19 $dbVersion = '0.0.9'; 20 20 21 21 if (!session_id()) -
admangler/tags/0.1.2/readme.txt
r714088 r714097 5 5 Requires at least: 2.8.2 6 6 Tested up to: 3.5.1 7 Stable Tag: 0.1. 17 Stable Tag: 0.1.2 8 8 9 9 AdMangler (Beta) Display, sell, and manage ad space on your Wordpress powered site. … … 61 61 62 62 == Changelog == 63 64 = 0.1.1 = 65 * Bug fix for plugin automatic update! 63 66 64 67 = 0.1.1 = -
admangler/trunk/adMangler.class.php
r714088 r714097 23 23 $this->positionsTable = $wpdb->prefix."AdMangler_positions"; 24 24 25 add_action( 'init', function () { 26 wp_enqueue_script("jquery"); 27 //wp_enqueue_script('jquery.validate', '/' . PLUGINDIR . '/admangler/js/jquery.validate.min.js'); 28 }); 29 25 30 // Generate the Admin Menu 26 31 if ( is_admin() ) 27 32 { 28 add_action( 'init', function () { 29 wp_enqueue_script("jquery"); 30 //wp_enqueue_script('jquery.validate', '/' . PLUGINDIR . '/admangler/js/jquery.validate.min.js'); 31 }); 33 add_action('admin_init', array($this, "activate") ); 32 34 //register_activation_hook(__FILE__, array($this, "activate")); 33 35 add_action('admin_menu', array($this, 'admin_menu')); … … 75 77 function activate() 76 78 { 79 77 80 ob_start(); 78 81 global $wpdb; 79 82 // Installed plugin database table version 80 $installed_version = get_option('AdMangler_db_version'); 81 if ( false === $installed_version ) 82 $installed_version = '0.0.0'; 83 $db_version = get_option('AdMangler_db_version'); 84 if ( false === $db_version ) 85 { 86 $db_version = '0.0.0'; 87 } 88 89 $code_version = get_option('AdMangler_code_version'); 90 if ( false === $code_version ) 91 $code_version = '0.0.0'; 92 if ( version_compare( $code_version, $this->codeVersion, '<') ) 93 { 94 if (get_option('AdMangler_code_version')) 95 { 96 update_option('AdMangler_code_version', $this->codeVersion); 97 $action = 'update'; 98 } 99 else 100 { 101 add_option('AdMangler_code_version', $this->codeVersion); 102 $action = 'install'; 103 } 104 $this->send_statistics($action); 105 } 83 106 84 107 // If the database has changed, update the structure while preserving data 85 if ( version_compare( $ installed_version, $this->dbVersion, '<') )108 if ( version_compare( $db_version, $this->dbVersion, '<') ) 86 109 { 87 110 // Plugin database table version … … 143 166 144 167 } 145 $this->send_statistics(); 168 169 146 170 //file_put_contents(dirname(__FILE__)."/log.txt", var_export($this, true), FILE_APPEND); 147 171 return true; … … 516 540 } 517 541 518 function send_statistics($ url=null)542 function send_statistics($action) 519 543 { 520 544 if (in_array ('curl', get_loaded_extensions())) … … 528 552 $phone->addChild('version', $this->codeVersion); 529 553 $phone->addChild('database', $this->dbVersion); 530 $phone->addChild('status', 'install');554 $phone->addChild('status', $action); 531 555 $phone->addChild('domain', urlencode($_SERVER['SERVER_NAME'])); 532 556 $api->add_request($phone); -
admangler/trunk/adMangler.php
r714088 r714097 4 4 Plugin URI: http://www.webternals.com/projects/admangler/ 5 5 Description: AdMangler (Beta) Display, sell, and manage ad space on your Wordpress powered site. 6 Version: 0.1. 16 Version: 0.1.2 7 7 Author: Webternals, LLC - Allen Sanford 8 8 Author URI: http://www.webternals.com/ … … 16 16 17 17 18 $codeVersion = '0.1. 1';19 $dbVersion = '0.0. 8';18 $codeVersion = '0.1.2'; 19 $dbVersion = '0.0.9'; 20 20 21 21 if (!session_id()) -
admangler/trunk/readme.txt
r714088 r714097 5 5 Requires at least: 2.8.2 6 6 Tested up to: 3.5.1 7 Stable Tag: 0.1. 17 Stable Tag: 0.1.2 8 8 9 9 AdMangler (Beta) Display, sell, and manage ad space on your Wordpress powered site. … … 61 61 62 62 == Changelog == 63 64 = 0.1.1 = 65 * Bug fix for plugin automatic update! 63 66 64 67 = 0.1.1 =
Note: See TracChangeset
for help on using the changeset viewer.