Plugin Directory

Changeset 685270


Ignore:
Timestamp:
03/21/2013 04:00:16 PM (13 years ago)
Author:
bmsterling
Message:

Add wp_die to prevent users from trying to install without wurfl.zip

Location:
wurfl-capabilities/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wurfl-capabilities/trunk/README.txt

    r684266 r685270  
    55Requires at least: 3.5
    66Tested up to: 3.5.1
    7 Stable tag: 0.3.2
     7Stable tag: 0.3.3
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
    1010
    11 Using WURFL to expose capabilities of your users browser.
     11Using WURFL to expose capabilities of your users browser.  **FTP access is needed to upload the wurfl database**
    1212
    1313== Description ==
    1414
    15 Using WURFL to expose capabilities of your users browser. See <a href=\"http://wurfl.sourceforge.net/help\_doc.php\" target=\"\_blank\">http://wurfl.sourceforge.net/help_doc.php</a> for full list of capability checking.
     15Using WURFL to expose capabilities of your users browser. See <http://wurfl.sourceforge.net/help_doc.php> for full list of capability checking. **FTP access is needed to upload the wurfl database**
    1616
    1717Some initial methods that are exposed are:
     
    2525*   getCapability (points to the WURFL API method of the same name, pass in the param of capability you\'d like to get.  See the help doc link for those param names)
    2626
    27 <div>
    28   <strong>Example usage</strong>
    29 </div>
    3027
    31 <div>
    32   `$wurflcap->is_touch();`
    33 </div>
     28<strong>Example usage:</strong> `$wurflcap->is_touch();`
    3429
    35 <div>
    36   <br />
    37 </div>
    3830
    39 <div>
    40   Please be aware of the licensing at <a href=\"http://wurfl.sourceforge.net/license.php\" target=\"_blank\">http://wurfl.sourceforge.net/license.php</a>
    41 </div>
     31If something fails, please provide step by step instructions on how to reproduce so that I may address the issue in a timely manner.
     32
     33
     34Please be aware of the licensing at <a href=\"http://wurfl.sourceforge.net/license.php\" target=\"_blank\">http://wurfl.sourceforge.net/license.php</a>
    4235
    4336*WURFL is the registered trademark of ScientiaMobile, Inc., Reston, VA, USA*
     
    4841
    49421.  Download and extract the plugin to your plugins directory (wp-content/plugins)
    50 2.  Download the most recent WURFL database from <a href=\"http://sourceforge.net/projects/wurfl/files/WURFL/\" target=\"_blank\">http://sourceforge.net/projects/wurfl/files/WURFL/</a>
    51 3.  Place the downloaded zip file in the WURFL Capabilities plugin folder
     432.  Download the most recent WURFL database from <a href=\"http://sourceforge.net/projects/wurfl/files/WURFL/\" target=\"_blank\">http://sourceforge.net/projects/wurfl/files/WURFL/</a>
     443.  Place the downloaded zip file in the WURFL Capabilities plugin's folder
    52454.  Rename the zip file to **wurfl.zip**
    53465.  Active the plugin. Note: activation may, depending on your server, take about a minute, do not refresh or close your browser. The WURFL API is caching the data based off the XML that is in zip file.
  • wurfl-capabilities/trunk/WURFLCap.php

    r684254 r685270  
    3131    public function activate( $network_wide ) {
    3232        $new_file_path = WURFL_BASE_DIR;
     33       
     34        if (!file_exists(WURFL_PLUGIN_DIR.'/wurfl.zip')){
     35            wp_die("wurfl.zip file not found");
     36        }
    3337
    3438        if (!file_exists($new_file_path)) {
    35             if (!mkdir($new_file_path, 0755, true))
    36                 return array(
    37                     'error' => 'Permission denied, make sure you have write permission to wp-content folder.'
    38                 );
     39            if (!mkdir($new_file_path, 0755, true)){
     40                wp_die("Permission denied, make sure you have write permission to wp-content folder.");
     41                // return array(
     42                    // 'error' => 'Permission denied, make sure you have write permission to wp-content folder.'
     43                // );
     44            }
    3945        }
    4046       
     
    4349       
    4450        if (!mkdir($persistence, 0755, true)) {
    45             return array(
    46                 'error' => 'Permission denied, make sure you have write permission to '.$new_file_path.' folder.'
    47             );
     51            wp_die('Permission denied, make sure you have write permission to '.$new_file_path.' folder.');
     52            // return array(
     53                // 'error' => 'Permission denied, make sure you have write permission to '.$new_file_path.' folder.'
     54            // );
    4855        }
    4956       
    5057        if (!mkdir($cache, 0755, true)) {
    51             return array(
    52                 'error' => 'Permission denied, make sure you have write permission to '.$new_file_path.' folder.'
    53             );
     58            wp_die('Permission denied, make sure you have write permission to '.$new_file_path.' folder.');
     59            // return array(
     60                // 'error' => 'Permission denied, make sure you have write permission to '.$new_file_path.' folder.'
     61            // );
    5462        }
    5563       
  • wurfl-capabilities/trunk/wurfl-capabilities.php

    r684266 r685270  
    55    Plugin URI: https://github.com/bmsterling/WURFL-Capabilities
    66    Description: Using WURFL to expose capabilities of your users browser.
    7     Version: 0.3.2
     7    Version: 0.3.3
    88    Author: Benjamin Sterling
    99    Author URI: http://www.benjaminsterling.com
Note: See TracChangeset for help on using the changeset viewer.