Changeset 618883
- Timestamp:
- 10/30/2012 03:17:02 AM (13 years ago)
- Location:
- token-manager/trunk
- Files:
-
- 4 edited
-
readme.txt (modified) (2 diffs)
-
token-manager.php (modified) (5 diffs)
-
tokenedit.php (modified) (1 diff)
-
typeedit.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
token-manager/trunk/readme.txt
r604953 r618883 6 6 Tags: token, tokens, manager, code, PHP, CSS, javascript, HTML, js, develop, injection, inline 7 7 Requires at least: 3.0 8 Tested up to: 3.4. 19 Stable tag: 1.0. 38 Tested up to: 3.4.2 9 Stable tag: 1.0.4 10 10 11 11 The Token Manager allows web developers to program PHP, HTML, CSS and JavaScript into tokens that can be used throughout WordPress. … … 158 158 159 159 == Changelog == 160 = 1.0.4 = 161 * Updated database and changed history data type from TEXT to MEDIUMTEXT to allow more token updates than 400+. Added in mysql return errors on update statements. 162 160 163 = 1.0.3 = 161 164 * Security update to remove XSS with 'tid' in tokenedit.php and typeedit.php. No other changes, safe to update. -
token-manager/trunk/token-manager.php
r604953 r618883 5 5 Description: The Token Manager allows web developers to program PHP, HTML, CSS and JavaScript into tokens that can be used throughout Wordpress. 6 6 Author: Codevendor 7 Version: 1.0. 37 Version: 1.0.4 8 8 Author URI: http://www.codevendor.com 9 9 */ … … 30 30 global $PLUGIN_ICON2; 31 31 32 $PLUGIN_TM_DB_VERSION = '0. 1';32 $PLUGIN_TM_DB_VERSION = '0.2'; 33 33 $OPTION_TM_INJECTURL = (get_option('tokenmanager_injecturl', false)==false)?false:true; 34 34 $OPTION_TM_DISPLAYERRORS = (get_option('tokenmanager_displayerrors', false)==false)?false:true; … … 459 459 version int(10) unsigned DEFAULT '0' NOT NULL, 460 460 processorder int(0) unsigned DEFAULT '0' NOT NULL, 461 history textNOT NULL,461 history MEDIUMTEXT NOT NULL, 462 462 UNIQUE KEY id (id) 463 463 );"; … … 499 499 active tinyint(1) DEFAULT '0' NOT NULL, 500 500 version int(10) unsigned DEFAULT '0' NOT NULL, 501 history textNOT NULL,501 history MEDIUMTEXT NOT NULL, 502 502 UNIQUE KEY id (id) 503 503 );"; … … 558 558 } 559 559 560 public static function tokens(){ include('tokens.php'); }561 public static function add(){ include('tokenadd.php'); }562 public static function edit(){ include('tokenedit.php'); }563 public static function types(){ include('types.php'); }564 public static function typeadd(){ include('typeadd.php'); }565 public static function typeedit(){ include('typeedit.php'); }566 public static function settings(){ include('settings.php'); }567 public static function pro(){ include('pro.php'); }568 public static function info(){ include('info.php'); }560 public static function tokens(){ tokenmanager::create(); include('tokens.php'); } 561 public static function add(){ tokenmanager::create(); include('tokenadd.php'); } 562 public static function edit(){ tokenmanager::create(); include('tokenedit.php'); } 563 public static function types(){ tokenmanager::create(); include('types.php'); } 564 public static function typeadd(){ tokenmanager::create(); include('typeadd.php'); } 565 public static function typeedit(){ tokenmanager::create(); include('typeedit.php'); } 566 public static function settings(){ tokenmanager::create(); include('settings.php'); } 567 public static function pro(){ tokenmanager::create(); include('pro.php'); } 568 public static function info(){ tokenmanager::create(); include('info.php'); } 569 569 public static function json(){ global $PLUGIN_TM_JSON_CALL; $PLUGIN_TM_JSON_CALL=true; include('json.php'); } 570 570 -
token-manager/trunk/tokenedit.php
r604953 r618883 89 89 90 90 // Setup version 91 $wpdb->query("INSERT INTO $this->table_tokenversions (id, tokenid, datecreated, lastupdated, siteid, blogid, tokenname,91 if($wpdb->query("INSERT INTO $this->table_tokenversions (id, tokenid, datecreated, lastupdated, siteid, blogid, tokenname, 92 92 htmlvalue, phpvalue, cssvalue, jsvalue, description, authorid, typeid, active, version) 93 93 SELECT null, id, datecreated, lastupdated, siteid, blogid, tokenname, htmlvalue, phpvalue, cssvalue, 94 94 jsvalue, description, authorid, typeid, active, version FROM $this->table_tokens 95 WHERE id='$tid' AND siteid='$this->siteid' AND blogid='$this->blogid' LIMIT 1;"); 95 WHERE id='$tid' AND siteid='$this->siteid' AND blogid='$this->blogid' LIMIT 1;")==false) 96 { 97 echo $wpdb->last_error(); 98 } 96 99 97 100 // Insert into database 98 $wpdb->query("UPDATE $this->table_tokens SET lastupdated = UNIX_TIMESTAMP(), tokenname = '$tokenname',101 if($wpdb->query("UPDATE $this->table_tokens SET lastupdated = UNIX_TIMESTAMP(), tokenname = '$tokenname', 99 102 htmlvalue = '$htmlvalue', phpvalue = '$phpvalue', cssvalue = '$cssvalue', jsvalue = '$jsvalue', 100 103 description = '$description', typeid = '$tokentype', 101 104 history = (SELECT REPLACE(history, '<!-- NEXT -->', '$history')), 102 105 version = version + 1 103 WHERE id='$tid' AND siteid='$this->siteid' AND blogid='$this->blogid';"); 106 WHERE id='$tid' AND siteid='$this->siteid' AND blogid='$this->blogid';")==false) 107 { 108 echo $wpdb->last_error(); 109 } 110 104 111 } 105 112 } -
token-manager/trunk/typeedit.php
r604953 r618883 79 79 80 80 // Setup version 81 $wpdb->query("INSERT INTO $this->table_typeversions (id, tokentypeid, datecreated, lastupdated, tokentype,81 if($wpdb->query("INSERT INTO $this->table_typeversions (id, tokentypeid, datecreated, lastupdated, tokentype, 82 82 tokendescription, siteid, blogid, authorid, orderof, active, version) 83 83 SELECT null, id, datecreated, lastupdated, tokentype, tokendescription, siteid, blogid, authorid, 84 84 orderof, active, version FROM $this->table_types 85 WHERE id='$tid' AND siteid='$this->siteid' AND blogid='$this->blogid' LIMIT 1;"); 85 WHERE id='$tid' AND siteid='$this->siteid' AND blogid='$this->blogid' LIMIT 1;")==false) 86 { 87 echo $wpdb->last_error(); 88 } 86 89 87 90 88 91 // Insert into database 89 $wpdb->query("UPDATE $this->table_types SET lastupdated = UNIX_TIMESTAMP(),92 if($wpdb->query("UPDATE $this->table_types SET lastupdated = UNIX_TIMESTAMP(), 90 93 tokentype = '$tokentype', tokendescription = '$tokendescription', 91 94 history = (SELECT REPLACE(history, '<!-- NEXT -->', '$history')), 92 95 version = version + 1 93 WHERE id = '$tid' AND siteid='$this->siteid' AND blogid='$this->blogid';"); 96 WHERE id = '$tid' AND siteid='$this->siteid' AND blogid='$this->blogid';")==false) 97 { 98 echo $wpdb->last_error(); 99 } 94 100 } 95 101 }
Note: See TracChangeset
for help on using the changeset viewer.