Version 2.3.6

This commit is contained in:
Neo committed 2025-12-19 00:26:08 -08:00
1 parent a3bb603c96
commit 19b38c7c74
764 files changed
+143731 -118164

No files matched your search

+58 -77
View File
@@ -2,27 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Monday 05th of March 2007 10:10:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-10-26 14:14:27 -0500 (Thu, 26 Oct 2006) $
| > $Revision: 679 $
| > $Date: 2007-07-13 13:51:38 -0400 (Fri, 13 Jul 2007) $
| > $Revision: 1087 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
@@ -34,25 +24,25 @@
*/
/**
* API: Êîìïîíåíòîâ ôîðóìà
* API: Components
*
* ÏÐÈÌÅÐ ÈÑÏÎËÜÇÎÂÀÍÈß
* EXAMPLE USAGE
* <code>
* //-- ÎÁÍÎÂËÅÍÈÅ ÑÓÙÅÑÒÂÓÞÙÅÃÎ ÊÎÌÏÎÍÅÍÒÀ --//
* //-- UPDATE EXISTING ROW --//
* $api = new api_components();
* # Îïöèîíàëüíî - åñëè $ipsclass íå ïåðåäàåòñÿ â îáúåêò, îí áóäåò èíèöèàëèçèðîâàí ñàìîñòîÿòåëüíî
* # Optional - if $ipsclass is not passed, it'll init
* $api->ipsclass =& $this->ipsclass;
* $api->api_init();
* $update = array (
* 'com_version' => '1.3',
* 'com_menu_data' => array( 0 => array(
* 'menu_text' => 'Íàçâàíèå ïóíêòà ìåíþ',
* 'menu_text' => 'Link text',
* 'menu_url' => 'code=showme',
* 'menu_redirect' => 0,
* 'menu_permbit' => 'keyhere',
* 'menu_permlang' => 'Ïîçâîëÿåò ñîçäàòü ÷òî-òî' ),
* 'menu_permlang' => 'Allow CREATE Something' ),
* 1 => array(
* 'menu_text' => 'Íàçâàíèå ïóíêòà ìåíþ 2',
* 'menu_text' => 'Link text 2',
* 'menu_url' => 'section=tools&act=op&code=showme2',
* 'menu_redirect' => 1,
* 'menu_permbit' => 'add',
@@ -60,23 +50,23 @@
* ) );
*
* $api->acp_component_update( 'blog', $update );
* //-- ÂÊËÞ×ÅÍÈÅ ÊÎÌÏÎÍÅÍÒÀ --//
* //-- ENABLE A COMPONENT --//
* $api->acp_component_enable( 'blog' );
* </code>
*
* ÏÎËß ÊÎÌÏÎÍÅÍÒ (ÑÒÐÓÊÒÓÐÀ ÊÎÌÏÎÍÅÍÒ)
* COMPONENT FIELDS
* <code>
* 'com_title' = Íàçâàíèå êîìïîíåíòà
* 'com_author' = Àâòîð êîìïîíåíòà
* 'com_version' = Âåðñèÿ êîìïîíåíòà
* 'com_url' = Àäðåñ ñàéòà êîìïîíåíòà
* 'com_menu_data' = Ìàññèâ ïóíêòîâ ìåíþ íàñòðîåê êîìïîíåíòà
* 'com_enabled' = Ñòàòóñ êîìïîíåíòà (âêëþ÷åí/íå âêëþ÷åí)
* 'com_safemode' = Ðåæèì ðàáîòû êîìïîíåíòà (åñëè â safemode àäìèíû íå ìîãóò èçìåíÿòü)
* 'com_section_key' = Óíèêàëüíûé êëþ÷ êîìïîíåíòà (Êëþ÷, ñîîòâåòñòâóþùèé íàçâàíèþ ôàéëà, íàïð-ð: blog åñëè èñïîëüçóåòñÿ blog.php)
* 'com_description' = Îïèñàíèå êîìïîíåíòà
* 'com_url_uri' = URI-àäðåñ êîìïîíåíòà â âåðõíåì ìåíþ ôîðóìà
* 'com_url_title' = Íàçâàíèå êîìïîíåíòà â âåðõíåì ìåíþ ôîðóìà
* 'com_title' = Component Title
* 'com_author' = Component Author
* 'com_version' = Component Version
* 'com_url' = Component Home URL
* 'com_menu_data' = Component Menu Data Array
* 'com_enabled' = Component Enabled
* 'com_safemode' = Component Safemode (admins cannot alter)
* 'com_section_key' = Component Section (Key, must match filename. eg: blog if using blog.php)
* 'com_description' = Component Description
* 'com_url_uri' = Component Board Header URL URI
* 'com_url_title' = Component Board Header URL Title
* </code>
*
* @package InvisionPowerBoard
@@ -105,9 +95,9 @@ if ( ! defined('IPS_API_CORE_LOADED') )
}
/**
* API: Êîìïîíåíòîâ ôîðóìà
* API: Components
*
* Êëàññ ïðåäîñòàâëÿåò âñå ìåòîäû API äëÿ ðàáîòû ñ êîìïîíåíòàìè ôîðóìà.
* This class deals with all available components functions.
*
* @package InvisionPowerBoard
* @subpackage APIs
@@ -118,27 +108,27 @@ if ( ! defined('IPS_API_CORE_LOADED') )
class api_components extends api_core
{
/**
* Èíôîðìàöèÿ î êîìïîíåíòå
* Loaded component
*
* @var array
*/
var $component;
/**
* Îáúåêò XML ïàðñåðà
* XML Parser Object
*
* @var object
*/
var $xml;
/*-------------------------------------------------------------------------*/
// Ïîëó÷åíèå èíôîðìàöèè î êîìïîíåíòå ïî åãî êëþ÷ó (èìåíè ñåêöèè êîìïîíåíòà)
// Get component by key
/*-------------------------------------------------------------------------*/
/**
* Ïîëó÷àåò âñþ èíôîðìàöèþ î êîìïîíåíòå
* Updates a component
*
* @param string Êëþ÷ êîìïîíåíòà (íàïð-ð: blog)
* @return void Çàïîëíÿåò $this->component
* @param string Component key (eg: blog)
* @return void Populates $this->component
*/
function get_component_by_key( $key )
{
@@ -148,10 +138,10 @@ class api_components extends api_core
}
/*-------------------------------------------------------------------------*/
// Ñîçäàíèå ìåíþ
// Create menu
/*-------------------------------------------------------------------------*/
/**
* Ñîçäàåò ñåðèàëèçîâàííóþ ñòðîêó èç ìàññèâà ìåíþ
* Creates serialized string from a menu array
* <code>
* $menu_data [ $item_id ]['menu_text']
* $menu_data [ $item_id ]['menu_url']
@@ -160,8 +150,8 @@ class api_components extends api_core
* $menu_data [ $item_id ]['menu_permlang']
* </code>
*
* @param array ìíîãîóðîâíåâûé ìàññèâ
* @return string ñåðèàëèçîâàííûé ìàññèâ
* @param array multi-dimenisonal array
* @return void;
*/
function acp_component_create_menu_data( $menu_data )
{
@@ -173,12 +163,12 @@ class api_components extends api_core
/*-------------------------------------------------------------------------*/
// Èìïîðòèðîâàíèå êîìïîíåíò èç XML ôàéëà
// Import XML File
/*-------------------------------------------------------------------------*/
/**
* Îáíîâëÿåò/äîáàâëÿåò êîìïîíåíòû èç xml ôàéëà
* Updates/inserts a component from xml file
*
* @param string Ïóòü ê XML ôàéëó
* @param string Path to XML File
* @return array;
*/
function acp_component_import( $xml_file_path )
@@ -218,7 +208,6 @@ class api_components extends api_core
require_once( KERNEL_PATH.'class_xml.php' );
$this->xml = new class_xml();
$this->xml->lite_parser = 1;
//-----------------------------------------
// Unpack the datafile
@@ -239,11 +228,7 @@ class api_components extends api_core
// Ensure [0] is populated
//-----------------------------------------
$tmp = $this->xml->xml_array['componentexport']['componentgroup']['component'];
unset($this->xml->xml_array['componentexport']['componentgroup']['component']);
$this->xml->xml_array['componentexport']['componentgroup']['component'][0] = $tmp;
$this->xml->xml_array['componentexport']['componentgroup']['component'] = array( 0 => $this->xml->xml_array['componentexport']['componentgroup']['component'] );
}
$updated = $inserted = 0;
@@ -287,14 +272,13 @@ class api_components extends api_core
}
/*-------------------------------------------------------------------------*/
// Äîáàâëåíèå êîìïîíåíòà
// Update component
/*-------------------------------------------------------------------------*/
/**
* Äîáàâëÿåò íîâûé êîìïîíåíò â ñèñòåìó
* Updates a component
*
* @param string Êëþ÷ êîìïîíåíòà (íàïð-ð: áëîã)
* @param array Ìàññèâ îáíîâëÿåìûõ ïîëåé ( äîëæåí ñîâïàäàòü ñî ñòðóêòóðîé
* êîìïîíåíò, ñì. â êîììåíòàðèÿõ ê ýòîìó êëàññó )
* @param string Component key (eg: blog)
* @param array Component fields ( must match class fields, see class docs )
* @return void;
*/
function acp_component_insert( $key, $fields )
@@ -386,14 +370,13 @@ class api_components extends api_core
}
/*-------------------------------------------------------------------------*/
// Îáíîâëåíèå êîìïîíåíòà
// Update component
/*-------------------------------------------------------------------------*/
/**
* Îáíîâëÿåò ñëæåáíóþ èíôîðìàöèþ êîìïîíåíòà
* Updates a component
*
* @param string Êëþ÷ êîìïîíåíòà (íàïð-ð: áëîã)
* @param array Ìàññèâ îáíîâëÿåìûõ ïîëåé ( äîëæåí ñîâïàäàòü ñî ñòðóêòóðîé
* êîìïîíåíò, ñì. â êîììåíòàðèÿõ ê ýòîìó êëàññó )
* @param string Component key (eg: blog)
* @param array Component fields ( must match class fields, see class docs )
* @return void;
*/
function acp_component_update( $key, $fields )
@@ -492,13 +475,12 @@ class api_components extends api_core
}
/*-------------------------------------------------------------------------*/
// Óäàëåíèå êîìïîíåíòà
// Remove component
/*-------------------------------------------------------------------------*/
/**
* Óäàëÿåò êîìïîíåíò èç ñèñòåìó [ Âíèìàíèå, ìåòîä íå ïåðäîñòàâëÿåò
* íè êàêèõ ïîäòâåðæäåíèé óäàëåíèÿ ! ]
* Remove a component [ no confirmation screens! ]
*
* @param string Êëþ÷ êîìïîíåíòà (íàïð-ð: blog)
* @param string Component key (eg: blog)
* @return void
*/
function acp_component_remove( $key )
@@ -508,13 +490,12 @@ class api_components extends api_core
}
/*-------------------------------------------------------------------------*/
// Âêëþ÷åíèå êîìïîíåíòà
// Enable component
/*-------------------------------------------------------------------------*/
/**
* Àêòèâèðóåò êîìïîíåíò - îí ñòàíîâèòñÿ äîñòóïíûì â ïîëüçîâàòåëüñêîé ÷àñòè
* ôîðóìà
* Enable a component
*
* @param string Êëþ÷ êîìïîíåíòà (íàïð-ð: blog)
* @param string Component key (eg: blog)
* @return void
*/
function acp_component_enable( $key )
@@ -524,12 +505,12 @@ class api_components extends api_core
}
/*-------------------------------------------------------------------------*/
// Îòêëþ÷åíèå êîìïîíåíòà
// Disable component
/*-------------------------------------------------------------------------*/
/**
* Äåàêòèâèðóåò êîìïîíåíò
* Enable a component
*
* @param string Êëþ÷ êîìïîíåíòà (íàïð-ð: blog)
* @param string Component key (eg: blog)
* @return void
*/
function acp_component_disable( $key )
@@ -539,10 +520,10 @@ class api_components extends api_core
}
/*-------------------------------------------------------------------------*/
// Ïåðåñòðîéêà êåøà êîìïîíåíòîâ
// Components Rebuild Cache
/*-------------------------------------------------------------------------*/
/**
* Ñîçäàåò íîâûé êåø êîìïîíåíòîâ
* Rebuild cache
*
* @return void
*/