Plugin Directory

Changeset 631304


Ignore:
Timestamp:
11/28/2012 03:09:59 PM (13 years ago)
Author:
fabifott
Message:

WP-Filebase 0.2.9.27

  • Fixed AJAX tree not showing
Location:
wp-filebase
Files:
270 added
1 deleted
6 edited

Legend:

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

    r630203 r631304  
    274274    'file_license'          => __('License', WPFB),
    275275   
    276     'file_category'         => __('The category name', WPFB),   
     276    'file_category'         => __('The category name', WPFB),
     277   
    277278   
    278279    'file_thumbnail'        => __('Name of the thumbnail file', WPFB), 
  • wp-filebase/trunk/classes/Category.php

    r630203 r631304  
    100100    function NotifyFileAdded($file)
    101101    {   
    102         if($this->IsAncestorOf($file))
    103         {
     102        //if($this->IsAncestorOf($file)) // Removed for secondary categories!
     103        //{
    104104            if($file->file_category == $this->cat_id) $this->cat_num_files++;
    105105            $this->cat_num_files_total++;
    106106            if(!$this->locked) $this->DBSave();
    107         }
     107        //}
    108108       
    109109        $parent = $this->GetParent();
     
    147147    function HasChildren($cats_only=false)
    148148    {
    149         //return ($cats_only ? (count($c->GetChildCats())>0) : ($c->cat_num_files_total > 0)), // FIXME: does not work with secondary categories!
    150         return true;
     149        return $cats_only ? (count($this->GetChildCats())>0) : ($this->cat_num_files_total > 0);
    151150    }
    152151   
  • wp-filebase/trunk/classes/Item.php

    r630203 r631304  
    358358        if($this->is_file) return array($this->GetId() => $this);
    359359        if(empty($sort_sql)) $sort_sql = "ORDER BY file_id ASC";
    360         $files = WPFB_File::GetFiles('WHERE file_category = '.(int)$this->GetId()." $sort_sql");
     360        // if recursive, include secondary category links with GetSqlCatWhereStr
     361        $files = WPFB_File::GetFiles('WHERE '.($recursive ? WPFB_File::GetSqlCatWhereStr($this->cat_id) : '(file_category = '.$this->cat_id.')')." $sort_sql");
    361362        if($recursive) {
    362363            $cats = $this->GetChildCats(true);
  • wp-filebase/trunk/readme.txt

    r630203 r631304  
    55Requires at least: 3.1
    66Tested up to: 3.4.2
    7 Stable tag: 0.2.9.26
     7Stable tag: 0.2.9.27
    88
    99Adds a powerful download manager including file categories, downloads counter, widgets, sorted file lists and more to your WordPress blog.
     
    5858*   Secondary Categories
    5959*   Extended Permissions
     60*   File Passwords
    6061*   Embedded Upload Forms
    6162*   Improved Syncing algorithm
    62 *   Dropbox and FTP sync
     63*   Dropbox, Amazon S3 and FTP sync
    6364
    6465== Installation ==
     
    112113
    113114== Changelog ==
     115
     116= 0.2.9.27 =
     117* Fixed AJAX tree not showing
    114118
    115119= 0.2.9.26 =
  • wp-filebase/trunk/wp-filebase.php

    r630203 r631304  
    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.2.9.26
     7Version: 0.2.9.27
    88Author URI: http://fabi.me/
    99*/
     
    1212{
    1313    define('WPFB', 'wpfb');
    14     define('WPFB_VERSION', '0.2.9.26');
     14    define('WPFB_VERSION', '0.2.9.27');
    1515    define('WPFB_PLUGIN_ROOT', str_replace('\\','/',dirname(__FILE__)).'/');
    1616    if(!defined('ABSPATH')) {
  • wp-filebase/trunk/wpfb-ajax.php

    r630203 r631304  
    8282                                    ('<a href="javascript:'.sprintf($onselect,$c->cat_id,str_replace('\'','\\\'', htmlspecialchars(stripslashes($c->cat_name)))).'">'.esc_html($c->GetTitle(24)).'</a>')
    8383                                   :($filesel ? (esc_html($c->cat_name)." ($c->cat_num_files / $c->cat_num_files_total)") : $c->GenTpl2('filebrowser', false)),
    84                     'hasChildren'=>$cat->HasChildren($catsel),
     84                    'hasChildren'=>$c->HasChildren($catsel),
    8585                    'classes'=>($filesel||$catsel)?'folder':null);
    8686        }
Note: See TracChangeset for help on using the changeset viewer.