Version 3.1.4

This commit is contained in:
Neo committed 2025-12-19 00:32:22 -08:00
1 parent 1d4720f3e2
commit ae5c01cc78
2563 files changed
+283048 -240689

No files matched your search

@@ -1,19 +1,21 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.0.5
* IP.Board v3.1.4
* Recurse Tier Management
* Owner: Matt Mecham
* Last Updated: $Date: 2009-12-08 09:35:22 -0500 (Tue, 08 Dec 2009) $
* Last Updated: $Date: 2010-09-13 05:53:37 -0400 (Mon, 13 Sep 2010) $
* </pre>
*
* @author $Author: matt $
* @author $Author: terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @link http://www.iinvisionpower.com
* @license http://www.invisionpower.com/community/board/license.html
* @package IP.Board
* @link http://www.invisionpower.com
* @since 9th March 2005 11:03
* @version $Revision: 5531 $
* @version $Revision: 6854 $
*/
class recursiveTiers
@@ -146,6 +148,15 @@ class recursiveTiers
*/
protected $_sqlWhere = '';
/**
* SQL Fields: Select information
*
* @access protected
* @var string
*/
protected $_sqlSelect = '*';
/**
* Custom method to build the tiers (can prevent SQL query)
*
@@ -165,6 +176,7 @@ class recursiveTiers
* 'sqlFolderFlag' (the SQL table field that tells if the row is a folder or not *Optional)
* 'sqlTitle' (the SQL table field for the item title)
* 'sqlOrder' (the SQL table field(s) to order on or by)
* 'sqlSelect' (the SQL table select fields (* by default))
* 'sqlTable' (the SQL table name)
* 'sqlWhere' (Any additional 'where' information *Optional) ]
* @return void
@@ -189,6 +201,7 @@ class recursiveTiers
$this->_sqlOrder = isset( $settings['sqlOrder'] ) ? $settings['sqlOrder'] : '';
$this->_sqlTable = isset( $settings['sqlTable'] ) ? $settings['sqlTable'] : '';
$this->_sqlWhere = isset( $settings['sqlWhere'] ) ? $settings['sqlWhere'] : '';
$this->_sqlSelect = isset( $settings['sqlSelect'] ) ? $settings['sqlSelect'] : '*';
$this->_customBuildMethod = isset( $settings['customMethod'] ) ? $settings['customMethod'] : '';
/* Build the tiers */
@@ -256,7 +269,7 @@ class recursiveTiers
$this->_sqlOrder = $this->_sqlOrder ? $this->_sqlOrder : $this->_sqlTitle;
$this->DB->build( array( 'select' => '*',
$this->DB->build( array( 'select' => $this->_sqlSelect,
'where' => $this->_sqlWhere,
'from' => $this->_sqlTable,
'order' => $this->_sqlOrder ) );
@@ -465,7 +478,7 @@ class recursiveTiers
* @param array Array of IDs to skip
* @return array
*/
private function _fetchDirectoriesDropDown($root_id, $jump_string="", $depth_guide="",$selected_id, $skip_id=array())
private function _fetchDirectoriesDropDown($root_id, $jump_string="", $depth_guide="", $selected_id, $skip_id=array())
{
//-----------------------------------------
// Got an array?
@@ -498,7 +511,7 @@ class recursiveTiers
$jump_string .= "<option value=\"{$item_data[$this->_sqlPrimaryID]}\"".$selected.">&nbsp;&nbsp;&#039;".$depth_guide." ".$item_data[$this->_sqlTitle]."</option>\n";
}
$jump_string = $this->_fetchDirectoriesDropDown( $item_data[$this->_sqlPrimaryID], $jump_string, $depth_guide . '--', $html, $selected_id, $skip_id );
$jump_string = $this->_fetchDirectoriesDropDown( $item_data[$this->_sqlPrimaryID], $jump_string, $depth_guide . '--', $selected_id, $skip_id );
}
}
@@ -607,7 +620,7 @@ class recursiveTiers
* @param array Array of IDs to skip
* @return string
*/
private function _fetchAllsItemDropDown($root_id, $jump_string="", $depth_guide="",$selected_id, $skip_id=array())
private function _fetchAllsItemDropDown($root_id, $jump_string="", $depth_guide="", $selected_id, $skip_id=array())
{
if ( is_array( $this->_itemCache[ $root_id ] ) )
{
@@ -636,7 +649,7 @@ class recursiveTiers
$jump_string .= "<option value=\"{$item_data[$this->_sqlPrimaryID]}\"".$selected.">&nbsp;&nbsp;&#0124;".$depth_guide." ".$item_data[$this->_sqlTitle]."</option>\n";
$jump_string = $this->_fetchAllsItemDropDown( $item_data[$this->_sqlPrimaryID], $jump_string, $depth_guide . '--', $html, $selected_id, $skip_id );
$jump_string = $this->_fetchAllsItemDropDown( $item_data[$this->_sqlPrimaryID], $jump_string, $depth_guide . '--', $selected_id, $skip_id );
}
}