Changeset 1513347
- Timestamp:
- 10/12/2016 12:16:42 PM (9 years ago)
- Location:
- php-validator-lite/trunk
- Files:
-
- 6 edited
-
EZCom.php (modified) (4 diffs)
-
EzPlugin.php (modified) (1 diff)
-
admin/OptionTable.php (modified) (1 diff)
-
admin/js/charisma.js (modified) (4 diffs)
-
php-validator.php (modified) (1 diff)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
php-validator-lite/trunk/EZCom.php
r1344923 r1513347 243 243 244 244 static function __($s) { 245 if ( !empty(self::$options[$s])) {245 if (isset(self::$options[$s])) { 246 246 return self::$options[$s]; 247 247 } … … 390 390 } 391 391 392 static function validate_filename($s) { 393 if (preg_match("[^/?*:;{}\\]+\\.[^/?*:;{}\\]+", $s)) { 394 return "Illegal characters in the file name. Please try again."; 395 } 396 else { 397 return true; 398 } 399 } 400 392 401 static function updateMetaData($table, $pk, $name, $value) { 393 402 global $db; … … 403 412 $multiRow = array(); 404 413 $n = substr($name, -1); 405 list($p, $t) = s elf::decodePT1($value, $n);414 list($p, $t) = static::decodePT1($value, $n); 406 415 $multiRow[] = array("name" => "p$n", "value" => $p, 'product_id' => $pk); 407 416 $multiRow[] = array("name" => "t$n", "value" => $t, 'product_id' => $pk); … … 601 610 $dataSource = 'data-source="' . self::mkSelectSource($options) . '"'; 602 611 break; 603 case 'file': // special case, return from here612 case 'file': 604 613 $type = ''; 605 614 $dataTpl = ''; 606 615 $class .= 'red'; 607 $value = "<input data-pk='$pk' id='fileinput' type='file' class='file' data-show-preview='false' data-show-upload='false'>"; 616 if (!empty($value)) { 617 $value = "<span class='success'>File is already uploaded. Use the Browse button below to update it.</span><br>"; 618 } 619 $value .= "<input data-pk='$pk' id='fileinput' type='file' class='file' data-show-preview='false' data-show-upload='false'>"; 608 620 $tag = "span"; 609 621 break; -
php-validator-lite/trunk/EzPlugin.php
r1359287 r1513347 45 45 } 46 46 } 47 if (function_exists('wp_get_sites')) { 47 if (function_exists('get_sites')) { 48 $info = get_sites(); 49 if (!empty($info[1]) && $info[1]->path == "/") { 50 $siteUrl = site_url(); 51 } 52 } 53 else if (function_exists('wp_get_sites')) { 48 54 $info = wp_get_sites(); 49 55 if (!empty($info[1]) && $info[1]['path'] == "/") { -
php-validator-lite/trunk/admin/OptionTable.php
r1296999 r1513347 89 89 }, 90 90 success: function (images) { 91 bootbox.alert({title: "Click on an image to insert it", message: images}); 91 var msg = images + " <br><a href='assets-upload.php'>Upload Images</a>"; 92 if (isInWP) { 93 msg = images + " <br><a href='assets-upload.ezp'>Upload Images</a>"; 94 } 95 bootbox.alert({title: "Click on an image to insert it", message: msg}); 92 96 }, 93 97 error: function (a) { -
php-validator-lite/trunk/admin/js/charisma.js
r1296999 r1513347 208 208 var longHref = link.href; 209 209 var root = location.protocol + '//' + location.host; 210 return longHref.indexOf(root) >= 0 ;210 return longHref.indexOf(root) >= 0 && !longHref.match(/[?&]target=/); 211 211 } 212 212 … … 335 335 pageLength: pageLength, 336 336 "aaSorting": [] 337 }).on( 'draw.dt', function () { 338 if (isInWP) { 339 $(this).find('a').not("#standAloneMode, #shop, .popup, .endpoint") 340 .each(rewriteHref); 341 } 337 342 }); 338 343 $('.data-table-longer').show().dataTable({ 339 344 pageLength: 20, 340 345 aaSorting: [] 346 }).on( 'draw.dt', function () { 347 if (isInWP) { 348 $(this).find('a').not("#standAloneMode, #shop, .popup, .endpoint") 349 .each(rewriteHref); 350 } 341 351 }); 342 352 } … … 576 586 if (!re.test(s)) { 577 587 return "Bad URL"; 588 } 589 } 590 591 function validate_filename(s) { 592 var invalid=/^[^\\/:\*\?"<>\| ]+$/; 593 var ext = s.replace(/^.*\./, ''); 594 if (ext === s || !invalid.test(s)) { 595 return "Please use the format file-name.ext. No spaces. Do not forget the right extension."; 578 596 } 579 597 } … … 594 612 url: function (s) { 595 613 return validate_url(s); 614 }, 615 filename: function (s) { 616 return validate_filename(s); 596 617 } 597 618 }; -
php-validator-lite/trunk/php-validator.php
r1392546 r1513347 5 5 Plugin URI: http://www.thulasidas.com/packages/phpvalidator 6 6 Description: A PHP pseaudo complier, with a powerful and modern admin interface. 7 Version: 2. 707 Version: 2.80 8 8 Author: Manoj Thulasidas 9 9 Author URI: http://www.thulasidas.com -
php-validator-lite/trunk/readme.txt
r1392546 r1513347 4 4 Tags: compiler, developer tool, debug, plugin checker, phc, hhvm, phalanger, hip hop 5 5 Requires at least: 4.2 6 Tested up to: 4. 57 Stable tag: 2. 706 Tested up to: 4.6 7 Stable tag: 2.80 8 8 License: GPL2 or later 9 9 … … 12 12 == Description == 13 13 14 > <strong>Sunset Edition</strong><br> 15 > This update of the plugin is the last publicly released version. We do not expect to make any serious changes or add new features to it from now on. 16 > 17 > We may not always be able to provide prompt support for this plugin on the WordPress.org forums. If you would like to have professional support or extra/custom features, consider buying the [Pro version](http://buy.thulasidas.com/php-validator "Pseudo-compiler plugin for PHP to find undefined functions and methods, $4.95"). 18 14 19 *PHP Pseudo Compiler* is a developer tool. It scans the file you specify and determines whether you have undefined functions or methods. 15 20 16 21 Why not just run the PHP code, you say? Well, PHP is not a compiled language. It looks for functions during runtime. So if you have a segment of code not covered by your normal testing, and you have an undefined function in there, you will never know of the undefined function until it hits production when the particular conditions activating that particular code segment are met. This tool will prove especially useful during large scale refactoring. 17 22 18 = Live Demo = 19 20 **PHP Pseudo Compiler has a beautifully designed admin interface, which is feature-rich, user-friendly and functional. Please visit this fully operational [live demo site](http://demo.thulasidas.com/php-validator "Play with PHP Pseudo Compiler Pro") to see it in action, (and to check your code without installing it locally).** 23 > Live Demo 24 > 25 > PHP Pseudo Compiler has a beautifully designed admin interface, which is feature-rich, user-friendly and functional. Please visit this fully operational [live demo site](http://demo.thulasidas.com/php-validator "Play with PHP Pseudo Compiler Pro") to see it in action, (and to check your code without installing it locally). 21 26 22 27 **Now available in your language using Google Translate.** … … 42 47 == Upgrade Notice == 43 48 44 Compatibility with WP4. 5.49 Compatibility with WP4.6. Many accumulated fixes and changes. Releasing the sunset version. 45 50 46 51 == Screenshots == … … 104 109 == Change Log == 105 110 111 * V2.80: Compatibility with WP4.6. Many accumulated fixes and changes. Releasing the sunset version. [Oct 12, 2016] 106 112 * V2.70: Compatibility with WP4.5. [Apr 12, 2016] 107 113 * V2.66: Improvements in the Google Translator interface. Compatibility with multisite installaton of subdomain type. [Feb 27, 2016]
Note: See TracChangeset
for help on using the changeset viewer.