Plugin Directory

Changeset 1193008


Ignore:
Timestamp:
07/06/2015 02:34:31 AM (11 years ago)
Author:
binarystash01
Message:

-Added check for 'exec'

Location:
wp-booklet/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • wp-booklet/trunk/classes/class-wp-booklet2-booklet.php

    r1172736 r1193008  
    2020
    2121    protected $_pages;
    22 
     22   
     23    /**
     24     * The constructor
     25     *
     26     * @param int $id - booklet ID
     27     *
     28     * @return WP_Booklet2_Booklet
     29     */
    2330    function __construct($id) {
    2431       
  • wp-booklet/trunk/classes/class-wp-booklet2-command.php

    r1166511 r1193008  
    1212     * @param $modifiers string - command arguments/options
    1313     *
    14      * @return void
     14     * @return WP_Booklet2_Command
    1515     */
    1616    function __construct( $command, $modifiers) {
     
    1818        $this->_command = $command;
    1919        $this->_modifiers = $modifiers;
    20 
     20       
     21        if ( !$this->_can_run_exec() ) {
     22            throw new Exception("Running external programs is disabled");
     23        }
     24       
    2125        if ( !$this->_command_exists() ) {
    2226            throw new Exception("Command or program doesn't exist");
     
    6064        return $result;
    6165    }
     66   
     67    /**
     68     * Checks if 'exec' is executable
     69     *
     70     * @return bool;
     71     */
     72    protected function _can_run_exec() {
     73        return  function_exists('exec') &&
     74                !in_array('exec', array_map('trim', explode(', ', ini_get('disable_functions')))) &&
     75                strtolower(ini_get('safe_mode')) != 1;
     76    }
    6277
    6378}
  • wp-booklet/trunk/classes/class-wp-booklet2-importer.php

    r1172736 r1193008  
    1010     * @param int $limit - (optional) number of booklets to be imported each time the function runs. Defaults to 1
    1111     *
    12      * @return void
     12     * @return WP_Booklet2_Importer
    1313     */
    1414    function __construct($limit=1) {
  • wp-booklet/trunk/classes/class-wp-booklet2-page.php

    r1166511 r1193008  
    88
    99    protected $_meta;
    10 
     10   
     11    /**
     12     * The constructor
     13     *
     14     * @param int $id - the page ID
     15     *
     16     * @return WP_Booklet2_Page
     17     */
    1118    function __construct($id) {
    1219       
  • wp-booklet/trunk/classes/class-wp-booklet2-pdf.php

    r1166511 r1193008  
    1010     * @param $file string - path to the PDF file
    1111     *
    12      * @return void
     12     * @return WP_Booklet2_PDF
    1313     */
    1414    function __construct( $file ) {
  • wp-booklet/trunk/classes/class-wp-booklet2-theme-manager.php

    r1179381 r1193008  
    66    private $_default_theme;
    77   
     8    /**
     9     * The constructor
     10     *
     11     * @return WP_Booklet2_Theme_Manager
     12     */
    813    function __construct() {
    914       
  • wp-booklet/trunk/classes/class-wp-booklet2-theme.php

    r1179381 r1193008  
    77    private $_url;
    88   
     9    /**
     10     * The constructor
     11     *
     12     * @param string $name - the name of the theme
     13     *
     14     * @return WP_Booklet2_Theme
     15     */
    916    function __construct($name) {
    1017        $this->_name = $name;   
  • wp-booklet/trunk/readme.txt

    r1188386 r1193008  
    55Requires at least: 3.9
    66Tested up to: 4.2.2
    7 Stable tag: 2.0.7
     7Stable tag: 2.0.8
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8787== Changelog ==
    8888
     89= 2.0.8 =
     90* Added checking for 'exec'
     91
    8992= 2.0.7 =
    9093* Popups are now scrollable on small screens
     
    170173== Upgrade Notice ==
    171174
     175= 2.0.8 =
     176* Added checking for 'exec'
     177
    172178= 2.0.7 =
    173179* Popups are now scrollable on small screens
  • wp-booklet/trunk/wp-booklet.php

    r1188386 r1193008  
    33 * Plugin Name: WP Booklet
    44 * Description: Allows creation of flip books using the jQuery Booklet plugin. Successor to WP Booklet 1.x
    5  * Version: 2.0.7
     5 * Version: 2.0.8
    66 * Author: BinaryStash
    77 * Author URI:  http://www.binarystash.net
Note: See TracChangeset for help on using the changeset viewer.