Plugin Directory

Changeset 1513347


Ignore:
Timestamp:
10/12/2016 12:16:42 PM (9 years ago)
Author:
manojtd
Message:

Committing V2.80: Compatibility with WP4.6. Many accumulated fixes and changes. Releasing the sunset version. [Oct 12, 2016]

Location:
php-validator-lite/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • php-validator-lite/trunk/EZCom.php

    r1344923 r1513347  
    243243
    244244    static function __($s) {
    245       if (!empty(self::$options[$s])) {
     245      if (isset(self::$options[$s])) {
    246246        return self::$options[$s];
    247247      }
     
    390390    }
    391391
     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
    392401    static function updateMetaData($table, $pk, $name, $value) {
    393402      global $db;
     
    403412            $multiRow = array();
    404413            $n = substr($name, -1);
    405             list($p, $t) = self::decodePT1($value, $n);
     414            list($p, $t) = static::decodePT1($value, $n);
    406415            $multiRow[] = array("name" => "p$n", "value" => $p, 'product_id' => $pk);
    407416            $multiRow[] = array("name" => "t$n", "value" => $t, 'product_id' => $pk);
     
    601610          $dataSource = 'data-source="' . self::mkSelectSource($options) . '"';
    602611          break;
    603         case 'file': // special case, return from here
     612        case 'file':
    604613          $type = '';
    605614          $dataTpl = '';
    606615          $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'>";
    608620          $tag = "span";
    609621          break;
  • php-validator-lite/trunk/EzPlugin.php

    r1359287 r1513347  
    4545        }
    4646      }
    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')) {
    4854        $info = wp_get_sites();
    4955        if (!empty($info[1]) && $info[1]['path'] == "/") {
  • php-validator-lite/trunk/admin/OptionTable.php

    r1296999 r1513347  
    8989          },
    9090          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});
    9296          },
    9397          error: function (a) {
  • php-validator-lite/trunk/admin/js/charisma.js

    r1296999 r1513347  
    208208  var longHref = link.href;
    209209  var root = location.protocol + '//' + location.host;
    210   return longHref.indexOf(root) >= 0;
     210  return longHref.indexOf(root) >= 0 && !longHref.match(/[?&]target=/);
    211211}
    212212
     
    335335      pageLength: pageLength,
    336336      "aaSorting": []
     337    }).on( 'draw.dt', function () {
     338      if (isInWP) {
     339        $(this).find('a').not("#standAloneMode, #shop, .popup, .endpoint")
     340                .each(rewriteHref);
     341      }
    337342    });
    338343    $('.data-table-longer').show().dataTable({
    339344      pageLength: 20,
    340345      aaSorting: []
     346    }).on( 'draw.dt', function () {
     347      if (isInWP) {
     348        $(this).find('a').not("#standAloneMode, #shop, .popup, .endpoint")
     349                .each(rewriteHref);
     350      }
    341351    });
    342352  }
     
    576586  if (!re.test(s)) {
    577587    return "Bad URL";
     588  }
     589}
     590
     591function 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.";
    578596  }
    579597}
     
    594612  url: function (s) {
    595613    return validate_url(s);
     614  },
     615  filename: function (s) {
     616    return validate_filename(s);
    596617  }
    597618};
  • php-validator-lite/trunk/php-validator.php

    r1392546 r1513347  
    55  Plugin URI: http://www.thulasidas.com/packages/phpvalidator
    66  Description: A PHP pseaudo complier, with a powerful and modern admin interface.
    7   Version: 2.70
     7  Version: 2.80
    88  Author: Manoj Thulasidas
    99  Author URI: http://www.thulasidas.com
  • php-validator-lite/trunk/readme.txt

    r1392546 r1513347  
    44Tags: compiler, developer tool, debug, plugin checker, phc, hhvm, phalanger, hip hop
    55Requires at least: 4.2
    6 Tested up to: 4.5
    7 Stable tag: 2.70
     6Tested up to: 4.6
     7Stable tag: 2.80
    88License: GPL2 or later
    99
     
    1212== Description ==
    1313
     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
    1419*PHP Pseudo Compiler* is a developer tool. It scans the file you specify and determines whether you have undefined functions or methods.
    1520
    1621Why 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.
    1722
    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).
    2126
    2227 **Now available in your language using Google Translate.**
     
    4247== Upgrade Notice ==
    4348
    44 Compatibility with WP4.5.
     49Compatibility with WP4.6. Many accumulated fixes and changes. Releasing the sunset version.
    4550
    4651== Screenshots ==
     
    104109== Change Log ==
    105110
     111* V2.80: Compatibility with WP4.6. Many accumulated fixes and changes. Releasing the sunset version. [Oct 12, 2016]
    106112* V2.70: Compatibility with WP4.5. [Apr 12, 2016]
    107113* 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.