Plugin Directory

Changeset 877131


Ignore:
Timestamp:
03/18/2014 12:58:47 PM (12 years ago)
Author:
fabifott
Message:

WP-Filebase 0.3.0.04

  • Fixed a conflict with NexGEN Gallery Plugin by disabling its resource manager output buffer
  • Improved security: direct access of plugin files is blocked if plugin is disabled
Location:
wp-filebase
Files:
287 added
8 edited

Legend:

Unmodified
Added
Removed
  • wp-filebase/trunk/classes/Output.php

    r876786 r877131  
    350350//<![CDATA[
    351351function wpfb_initfb<?php echo $jss ?>() {  jQuery("#<?php echo $id ?>").treeview({url: "<?php echo WPFB_PLUGIN_URI."wpfb-ajax.php" ?>",
    352 ajax:{data:<?php echo json_encode($ajax_data); ?>,type:"post",complete:function(){if(typeof(wpfb_setupLinks)=='function')wpfb_setupLinks();}},
     352ajax:{data:<?php echo json_encode($ajax_data); ?>,type:"post",error:function(x,status,error){alert(error);},complete:function(x,status){if(typeof(wpfb_setupLinks)=='function')wpfb_setupLinks();}},
    353353animated: "medium"});
    354354}
  • wp-filebase/trunk/editor_plugin.php

    r876786 r877131  
    2424
    2525require_once(dirname(dirname(dirname(dirname(__FILE__)))).'/wp-load.php');
     26
     27// check if WP-Filebase is active
     28if(!in_array(basename(untrailingslashit(dirname(__FILE__))).'/wp-filebase.php',get_option('active_plugins')))
     29    wp_die('WP-Filebase not active.<!-- FATAL ERROR: WP-Filebase DISABLED -->');
     30
     31
    2632require_once(ABSPATH . 'wp-admin/includes/admin.php');
    2733
     
    2935require_once('wp-filebase.php');
    3036
    31 if(!function_exists('get_current_screen')) {
    32     function get_current_screen() { return null; }
    33 }
    34 if(!function_exists('add_meta_box')) {
    35     function add_meta_box() { return null; }
    36 }
     37if(!function_exists('get_current_screen')) {    function get_current_screen() { return null; } }
     38if(!function_exists('add_meta_box')) {  function add_meta_box() { return null; } }
    3739
    3840auth_redirect();
  • wp-filebase/trunk/readme.txt

    r876786 r877131  
    55Requires at least: 3.1
    66Tested up to: 3.8.1
    7 Stable tag: 0.3.0.03
     7Stable tag: 0.3.0.04
    88
    99Adds a powerful download manager including file categories, downloads counter, widgets, sorted file lists and more to your WordPress blog.
     
    117117
    118118== Changelog ==
     119
     120= 0.3.0.04 =
     121* Fixed a conflict with NexGEN Gallery Plugin by disabling its resource manager output buffer
     122* Improved security: direct access of plugin files is blocked if plugin is disabled
    119123
    120124= 0.3.0.03 =
  • wp-filebase/trunk/tpl-preview.php

    r876786 r877131  
    11<?php
     2
     3if(empty($_REQUEST['type']) || empty( $_REQUEST['tag']))
     4    exit;
    25
    36require_once('wpfb-load.php');
     
    2932if($list) {
    3033    $tpl = WPFB_ListTpl::Get($tag);
     34    if(is_null($tpl))
     35        exit;
     36   
    3137    echo do_shortcode($tpl->Sample(WPFB_AdminGuiTpls::$sample_cat, WPFB_AdminGuiTpls::$sample_file));
    3238}
     
    3440{
    3541    $tpl_src = WPFB_Core::GetTpls($type, $tag);
     42    if(!is_string($tpl_src) || empty($tpl_src))
     43        exit;
     44   
    3645    $table_found = (strpos($tpl_src, '<table') !== false);
    3746    if(!$list && !$table_found && strpos($tpl_src, '<tr') !== false) {
  • wp-filebase/trunk/wp-filebase.php

    r876786 r877131  
    55Description: Adds a powerful downloads manager supporting file categories, download counter, widgets, sorted file lists and more to your WordPress blog.
    66Author: Fabian Schlieper
    7 Version: 0.3.0.03
     7Version: 0.3.0.04
    88Author URI: http://wpfilebase.com/
    99*/
     
    1212{
    1313    define('WPFB', 'wpfb');
    14     define('WPFB_VERSION', '0.3.0.03');
     14    define('WPFB_VERSION', '0.3.0.04');
    1515    define('WPFB_PLUGIN_ROOT', str_replace('\\','/',dirname(__FILE__)).'/');
    1616    if(!defined('ABSPATH')) {
     
    9696   
    9797    // FIX: setup the OB to truncate any other output when downloading
    98     if(!empty($_GET['wpfb_dl']))
     98    if(!empty($_GET['wpfb_dl'])) {
     99        define('NGG_DISABLE_RESOURCE_MANAGER', true); // NexGen Gallery
    99100        ob_start();
     101    }
    100102}
    101103
  • wp-filebase/trunk/wp-filebase_css.php

    r876786 r877131  
    11<?php
    2 // THIS FILE IS DEPRECATED!!
     2
     3// ##########################################################
     4// ##########################################################
     5// #############    THIS FILE IS DEPRECATED!!    ############
     6// ##########################################################
     7// ##########################################################
     8
    39
    410// ob_start();
     
    814if(empty($_GET['rp'])) // if rel path not set, need to load whole WP stuff to get to path to custom CSS!
    915    require_once(dirname(__FILE__).'/../../../wp-load.php');
     16
     17if(!in_array(basename(untrailingslashit(dirname(__FILE__))).'/wp-filebase.php',get_option('active_plugins')))
     18    die('/*disabled*/');
    1019
    1120require_once(dirname(__FILE__).'/wp-filebase.php'); // this only loads some wp-filebase stuff, NOT WP!
  • wp-filebase/trunk/wpfb-load.php

    r876786 r877131  
    22
    33define('SUPPRESS_LOADING_OUTPUT', empty($_REQUEST['noob']));
     4define('NGG_DISABLE_RESOURCE_MANAGER', true); // NexGen Gallery: ne resource manager
    45
    56error_reporting(0);
     
    4041
    4142
    42 if(SUPPRESS_LOADING_OUTPUT && ob_get_level() > 1)
     43if(SUPPRESS_LOADING_OUTPUT)
    4344    @ob_end_clean();
    4445
     
    6263}
    6364
     65if(!in_array(basename(untrailingslashit(dirname(__FILE__))).'/wp-filebase.php',get_option('active_plugins')))
     66    wp_die('WP-Filebase not active.<!-- FATAL ERROR: WP-Filebase DISABLED -->');
  • wp-filebase/trunk/wpfb-postbrowser.php

    r599590 r877131  
    11<?php
    22require_once(dirname(__FILE__).'/../../../wp-load.php');
    3 if(!current_user_can('edit_posts'))
     3if(!defined('WPFB') || !current_user_can('edit_posts'))
    44    wp_die(__('Cheatin&#8217; uh?'));
    55?>
Note: See TracChangeset for help on using the changeset viewer.