diff options
| author | Christian Fowler <spider@viovio.com> | 2005-06-28 07:45:47 +0000 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2005-06-28 07:45:47 +0000 |
| commit | 63e4bd39656de55288f419f8a576fe7d2b1b5e94 (patch) | |
| tree | 3e0eb43c5ac05eb021b6bbaa312bafbb3bd9d4ba | |
| parent | 3bc1e2268d9c1b4cfbf3b693a3caad419918d284 (diff) | |
| download | kernel-63e4bd39656de55288f419f8a576fe7d2b1b5e94.tar.gz kernel-63e4bd39656de55288f419f8a576fe7d2b1b5e94.tar.bz2 kernel-63e4bd39656de55288f419f8a576fe7d2b1b5e94.zip | |
Merge recent changes from R1 into HEAD
92 files changed, 1002 insertions, 370 deletions
diff --git a/Bablotron.php b/Bablotron.php index 7b35430..6c40a47 100644 --- a/Bablotron.php +++ b/Bablotron.php @@ -1,29 +1,32 @@ <?php /** -* $Header: /cvsroot/bitweaver/_bit_kernel/Attic/Bablotron.php,v 1.1 2005/06/19 04:52:53 bitweaver Exp $ -* -* Copyright (c) 2004 bitweaver.org -* Copyright (c) 2003 tikwiki.org -* Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. -* All Rights Reserved. See copyright.txt for details and a complete list of authors. -* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details -* -* $Id: Bablotron.php,v 1.1 2005/06/19 04:52:53 bitweaver Exp $ -*/ + * @version $Header: /cvsroot/bitweaver/_bit_kernel/Attic/Bablotron.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ + * + * Copyright (c) 2004 bitweaver.org + * Copyright (c) 2003 tikwiki.org + * Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. + * All Rights Reserved. See copyright.txt for details and a complete list of authors. + * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details + * + * $Id: Bablotron.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ + * + * A spell checking library. + * + * Currently used for BitBase. + * @author lrargerich <lrargerich@yahoo.com> + * + * @package kernel + */ + /** -* A spell checking library. -* -* Currently used for BitBase. -* -* @date created 2002/11/14 -* @author lrargerich <lrargerich@yahoo.com> -* -* @version $Revision: 1.1 $ $Date: 2005/06/19 04:52:53 $ $Author: bitweaver $ -* -* @class Bablotron -* @todo does not need to inherit BitBase class. Should hold a BitDb connection as a -* global variable. -*/ + * @package kernel + * @subpackage Bablotron + * + * created 2002/11/14 + * + * @todo does not need to inherit BitBase class. Should hold a BitDb connection as a + * global variable. + */ class Bablotron extends BitBase { /** diff --git a/BitBase.php b/BitBase.php index 90cb29b..bf17d93 100755 --- a/BitBase.php +++ b/BitBase.php @@ -1,26 +1,28 @@ <?php /** -* $Header: /cvsroot/bitweaver/_bit_kernel/BitBase.php,v 1.1 2005/06/19 04:52:52 bitweaver Exp $ +* $Header: /cvsroot/bitweaver/_bit_kernel/BitBase.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ * * Copyright (c) 2004 bitweaver.org * All Rights Reserved. See copyright.txt for details and a complete list of authors. * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details * -* $Id: BitBase.php,v 1.1 2005/06/19 04:52:52 bitweaver Exp $ -*/ -/** +* $Id: BitBase.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ +* * Virtual base class (as much as one can have such things in PHP) for all * derived tikiwiki classes that require database access. * -* @date created 2004/8/15 +* @package kernel * -* @author spider <spider@steelsun.com> +* created 2004/8/15 * -* @version $Revision: 1.1 $ $Date: 2005/06/19 04:52:52 $ $Author: bitweaver $ +* @author spider <spider@steelsun.com> * -* @class BitBase +* @version $Revision: 1.2 $ $Date: 2005/06/28 07:45:45 $ $Author: spiderr $ */ +/** + * required setup + */ require_once ( KERNEL_PKG_PATH.'BitDb.php' ); include_once ( KERNEL_PKG_PATH.'BitCache.php' ); require_once( BIT_PKG_PATH.'util/pear/Date.php' ); @@ -28,6 +30,12 @@ require_once( BIT_PKG_PATH.'util/pear/Date.php' ); define( 'STORAGE_BINARY', 1 ); define( 'STORAGE_IMAGE', 2 ); +/** +* @package kernel +* @subpackage BitBase +* Virtual base class (as much as one can have such things in PHP) for all +* derived bitweaver classes that require database access. +*/ class BitBase { /** diff --git a/BitCache.php b/BitCache.php index 74f4dce..28fd575 100644 --- a/BitCache.php +++ b/BitCache.php @@ -1,6 +1,6 @@ <?php /** -* $Header: /cvsroot/bitweaver/_bit_kernel/BitCache.php,v 1.1 2005/06/19 04:52:53 bitweaver Exp $ +* $Header: /cvsroot/bitweaver/_bit_kernel/BitCache.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ * * Copyright (c) 2004 bitweaver.org * Copyright (c) 2003 tikwiki.org @@ -8,23 +8,28 @@ * All Rights Reserved. See copyright.txt for details and a complete list of authors. * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details * -* $Id: BitCache.php,v 1.1 2005/06/19 04:52:53 bitweaver Exp $ -*/ -/** +* $Id: BitCache.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ +* * A basic library to handle caching of some Tiki Objects. Usage is simple and feel free to improve it. * * Currently used to cache user permissions only. Could be used to store blobs to files and other static * database intensive queries. * -* @date created 2003/11/25 +* @package kernel +* +* created 2003/11/25 * * @author lrargerich <lrargerich@yahoo.com> * -* @version $Revision: 1.1 $ $Date: 2005/06/19 04:52:53 $ $Author: bitweaver $ +* @version $Revision: 1.2 $ $Date: 2005/06/28 07:45:45 $ $Author: spiderr $ * -* @class BitCache * @todo Need to implement in more places */ + +/** + * @package kernel + * @subpackage BitCache + */ class BitCache { /** diff --git a/BitDate.php b/BitDate.php index 54e2eec..441975d 100644 --- a/BitDate.php +++ b/BitDate.php @@ -1,6 +1,15 @@ <?php /** - * class: BitDate + * + * Created by: Jeremy Jongsma (jjongsma@tickchat.com) + * Created on: Sat Jul 26 11:51:31 CDT 2003 + * + * @package kernel + * @subpackage BitDate + */ + +/** + * BitDate * * This class takes care of all time/date conversions for * storing dates in the DB and displaying dates to the user. @@ -10,11 +19,11 @@ * - Display dates will be computed based on the preferred * display offset specified in the constructor * - * TODO: As of 1.7, dates are still stored in server local time. + * @todo As of 1.7, dates are still stored in server local time. * This should be changed for 1.7.1 (requires many module changes). * - * Created by: Jeremy Jongsma (jjongsma@tickchat.com) - * Created on: Sat Jul 26 11:51:31 CDT 2003 + * @package kernel + * @subpackage BitDate */ class BitDate { /** @@ -1,6 +1,10 @@ <?php /** -* $Header: /cvsroot/bitweaver/_bit_kernel/Attic/BitDb.php,v 1.4 2005/06/21 16:43:07 spiderr Exp $ +* @version $Header: /cvsroot/bitweaver/_bit_kernel/Attic/BitDb.php,v 1.5 2005/06/28 07:45:45 spiderr Exp $ +* +* @package kernel +* +* @author spider <spider@steelsun.com> * * Copyright (c) 2004 bitweaver.org * Copyright (c) 2003 tikwiki.org @@ -8,10 +12,12 @@ * All Rights Reserved. See copyright.txt for details and a complete list of authors. * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details * -* $Id: BitDb.php,v 1.4 2005/06/21 16:43:07 spiderr Exp $ +* $Id: BitDb.php,v 1.5 2005/06/28 07:45:45 spiderr Exp $ */ -// ensure your AdoDB install is a subdirectory off your include path +/** + * ensure your AdoDB install is a subdirectory off your include path + */ require_once(UTIL_PKG_PATH."adodb/adodb.inc.php"); require_once( KERNEL_PKG_PATH.'bit_error_inc.php' ); define( 'BIT_QUERY_DEFAULT', -1 ); @@ -23,13 +29,10 @@ define( 'BIT_QUERY_DEFAULT', -1 ); * Currently used as a base class, this class should be optional to ensure bitweaver * continues to function correctly, without a valid database connection. * -* @date created -* -* @author spider <spider@steelsun.com> -* -* @version $Revision: 1.4 $ $Date: 2005/06/21 16:43:07 $ $Author: spiderr $ +* created * -* @class BitDb +* @package kernel +* @subpackage BitDb */ class BitDb { @@ -179,8 +182,8 @@ class BitDb * @param pTables an array of tables and creation information in DataDict * style * @param pOptions an array of options used while creating the tables - * @return true if created with no errors - * @return false if errors are stored in $this->mFailed + * @return true|false + * true if created with no errors | false if errors are stored in $this->mFailed */ function createTables($pTables, $pOptions = array()) { @@ -229,8 +232,9 @@ class BitDb * Used to drop tables * @todo remove references to BIT_DB_PREFIX, us a member function * @param pTables an array of table names to drop - * @return true if dropped with no errors - * @return false if errors are stored in $this->mFailed + * @return true | false + * true if dropped with no errors | + * false if errors are stored in $this->mFailed */ function dropTables($pTables) { diff --git a/BitPreferences.php b/BitPreferences.php index 72b48c7..abcfb1b 100755 --- a/BitPreferences.php +++ b/BitPreferences.php @@ -1,6 +1,6 @@ <?php /** -* $Header: /cvsroot/bitweaver/_bit_kernel/Attic/BitPreferences.php,v 1.1 2005/06/19 04:52:53 bitweaver Exp $ +* $Header: /cvsroot/bitweaver/_bit_kernel/Attic/BitPreferences.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ * * Copyright (c) 2004 bitweaver.org * Copyright (c) 2003 tikwiki.org @@ -8,23 +8,27 @@ * All Rights Reserved. See copyright.txt for details and a complete list of authors. * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details * -* $Id: BitPreferences.php,v 1.1 2005/06/19 04:52:53 bitweaver Exp $ -*/ -/** +* $Id: BitPreferences.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ +* * A class used to store and retrieve preferences. Defaults are set * programmatically. Storage can be with or without a database. * * Currently use to store sitewide preferences * -* @date created 2004/8/15 +* @package kernel * -* @author wolff_borg <wolff_borg@yahoo.com.au> +* created 2004/8/15 * -* @version $Revision: 1.1 $ $Date: 2005/06/19 04:52:53 $ $Author: bitweaver $ +* @author wolff_borg <wolff_borg@yahoo.com.au> * -* @class BitPreferences +* @version $Revision: 1.2 $ $Date: 2005/06/28 07:45:45 $ $Author: spiderr $ * @todo Could be subclassed to store user preferences. */ + +/** + * @package kernel + * @subpackage BitPreferences + */ class BitPreferences { /** diff --git a/BitSmarty.php b/BitSmarty.php index 8172956..129d2e9 100755 --- a/BitSmarty.php +++ b/BitSmarty.php @@ -1,19 +1,33 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_kernel/BitSmarty.php,v 1.1 2005/06/19 04:52:52 bitweaver Exp $ +/** +* @version $Header: /cvsroot/bitweaver/_bit_kernel/BitSmarty.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ +* @package Smarty +*/ + // Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. -// let smarty define SMARTY_DIR so it's an absolute path : +/** + * let smarty define SMARTY_DIR so it's an absolute path : + */ define('SMARTY_DIR', UTIL_PKG_PATH . 'smarty/libs/'); if( file_exists( SMARTY_DIR.'Smarty.class.php' ) ) { - // If we have adodb in our kernel, use that. + // If we have smarty in our kernel, use that. $smartyIncFile = SMARTY_DIR . 'Smarty.class.php'; } else { // assume it is in php's global include_path $smartyIncFile = 'Smarty.class.php'; } + +/** + * required setup + */ require_once($smartyIncFile); +/** +* @package Smarty +* @subpackage PermissionCheck +*/ class PermissionCheck { function check( $perm ) { global $gBitUser; @@ -21,6 +35,10 @@ class PermissionCheck { } } +/** +* @package Smarty +* @subpackage BitSmarty +*/ class BitSmarty extends Smarty { function BitSmarty() diff --git a/BitSystem.php b/BitSystem.php index aadbcfa..bd3a7eb 100755 --- a/BitSystem.php +++ b/BitSystem.php @@ -1,4 +1,9 @@ <?php +/** +* @package kernel +* @author spider <spider@steelsun.com> +* @version $Revision: 1.8 $ +*/ // +----------------------------------------------------------------------+ // | PHP version 4.?? // +----------------------------------------------------------------------+ @@ -14,25 +19,11 @@ // +----------------------------------------------------------------------+ // | Authors: spider <spider@steelsun.com> // +----------------------------------------------------------------------+ -// $Id: BitSystem.php,v 1.7 2005/06/21 16:45:47 spiderr Exp $ -/** -* kernel::BitSystem -* -* Purpose: -* -* This is the main system class that does the work of seeing Tiki has an -* operable environment and has methods for modifying that environment. -* -* Currently gBitSystem derives from this class for backward compatibility sake. -* Ultimate goal is to put system code from BitBase here, and base code from -* gBitSystem (code that ALL features need) into BitBase and code gBitSystem that -* is Package specific should be moved into that package -* -* @author spider <spider@steelsun.com> -* @version $Revision: 1.7 $ -* @access public -*/ +// $Id: BitSystem.php,v 1.8 2005/06/28 07:45:45 spiderr Exp $ +/** + * required setup + */ require_once(KERNEL_PKG_PATH . 'BitBase.php'); require_once(KERNEL_PKG_PATH . 'BitDate.php'); require_once(KERNEL_PKG_PATH . 'BitSmarty.php'); @@ -41,8 +32,28 @@ define('DEFAULT_PACKAGE', 'kernel'); define('CENTER_COLUMN', 'c'); define('HOMEPAGE_LAYOUT', 'home'); +/** + * kernel::BitSystem + * + * Purpose: + * + * This is the main system class that does the work of seeing Tiki has an + * operable environment and has methods for modifying that environment. + * + * Currently gBitSystem derives from this class for backward compatibility sake. + * Ultimate goal is to put system code from BitBase here, and base code from + * gBitSystem (code that ALL features need) into BitBase and code gBitSystem that + * is Package specific should be moved into that package + * + * @author spider <spider@steelsun.com> + * @version $Revision: 1.8 $ + * @package kernel + * @subpackage BitSystem + */ class BitSystem extends BitBase -{ +{ /** + * @package BitSystem + */ // === properties /** * * Array of * @@ -399,9 +410,7 @@ class BitSystem extends BitBase * @return none * @access public * - * @param $pKey hash key - * @return none - * @access public + * @param $pKey hash key */ function isPackageActive( $pPackageName ) { @@ -423,10 +432,8 @@ class BitSystem extends BitBase * It will verify that the given package is active or it will display the error template and die() * @param $pPackageName the name of the package to test * @return none - * @access public * * @param $pKey hash key - * @return none * @access public */ function verifyPackage( $pPackageName ) @@ -554,8 +561,6 @@ class BitSystem extends BitBase * @access public * * @param $pKey hash key - * @return none - * @access public */ function verifyFeature( $pFeatureName ) { @@ -988,7 +993,7 @@ asort( $this->mAppMenu ); $url = USERS_PKG_URL . 'login.php'; } } elseif( !empty( $bitIndex ) ) { - $url = $bitIndex; + $url = BIT_ROOT_URL.$bitIndex; } // if no special case was matched above, default to users' my page if( empty( $url ) ) { @@ -1000,7 +1005,6 @@ asort( $this->mAppMenu ); $url = USERS_PKG_URL . 'my.php'; } } - return $url; } // === getStyle @@ -2079,7 +2083,7 @@ Proceed to the Tiki installer <b>at <a href=\"".BIT_ROOT_URL."install/install.ph $error['string'] = $data = ''; if( $fsock = @fsockopen( 'www.bitweaver.org', 80, $error['number'], $error['string'], 30 ) ) { - @fwrite( $fsock, "GET /_bitversion/versions.txt HTTP/1.1\r\n" ); + @fwrite( $fsock, "GET /bitversion.txt HTTP/1.1\r\n" ); @fwrite( $fsock, "HOST: www.bitweaver.org\r\n" ); @fwrite( $fsock, "Connection: close\r\n\r\n" ); @@ -2098,7 +2102,7 @@ Proceed to the Tiki installer <b>at <a href=\"".BIT_ROOT_URL."install/install.ph // nuke all lines that don't start with a number $data = preg_match_all( "/(\d.*)\n/", $data, $versions ); $versions = $versions[1]; - if( !empty( $versions ) ) { + if( !empty( $versions ) && preg_match( "/\d+\.\d+\.\d+/", $versions[0] ) ) { sort( $versions ); foreach( $versions as $version ) { if( preg_match( "/^".BIT_MAJOR_VERSION."/", $version ) ) { @@ -2119,6 +2123,23 @@ Proceed to the Tiki installer <b>at <a href=\"".BIT_ROOT_URL."install/install.ph $ret['error'] = $error; return $ret; } + + // should be moved somewhere else. unbreaking things for now - 25-JUN-2005 - spiderr + // \todo remove html hardcoded in diff2 + function diff2($page1, $page2) { + $page1 = split("\n", $page1); + $page2 = split("\n", $page2); + $z = new WikiDiff($page1, $page2); + if ($z->isEmpty()) { + $html = '<hr /><br />[' . tra("Versions are identical"). ']<br /><br />'; + } else { + //$fmt = new WikiDiffFormatter; + $fmt = new WikiUnifiedDiffFormatter; + $html = $fmt->format($z, $page1); + } + return $html; + } + } // === installError @@ -2146,9 +2167,13 @@ function installError($pMsg = null) echo "</body></html>";*/ die; } -// >>> + +/** + * @package kernel + * @subpackage TikiTimer + */ class TikiTimer -{ +{ function parseMicro($micro) { list($micro, $sec) = explode(' ', microtime()); @@ -2184,6 +2209,9 @@ SPIDERKILL - need to copy tra function out of setup_inc and put here * and it indicates how many bytes follow for this character. * All further bytes in a multibyte sequence are in the range 0x80 to 0xBF. */ +/** + * Check mb_substr availability + */ if (function_exists('mb_substr')) { mb_internal_encoding("UTF-8"); diff --git a/admin/admin_include_features.php b/admin/admin_include_features.php index 57a7962..6c244aa 100644 --- a/admin/admin_include_features.php +++ b/admin/admin_include_features.php @@ -1,6 +1,6 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_kernel/admin/Attic/admin_include_features.php,v 1.1 2005/06/19 04:52:54 bitweaver Exp $ +// $Header: /cvsroot/bitweaver/_bit_kernel/admin/Attic/admin_include_features.php,v 1.2 2005/06/28 07:45:46 spiderr Exp $ // Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. // All Rights Reserved. See copyright.txt for details and a complete list of authors. @@ -19,7 +19,6 @@ $features_toggles = array( "contact_anon", "feature_custom_home", "feature_debug_console", - "feature_edit_templates", "feature_editcss", "feature_featuredLinks", "feature_html_pages", diff --git a/admin_lib.php b/admin_lib.php index f4e20ea..ca3ae5f 100644 --- a/admin_lib.php +++ b/admin_lib.php @@ -1,5 +1,12 @@ <?php - +/** + * @package kernel + */ + +/** + * @package kernel + * @subpackage AdminLib + */ class AdminLib extends BitBase { function AdminLib() { BitBase::BitBase(); diff --git a/array_fill.func.php b/array_fill.func.php index e023d89..155f6a3 100644 --- a/array_fill.func.php +++ b/array_fill.func.php @@ -1,8 +1,16 @@ <?php +/** + * @package kernel + * @subpackage functions + */ // For PHP version < 4.2.0 missing the array_fill function, // I provide here an alternative. -Philippe // taken from http://de3.php.net/manual/en/function.array-fill.php comments. thanks jausion at hotmail-dot-com + +/** + * array_fill + */ function array_fill($iStart, $iLen, $vValue) { $aResult = array(); for ($iCount = $iStart; $iCount < $iLen + $iStart; $iCount++) { diff --git a/backups_lib.php b/backups_lib.php index 125d755..bc24ef3 100644 --- a/backups_lib.php +++ b/backups_lib.php @@ -1,5 +1,12 @@ <?php +/** + * @package kernel + */ +/** + * @package kernel + * @subpackage BackupLib + */ class BackupLib extends BitBase { function BackupLib() { BitBase::BitBase(); diff --git a/ban_lib.php b/ban_lib.php index 2f2f125..dc866b0 100644 --- a/ban_lib.php +++ b/ban_lib.php @@ -1,5 +1,12 @@ <?php +/** + * @package kernel + */ +/** + * @package kernel + * @subpackage BanLib + */ class BanLib extends BitBase { function BanLib() { BitBase::BitBase(); diff --git a/bit_error_inc.php b/bit_error_inc.php index efce027..4150fca 100755 --- a/bit_error_inc.php +++ b/bit_error_inc.php @@ -1,5 +1,7 @@ <?php -/* +/** + * @package kernel + * @subpackage function * @version V3.94 13 Oct 2003 (c) 2000-2003 John Lim (jlim@natsoft.com.my). All rights reserved. * Released under both BSD license and Lesser GPL library license. * Whenever there is any discrepancy between the two licenses, @@ -11,6 +13,9 @@ * */ +/** + * set error handling + */ if( !defined( 'BIT_INSTALL' ) && !defined( 'ADODB_ERROR_HANDLER' ) ) { define( 'ADODB_ERROR_HANDLER', 'tiki_error_handler' ); } diff --git a/bitweaver.js b/bitweaver.js index 87be371..d714f69 100644 --- a/bitweaver.js +++ b/bitweaver.js @@ -1,4 +1,4 @@ -// $Header: /cvsroot/bitweaver/_bit_kernel/Attic/bitweaver.js,v 1.1 2005/06/19 04:52:53 bitweaver Exp $ +// $Header: /cvsroot/bitweaver/_bit_kernel/Attic/bitweaver.js,v 1.2 2005/06/28 07:45:45 spiderr Exp $ // // Set client offset (in minutes) to a cookie to avoid server-side DST issues @@ -171,9 +171,9 @@ function setfoldericonstate(foo) { pic = new Image(); if (getCookie(foo) == "o") { - pic.src = tikiIconDir + "/folder_open.png"; + pic.src = tikiIconDir + "/expanded.gif"; } else { - pic.src = tikiIconDir + "/folder.png"; + pic.src = tikiIconDir + "/collapsed.gif"; } //alert(document.getElementById(foo+"img").src); //alert(pic.src); @@ -372,7 +372,7 @@ function closeWin(){ } } -function popUpWin(url, type, strWidth, strHeight){ +function popUpWin(url, type, strWidth, strHeight) { closeWin(); if (type == "fullScreen"){ strWidth = screen.availWidth - 10; @@ -385,28 +385,7 @@ function popUpWin(url, type, strWidth, strHeight){ newWindow.focus(); } -function toggleVisibility(item) -{ - if (document.layers) - { - vista = (document.layers[item].visibility == 'hide') ? 'show' : 'hide' - document.layers[item].visibility = vista; - } - else if (document.all) - { - vista = (document.all[item].style.visibility == 'hidden') ? 'visible' : 'hidden'; - document.all[item].style.visibility = vista; - } - else if (document.getElementById) - { - vista = (document.getElementById(item).style.visibility == 'hidden') ? 'visible' : 'hidden'; - document.getElementById(item).style.visibility = vista; - - } -} - -function toggleBlockDisplay(item) -{ +function toggleBlockDisplay(item) { if (document.layers) { current = (document.layers[item].display == 'none') ? 'block' : 'none'; document.layers[item].display = current; @@ -419,8 +398,7 @@ function toggleBlockDisplay(item) } } -function setBlockDisplay(item,vizFlag) -{ +function setBlockDisplay(item,vizFlag) { current = (vizFlag) ? 'block' : 'none'; if (document.layers) { document.layers[item].display = current; diff --git a/comm_lib.php b/comm_lib.php index f718055..b7db873 100644 --- a/comm_lib.php +++ b/comm_lib.php @@ -1,5 +1,12 @@ <?php +/** + * @package kernel + */ +/** + * @package kernel + * @subpackage RankLib + */ class CommLib extends BitBase { function CommLib() { BitBase::BitBase(); } diff --git a/config_defaults_inc.php b/config_defaults_inc.php index f723b02..d7d5ae1 100644 --- a/config_defaults_inc.php +++ b/config_defaults_inc.php @@ -1,4 +1,12 @@ <?php +/** + * @package kernel + * @subpackage functions + */ + +/** + * required setup + */ $config_file = empty($_SERVER['CONFIG_INC']) ? BIT_ROOT_PATH.'kernel/config_inc.php' : $_SERVER['CONFIG_INC']; if (file_exists($config_file ) ) { @@ -26,7 +34,7 @@ if (!defined('BIT_ROOT_URL' )) { define('BIT_ROOT_URL', $subpath ); } if( !defined( 'BIT_SESSION_NAME' ) ) { - define( 'BIT_SESSION_NAME', 'TIKISESSION' ); + define( 'BIT_SESSION_NAME', 'BWSESSION' ); } if( !defined( 'BIT_PHP_ERROR_REPORTING' ) ) { define( 'BIT_PHP_ERROR_REPORTING', E_ALL ); @@ -1,12 +1,17 @@ <?php - -// $Header: /cvsroot/bitweaver/_bit_kernel/error.php,v 1.1 2005/06/19 04:52:52 bitweaver Exp $ +/** + * @version $Header: /cvsroot/bitweaver/_bit_kernel/error.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ + * @package kernel + * @subpackage functions + */ // Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. -// Initialization +/** + * required setup + */ require_once( '../bit_setup_inc.php' ); diff --git a/error_simple.php b/error_simple.php index 1d7e4e4..e97eba6 100644 --- a/error_simple.php +++ b/error_simple.php @@ -1,6 +1,9 @@ <?php - -// $Header: /cvsroot/bitweaver/_bit_kernel/error_simple.php,v 1.1 2005/06/19 04:52:53 bitweaver Exp $ +/** + * @version $Header: /cvsroot/bitweaver/_bit_kernel/error_simple.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ + * @package kernel + * @subpackage functions + */ echo '<html><body><pre><p>'; if (isset($_REQUEST['error']) and !is_null($_REQUEST['error'])) { diff --git a/layout_options.php b/layout_options.php index 7af8ff4..12e0353 100644 --- a/layout_options.php +++ b/layout_options.php @@ -1,12 +1,15 @@ <?php - -// $Header: /cvsroot/bitweaver/_bit_kernel/Attic/layout_options.php,v 1.1 2005/06/19 04:52:52 bitweaver Exp $ +/** + * @version $Header: /cvsroot/bitweaver/_bit_kernel/Attic/layout_options.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ + * @package kernel + * @subpackage functions + */ // Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. -# $Header: /cvsroot/bitweaver/_bit_kernel/Attic/layout_options.php,v 1.1 2005/06/19 04:52:52 bitweaver Exp $ +# $Header: /cvsroot/bitweaver/_bit_kernel/Attic/layout_options.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ $section_top_bar = $section . '_top_bar'; $section_bot_bar = $section . '_bot_bar'; diff --git a/list_cache.php b/list_cache.php index 90c884b..376eebd 100644 --- a/list_cache.php +++ b/list_cache.php @@ -1,12 +1,17 @@ <?php - -// $Header: /cvsroot/bitweaver/_bit_kernel/Attic/list_cache.php,v 1.1 2005/06/19 04:52:53 bitweaver Exp $ +/** + * @version $Header: /cvsroot/bitweaver/_bit_kernel/Attic/list_cache.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ + * @package kernel + * @subpackage functions + */ // Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. -// Initialization +/** + * required setup + */ require_once( '../bit_setup_inc.php' ); if (!$gBitUser->isAdmin()) { diff --git a/menu_lib.php b/menu_lib.php index cf760a8..9c84950 100644 --- a/menu_lib.php +++ b/menu_lib.php @@ -1,5 +1,13 @@ <?php +/** + * @version $Header: /cvsroot/bitweaver/_bit_kernel/Attic/menu_lib.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ + * @package kernel + */ +/** + * @package kernel + * @subpackage MenuLib + */ class MenuLib extends BitBase { function MenuLib() { BitBase::BitBase(); diff --git a/menu_register_inc.php b/menu_register_inc.php index 9c33c66..4c95750 100644 --- a/menu_register_inc.php +++ b/menu_register_inc.php @@ -1,8 +1,14 @@ <?php - // $Header: /cvsroot/bitweaver/_bit_kernel/menu_register_inc.php,v 1.2 2005/06/20 07:27:14 lsces Exp $ - // This file only needs to be called once, and only when you plan on rendering the app menu, or something similar. - // TODO: All of the following should be moved to package specific initialization files, however, for now, - // they are all in this single place, and eventually this file totally will go away - spiderr +/** + * @version $Header: /cvsroot/bitweaver/_bit_kernel/menu_register_inc.php,v 1.3 2005/06/28 07:45:45 spiderr Exp $ + * @package kernel + * @subpackage functions + * + * This file only needs to be called once, and only when you plan on rendering the app menu, or something similar. + * + * @todo All of the following should be moved to package specific initialization files, however, for now, + * they are all in this single place, and eventually this file totally will go away - spiderr + */ global $gBitUser, $gBitSystem, $smarty; // =========================== Global =========================== diff --git a/mod_lib.php b/mod_lib.php index 35bfbc1..8992114 100644 --- a/mod_lib.php +++ b/mod_lib.php @@ -1,4 +1,13 @@ <?php +/** + * @version $Header: /cvsroot/bitweaver/_bit_kernel/Attic/mod_lib.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ + * @package kernel + */ + +/** + * @package kernel + * @subpackage ModLib + */ class ModLib extends BitBase { function ModLib() { BitBase::BitBase(); @@ -261,7 +270,7 @@ class ModLib extends BitBase { $query = "UPDATE `".BIT_DB_PREFIX."tiki_layouts` SET `rows` = ? WHERE `module_id` = ? AND `user_id` = ?"; $result = $this->query($query, array($rows, $module_id, $user_id)); } else { - $query = "UPDATE ".BIT_DB_PREFIX."`tiki_layouts_modules` SET `rows = ? WHERE `module_id` = ?"; + $query = "UPDATE `".BIT_DB_PREFIX."tiki_layouts_modules` SET `rows` = ? WHERE `module_id` = ?"; $result = $this->query($query, array($rows, $module_id)); } diff --git a/modules/mod_admin_menu.php b/modules/mod_admin_menu.php index 117921e..827abca 100644 --- a/modules/mod_admin_menu.php +++ b/modules/mod_admin_menu.php @@ -1,4 +1,8 @@ <?php +/** + * @package kernel + * @subpackage modules + */ $adminMenu = array(); foreach( array_keys( $gBitSystem->mPackages ) as $package ) { $package = strtolower( $package ); diff --git a/modules/mod_admin_menu.tpl b/modules/mod_admin_menu.tpl index 16388cd..9c6530c 100644 --- a/modules/mod_admin_menu.tpl +++ b/modules/mod_admin_menu.tpl @@ -3,7 +3,7 @@ {foreach key=key item=menu from=$adminMenu} <div class="admenu {$key}menu"> {if $gBitSystemPrefs.feature_menusfolderstyle eq 'y'} - <a class="menuhead" href="javascript:icntoggle('{$key}admenu');">{biticon ipackage=liberty iname="folder" id="`$key`menuimg" iexplain="folder"} + <a class="menuhead" href="javascript:icntoggle('{$key}admenu');">{biticon ipackage=liberty iname="collapsed" id="`$key`menuimg" iexplain="folder"} {else} <a class="menuhead" href="javascript:toggle('{$key}admenu');"> {/if} @@ -20,7 +20,7 @@ {/foreach} <div class="admenu {$key}menu"> {if $gBitSystemPrefs.feature_menusfolderstyle eq 'y'} - <a class="menuhead" href="javascript:icntoggle('layoutadmenu');">{biticon ipackage=liberty iname="folder" id="`$key`menuimg" iexplain="folder"} + <a class="menuhead" href="javascript:icntoggle('layoutadmenu');">{biticon ipackage=liberty iname="collapsed" id="`$key`menuimg" iexplain="folder"} {else} <a class="menuhead" href="javascript:toggle('layoutadmenu');"> {/if} diff --git a/modules/mod_application_menu.php b/modules/mod_application_menu.php index 8b13789..d3c5bfe 100644 --- a/modules/mod_application_menu.php +++ b/modules/mod_application_menu.php @@ -1 +1,7 @@ - +<?php +/** + * @package kernel + * @subpackage modules + */ + +?> diff --git a/modules/mod_application_menu.tpl b/modules/mod_application_menu.tpl index 0b64b40..96834f1 100644 --- a/modules/mod_application_menu.tpl +++ b/modules/mod_application_menu.tpl @@ -1,4 +1,4 @@ -{* $Header: /cvsroot/bitweaver/_bit_kernel/modules/mod_application_menu.tpl,v 1.1 2005/06/19 04:52:54 bitweaver Exp $ *} +{* $Header: /cvsroot/bitweaver/_bit_kernel/modules/mod_application_menu.tpl,v 1.2 2005/06/28 07:45:46 spiderr Exp $ *} {strip} {bitmodule title="$moduleTitle" name="application_menu"} @@ -24,7 +24,7 @@ {else} {if $menu.title} {if $gBitSystemPrefs.feature_menusfolderstyle eq 'y'} - <a class="head" href="javascript:icntoggle('{$key}menu');">{biticon ipackage=liberty iname="folder" id="`$key`menuimg" iexplain="folder"} + <a class="head" href="javascript:icntoggle('{$key}menu');">{biticon ipackage=liberty iname="collapsed" id="`$key`menuimg" iexplain="folder"} {else} <a class="head" href="javascript:toggle('{$key}menu');"> {/if} @@ -59,7 +59,7 @@ {/if} {else} {if $gBitSystemPrefs.feature_menusfolderstyle eq 'y'} - <a class="head" href="javascript:icntoggle('usrmenu');">{biticon ipackage=liberty iname="folder" id="usrmenu" iexplain="folder"} + <a class="head" href="javascript:icntoggle('usrmenu');">{biticon ipackage=liberty iname="collapsed" id="usrmenu" iexplain="folder"} {else} <a class="head" href="javascript:toggle('usrmenu');"> {/if} diff --git a/modules/mod_package_menu.php b/modules/mod_package_menu.php index 94556f0..8b36135 100644 --- a/modules/mod_package_menu.php +++ b/modules/mod_package_menu.php @@ -1,4 +1,8 @@ <?php +/** + * @package kernel + * @subpackage modules + */ global $gBitSystem; if( ACTIVE_PACKAGE == 'messu' ) { $active = 'users'; diff --git a/modules/mod_package_menu.tpl b/modules/mod_package_menu.tpl index 4963cf7..34c09b0 100644 --- a/modules/mod_package_menu.tpl +++ b/modules/mod_package_menu.tpl @@ -1,4 +1,4 @@ -{* $Header: /cvsroot/bitweaver/_bit_kernel/modules/mod_package_menu.tpl,v 1.1 2005/06/19 04:52:54 bitweaver Exp $ *} +{* $Header: /cvsroot/bitweaver/_bit_kernel/modules/mod_package_menu.tpl,v 1.2 2005/06/28 07:45:46 spiderr Exp $ *} {strip} {if $packageMenu} @@ -12,7 +12,7 @@ {foreach key=key item=menu from=$adminMenu} <div class="menu {$key}menu"> {if $gBitSystemPrefs.feature_menusfolderstyle eq 'y'} - <a class="head" href="javascript:icntoggle('{$key}admenu');">{biticon ipackage=liberty iname="folder" id="`$key`admenuimg" iexplain="folder"} + <a class="head" href="javascript:icntoggle('{$key}admenu');">{biticon ipackage=liberty iname="collapsed" id="`$key`admenuimg" iexplain="folder"} {else} <a class="head" href="javascript:toggle('{$key}admenu');"> {/if} @@ -29,7 +29,7 @@ {/foreach} <div class="menu layoutmenu"> {if $gBitSystemPrefs.feature_menusfolderstyle eq 'y'} - <a class="head" href="javascript:icntoggle('layoutadmenu');">{biticon ipackage=liberty iname="folder" id="layoutadmenuimg" iexplain="folder"} + <a class="head" href="javascript:icntoggle('layoutadmenu');">{biticon ipackage=liberty iname="collapsed" id="layoutadmenuimg" iexplain="folder"} {else} <a class="head" href="javascript:toggle('layoutadmenu');"> {/if} diff --git a/modules_inc.php b/modules_inc.php index 6a78a3b..e01c19d 100644 --- a/modules_inc.php +++ b/modules_inc.php @@ -1,11 +1,20 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_kernel/Attic/modules_inc.php,v 1.1 2005/06/19 04:52:53 bitweaver Exp $ +/** + * @version $Header: /cvsroot/bitweaver/_bit_kernel/Attic/modules_inc.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ + * @package kernel + * @subpackage functions + */ + +// $Header: /cvsroot/bitweaver/_bit_kernel/Attic/modules_inc.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ // Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. global $smarty, $bit_p_configure_modules, $user_assigned_modules, $gBitSystem, $modlib, $gBitUser, $fHomepage, $gBitSystem, $modallgroups, $modseparateanon, $bitdomain, $bit_p_view_shoutbox; +/** + * required setup + */ include_once( KERNEL_PKG_PATH.'mod_lib.php' ); // feature dead for now - spiderr - include_once( USERS_PKG_PATH.'module_controls_inc.php' ); diff --git a/notification_lib.php b/notification_lib.php index 4c8339f..e8eac90 100644 --- a/notification_lib.php +++ b/notification_lib.php @@ -1,29 +1,32 @@ <?php /** -* $Header: /cvsroot/bitweaver/_bit_kernel/notification_lib.php,v 1.1 2005/06/19 04:52:53 bitweaver Exp $ -* -* Copyright (c) 2004 bitweaver.org -* Copyright (c) 2003 tikwiki.org -* Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. -* All Rights Reserved. See copyright.txt for details and a complete list of authors. -* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details -* -* $Id: notification_lib.php,v 1.1 2005/06/19 04:52:53 bitweaver Exp $ -*/ + * $Header: /cvsroot/bitweaver/_bit_kernel/notification_lib.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ + * + * Copyright (c) 2004 bitweaver.org + * Copyright (c) 2003 tikwiki.org + * Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. + * All Rights Reserved. See copyright.txt for details and a complete list of authors. + * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details + * + * $Id: notification_lib.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ + * @package kernel + */ + /** -* A library use to store email addresses registered for specific notification events. -* -* Currently used in articles, trackers, users register and wiki. -* -* @date created 2003/06/03 -* @author awcolley -* -* @version $Revision: 1.1 $ $Date: 2005/06/19 04:52:53 $ $Author: bitweaver $ -* -* @class NotificationLib -* @todo does not need to inherit BitBase class. Should hold a BitDb connection as a -* global variable. -*/ + * A library use to store email addresses registered for specific notification events. + * + * Currently used in articles, trackers, users register and wiki. + * + * @package kernel + * @subpackage NotificationLib + * + * created 2003/06/03 + * @author awcolley + * + * @version $Revision: 1.2 $ $Date: 2005/06/28 07:45:45 $ $Author: spiderr $ + * @todo does not need to inherit BitBase class. Should hold a BitDb connection as a + * global variable. + */ class NotificationLib extends BitBase { /** diff --git a/object_permissions.php b/object_permissions.php index 0786543..3f53bb8 100644 --- a/object_permissions.php +++ b/object_permissions.php @@ -1,10 +1,16 @@ <?php - -// $Header: /cvsroot/bitweaver/_bit_kernel/Attic/object_permissions.php,v 1.1 2005/06/19 04:52:53 bitweaver Exp $ +/** + * @version $Header: /cvsroot/bitweaver/_bit_kernel/Attic/object_permissions.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ + * @package kernel + * @subpackage functions + */ // Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. +/** + * required setup + */ include_once( '../bit_setup_inc.php' ); if (!$gBitUser->isAdmin()) { diff --git a/preflight_inc.php b/preflight_inc.php index 630a11e..ad20399 100644 --- a/preflight_inc.php +++ b/preflight_inc.php @@ -1,10 +1,16 @@ <?php /** -* * Return system defined temporary directory. -* In Unix, this is usually /tmp -* In Windows, this is usually c:\windows\temp or c:\winnt\temp -* \static -*/ + * @version $Header: /cvsroot/bitweaver/_bit_kernel/Attic/preflight_inc.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ + * @package kernel + * @subpackage functions + */ + +/** + * * Return system defined temporary directory. + * In Unix, this is usually /tmp + * In Windows, this is usually c:\windows\temp or c:\winnt\temp + * \static + */ function getTempDir() { static $tempdir; @@ -18,9 +24,9 @@ function getTempDir() } /** -* * Return true if windows, otherwise false -* \static -*/ + * * Return true if windows, otherwise false + * \static + */ function isWindows() { static $windows; @@ -114,18 +120,18 @@ function mkdir_p($target, $perms = 0777) */ /** -* Check minimum PHP version -* @param pVersion is the minimum PHP version required -**/ + * Check minimum PHP version + * @param pVersion is the minimum PHP version required + */ function chkPhpVersion($pVersion) { $this->chkPhpExtension("", $pVersion); } /** -* Check minimum PHP extension version -* @param pExtension is the extension name -* @param pVersion is the minimum extension version required + * Check minimum PHP extension version + * @param pExtension is the extension name + * @param pVersion is the minimum extension version required **/ function chkPhpExtension($pExtension, $pVersion) { @@ -135,8 +141,8 @@ function chkPhpExtension($pExtension, $pVersion) } /** -* Used to check if files are writeable by the webserver -* @param pFile the name of the file to be checked + * Used to check if files are writeable by the webserver + * @param pFile the name of the file to be checked **/ function isFileWriteable($pFile) { @@ -156,8 +162,8 @@ function isFileWriteable($pFile) } /** -* Used to check if directories are writeable by the webserver -* @param pDir the name of the directory to be checked + * Used to check if directories are writeable by the webserver + * @param pDir the name of the directory to be checked **/ function isDirectoryWriteable($pDir) { @@ -177,10 +183,10 @@ function isDirectoryWriteable($pDir) } /** -* Used to check php.ini settings -* @param pName setting name -* @param pValue setting value -* @param pComp setting comparison + * Used to check php.ini settings + * @param pName setting name + * @param pValue setting value + * @param pComp setting comparison **/ function chkPhpSetting($pName, $pValue, $pComp='') { diff --git a/rank_lib.php b/rank_lib.php index 7025d07..5b4570a 100644 --- a/rank_lib.php +++ b/rank_lib.php @@ -1,5 +1,13 @@ <?php +/** + * @version $Header: /cvsroot/bitweaver/_bit_kernel/Attic/rank_lib.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ + * @package kernel + */ +/** + * @package kernel + * @subpackage RankLib + */ class RankLib extends BitBase { function RankLib() { BitBase::BitBase(); diff --git a/setup_inc.php b/setup_inc.php index d5a2990..0c454eb 100644 --- a/setup_inc.php +++ b/setup_inc.php @@ -1,8 +1,16 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_kernel/setup_inc.php,v 1.5 2005/06/21 17:55:11 bitweaver Exp $ +/** + * @version $Header: /cvsroot/bitweaver/_bit_kernel/setup_inc.php,v 1.6 2005/06/28 07:45:45 spiderr Exp $ + * @package kernel + * @subpackage functions + */ + // Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. +/** + * required setup + */ require_once(BIT_ROOT_PATH . 'kernel/config_defaults_inc.php'); error_reporting( BIT_PHP_ERROR_REPORTING ); diff --git a/simple_form_functions_lib.php b/simple_form_functions_lib.php index b67aae9..c4ebb49 100644 --- a/simple_form_functions_lib.php +++ b/simple_form_functions_lib.php @@ -1,4 +1,13 @@ <?php +/** + * @version $Header: /cvsroot/bitweaver/_bit_kernel/simple_form_functions_lib.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ + * @package kernel + * @subpackage functions + */ + +/** + * simple_set_toggle + */ function simple_set_toggle($feature, $pPackageName=NULL) { // make function compatible with {html_checkboxes} if( isset( $_REQUEST[$feature][0] ) ) { @@ -7,6 +16,9 @@ function simple_set_toggle($feature, $pPackageName=NULL) { toggle_preference( $feature, (isset($_REQUEST[$feature]) ? $_REQUEST[$feature] : NULL), $pPackageName ); } +/** + * toggle_preference + */ function toggle_preference( $pName, $pValue, $pPackageName=NULL ) { global $_REQUEST, $gBitSystem, $smarty; @@ -20,6 +32,9 @@ function toggle_preference( $pName, $pValue, $pPackageName=NULL ) { $gBitSystem->storePreference( $pName, $prefValue, $pPackageName ); } +/** + * simple_set_value + */ function simple_set_value($feature) { global $_REQUEST, $gBitSystem, $smarty; if (isset($_REQUEST[$feature])) { @@ -28,6 +43,9 @@ function simple_set_value($feature) { } } +/** + * simple_set_int + */ function simple_set_int($feature) { global $_REQUEST, $gBitSystem, $smarty; if (isset($_REQUEST[$feature]) && is_numeric($_REQUEST[$feature])) { @@ -36,6 +54,9 @@ function simple_set_int($feature) { } } +/** + * byref_set_value + */ function byref_set_value($feature, $pref = "", $pPackageName=NULL) { global $_REQUEST, $gBitSystem, $smarty; if (isset($_REQUEST[$feature])) { @@ -51,10 +72,14 @@ function byref_set_value($feature, $pref = "", $pPackageName=NULL) { } } -// simple function used to work out what tab was pressed and activates the correct tab after reload -// use with <tabname>TabSubmit as the name of the submit button value and set your tabpage class like this -// <div class="tabpage {$<tabname>TabSelect}"> -// returns <tabname> that was submitted +/** + * set_tab + * + * simple function used to work out what tab was pressed and activates the correct tab after reload + * use with <tabname>TabSubmit as the name of the submit button value and set your tabpage class like this + * <div class="tabpage {$<tabname>TabSelect}"> + * @returns <tabname> that was submitted + */ function set_tab() { global $_REQUEST,$smarty; $ret = FALSE; diff --git a/smarty_bit/block.bitmodule.php b/smarty_bit/block.bitmodule.php index 3f4fecd..afc61c8 100644 --- a/smarty_bit/block.bitmodule.php +++ b/smarty_bit/block.bitmodule.php @@ -1,5 +1,10 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_kernel/smarty_bit/block.bitmodule.php,v 1.1 2005/06/19 04:52:53 bitweaver Exp $ +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ +// $Header: /cvsroot/bitweaver/_bit_kernel/smarty_bit/block.bitmodule.php,v 1.2 2005/06/28 07:45:46 spiderr Exp $ /** * \brief Smarty {bitmodule}{/bitmodule} block handler * diff --git a/smarty_bit/block.repeat.php b/smarty_bit/block.repeat.php index 1eb200e..5af5cab 100644 --- a/smarty_bit/block.repeat.php +++ b/smarty_bit/block.repeat.php @@ -1,16 +1,22 @@ <?php -/* -* Smarty plugin -* ------------------------------------------------------------- -* File: block.repeat.php -* Type: block -* Name: repeat -* Purpose: repeat a template block a given number of times -* Parameters: count [required] - number of times to repeat -* assign [optional] - variable to collect output -* Author: Scott Matthewman <scott@matthewman.net> -* ------------------------------------------------------------- -*/ +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * Smarty plugin + * ------------------------------------------------------------- + * File: block.repeat.php + * Type: block + * Name: repeat + * Purpose: repeat a template block a given number of times + * Parameters: count [required] - number of times to repeat + * assign [optional] - variable to collect output + * Author: Scott Matthewman <scott@matthewman.net> + * ------------------------------------------------------------- + */ function smarty_block_repeat( $params, $content, &$smarty ) { if( !empty( $content ) ) { $intCount = intval( $params['count'] ); diff --git a/smarty_bit/block.sortlinks.php b/smarty_bit/block.sortlinks.php index af639ed..93fbad5 100644 --- a/smarty_bit/block.sortlinks.php +++ b/smarty_bit/block.sortlinks.php @@ -1,16 +1,22 @@ <?php -/* -* Smarty plugin -* ------------------------------------------------------------- -* File: block.repeat.php -* Type: block -* Name: repeat -* Purpose: repeat a template block a given number of times -* Parameters: count [required] - number of times to repeat -* assign [optional] - variable to collect output -* Author: Scott Matthewman <scott@matthewman.net> -* ------------------------------------------------------------- -*/ +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * Smarty plugin + * ------------------------------------------------------------- + * File: block.repeat.php + * Type: block + * Name: repeat + * Purpose: repeat a template block a given number of times + * Parameters: count [required] - number of times to repeat + * assign [optional] - variable to collect output + * Author: Scott Matthewman <scott@matthewman.net> + * ------------------------------------------------------------- + */ function smarty_block_sortlinks($params, $content, &$smarty) { if ($content) { diff --git a/smarty_bit/block.tr.php b/smarty_bit/block.tr.php index 77c7500..3bee26d 100644 --- a/smarty_bit/block.tr.php +++ b/smarty_bit/block.tr.php @@ -1,5 +1,11 @@ <?php -/* +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** * Smarty plugin * ------------------------------------------------------------- * File: block.translate.php diff --git a/smarty_bit/function.banner.php b/smarty_bit/function.banner.php index 6f47527..a9c36bf 100644 --- a/smarty_bit/function.banner.php +++ b/smarty_bit/function.banner.php @@ -1,5 +1,13 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ +/** +* smarty_function_banner +*/ function smarty_function_banner($params, &$smarty) { global $gBitSystem; diff --git a/smarty_bit/function.bithelp.php b/smarty_bit/function.bithelp.php index ca13f44..20489f8 100755 --- a/smarty_bit/function.bithelp.php +++ b/smarty_bit/function.bithelp.php @@ -1,5 +1,17 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * source elements + */ require_once('function.biticon.php'); +/** +* smarty_function_bithelp +*/ function smarty_function_bithelp($params, &$smarty) { global $gBitSystem, $gBitUser; $outstr = ""; diff --git a/smarty_bit/function.biticon.php b/smarty_bit/function.biticon.php index 957f02a..d11d0cd 100644 --- a/smarty_bit/function.biticon.php +++ b/smarty_bit/function.biticon.php @@ -1,4 +1,13 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** +* get_first_match +*/ function get_first_match($dir,$filename) { if(!is_dir($dir)) { @@ -27,6 +36,9 @@ function get_first_match($dir,$filename) return false; } +/** +* output_icon +*/ function output_icon($params, $file) { global $gBitSystem; @@ -62,6 +74,9 @@ function output_icon($params, $file) { return $outstr; } +/** +* smarty_function_biticon +*/ function smarty_function_biticon($params, &$smarty) { global $gBitSystem, $icon_style; diff --git a/smarty_bit/function.content.php b/smarty_bit/function.content.php index 2f5d0d6..edd81c0 100644 --- a/smarty_bit/function.content.php +++ b/smarty_bit/function.content.php @@ -1,4 +1,13 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * smarty_function_content + */ function smarty_function_content($params, &$smarty) { global $gBitSystem; diff --git a/smarty_bit/function.cookie.php b/smarty_bit/function.cookie.php index c67fdc3..9e4df14 100644 --- a/smarty_bit/function.cookie.php +++ b/smarty_bit/function.cookie.php @@ -1,4 +1,13 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * smarty_function_cookie + */ function smarty_function_cookie($params, &$smarty) { global $taglinelib; diff --git a/smarty_bit/function.displaycomment.php b/smarty_bit/function.displaycomment.php index 36ea375..c230693 100644 --- a/smarty_bit/function.displaycomment.php +++ b/smarty_bit/function.displaycomment.php @@ -1,5 +1,13 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ +/** + * smarty_function_displaycomment + */ function smarty_function_displaycomment($params) { global $smarty; if (!empty($params['comment'])) { diff --git a/smarty_bit/function.displayname.php b/smarty_bit/function.displayname.php index 04b45ec..bc5128e 100644 --- a/smarty_bit/function.displayname.php +++ b/smarty_bit/function.displayname.php @@ -1,4 +1,9 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ /**** smarty_function_displayName * This is a smarty function which will allow different values to be diff --git a/smarty_bit/function.ed.php b/smarty_bit/function.ed.php index 4e84fbf..074fc56 100644 --- a/smarty_bit/function.ed.php +++ b/smarty_bit/function.ed.php @@ -1,4 +1,13 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * smarty_function_ed + */ function smarty_function_ed($params, &$smarty) { global $gBitSystem; diff --git a/smarty_bit/function.elapsed.php b/smarty_bit/function.elapsed.php index c4de978..8a1825f 100644 --- a/smarty_bit/function.elapsed.php +++ b/smarty_bit/function.elapsed.php @@ -1,4 +1,13 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * smarty_function_elapsed + */ function smarty_function_elapsed($params, &$smarty) { global $gBitSystem; diff --git a/smarty_bit/function.gallery.php b/smarty_bit/function.gallery.php index c917c56..230cb9f 100644 --- a/smarty_bit/function.gallery.php +++ b/smarty_bit/function.gallery.php @@ -1,4 +1,13 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * smarty_function_gallery + */ function smarty_function_gallery($params, &$smarty) { global $gBitSystem; diff --git a/smarty_bit/function.helplink.php b/smarty_bit/function.helplink.php index 83a68f4..1069f4d 100644 --- a/smarty_bit/function.helplink.php +++ b/smarty_bit/function.helplink.php @@ -1,6 +1,13 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ - +/** + * smarty_function_helplink + */ function smarty_function_helplink($params, &$smarty) { extract($params); diff --git a/smarty_bit/function.inlinemodule.php b/smarty_bit/function.inlinemodule.php index ad3f2e7..9a567f7 100644 --- a/smarty_bit/function.inlinemodule.php +++ b/smarty_bit/function.inlinemodule.php @@ -1,8 +1,15 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ -// Usage: add to the body of any .tpl file -// Example: {inlinemodule file="bitpackage:wiki/mod_last_modif_pages.tpl" rows="50"} +/** + * Usage: add to the body of any .tpl file + * Example: {inlinemodule file="bitpackage:wiki/mod_last_modif_pages.tpl" rows="50"} + */ function smarty_function_inlinemodule($params, &$smarty) { global $module_rows, $module_params; diff --git a/smarty_bit/function.jspopup.php b/smarty_bit/function.jspopup.php index ccf84ba..6d2a714 100644 --- a/smarty_bit/function.jspopup.php +++ b/smarty_bit/function.jspopup.php @@ -1,6 +1,13 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ - +/** + * smarty_function_jspopup + */ function smarty_function_jspopup($params, &$smarty) { extract($params); diff --git a/smarty_bit/function.memusage.php b/smarty_bit/function.memusage.php index fc4855f..bb5c76c 100644 --- a/smarty_bit/function.memusage.php +++ b/smarty_bit/function.memusage.php @@ -1,4 +1,13 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * smarty_function_memusage + */ function smarty_function_memusage($params, &$smarty) { if (function_exists('memory_get_usage')) { diff --git a/smarty_bit/function.menu.php b/smarty_bit/function.menu.php index 11f4b08..2fa0a3c 100644 --- a/smarty_bit/function.menu.php +++ b/smarty_bit/function.menu.php @@ -1,4 +1,13 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * smarty_function_menu + */ function smarty_function_menu($params, &$smarty) { global $menulib; diff --git a/smarty_bit/function.poll.php b/smarty_bit/function.poll.php index 3350da4..2969f95 100644 --- a/smarty_bit/function.poll.php +++ b/smarty_bit/function.poll.php @@ -1,6 +1,18 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * smarty_function_base + */ require_once( KERNEL_PKG_PATH.'BitBase.php' ); +/** + * smarty_function_poll + */ function smarty_function_poll($params, &$smarty) { global $polllib, $gBitSystem; diff --git a/smarty_bit/function.querytable.php b/smarty_bit/function.querytable.php index f4740a5..8a7c1d1 100644 --- a/smarty_bit/function.querytable.php +++ b/smarty_bit/function.querytable.php @@ -1,28 +1,34 @@ <?php -/* -Experimental work not finished yet -An attempt to componentize all tables showing query results +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ -Usage: -{querytable - table ="" (Table or tables, example tiki_pages,users) - template = "" (Template to be used for table rows, put them in templates/tables) +/** + * Experimental work not finished yet + * An attempt to componentize all tables showing query results - where = "" (Where condition for the query) - columns="col1,col2,col3" (Columns to be selected from the query, default = *) - colalign="left,center,right" (Alignement for columns you can also use the template for this) - sort_column = "col2" (Column to sort the data initially) - sort_order = "desc" (Sort order) - max_rows = "10" (Max number of rows to display per page) - height = "" (Height for the table area) - directpagination = "0" (Use directlinks to pages) - combopagination = "0" (Use a combo to directly jump to a page) - tableclass = "normal" (CSS class name for the table) - columnheadingclass = "normal" (CSS class name for the columnheadings) - oddrowclass = "odd" - evenrowclass = "even" -} -*/ + * Usage: + * {querytable + * table ="" (Table or tables, example tiki_pages,users) + * template = "" (Template to be used for table rows, put them in templates/tables) + * + * where = "" (Where condition for the query) + * columns="col1,col2,col3" (Columns to be selected from the query, default = *) + * colalign="left,center,right" (Alignement for columns you can also use the template for this) + * sort_column = "col2" (Column to sort the data initially) + * sort_order = "desc" (Sort order) + * max_rows = "10" (Max number of rows to display per page) + * height = "" (Height for the table area) + * directpagination = "0" (Use directlinks to pages) + * combopagination = "0" (Use a combo to directly jump to a page) + * tableclass = "normal" (CSS class name for the table) + * columnheadingclass = "normal" (CSS class name for the columnheadings) + * oddrowclass = "odd" + * evenrowclass = "even" + * } + */ //SECURITY HERE! diff --git a/smarty_bit/function.rcontent.php b/smarty_bit/function.rcontent.php index ecca9a3..46ed884 100644 --- a/smarty_bit/function.rcontent.php +++ b/smarty_bit/function.rcontent.php @@ -1,5 +1,13 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ +/** + * smarty_function_rcontent + */ function smarty_function_rcontent($params, &$smarty) { global $gBitSystem; diff --git a/smarty_bit/function.rss.php b/smarty_bit/function.rss.php index a563d6b..0a4ca48 100644 --- a/smarty_bit/function.rss.php +++ b/smarty_bit/function.rss.php @@ -1,6 +1,13 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ - +/** + * smarty_function_rss + */ function smarty_function_rss($params, &$smarty) { global $gBitSystem; diff --git a/smarty_bit/function.sameurl.php b/smarty_bit/function.sameurl.php index 48476fb..5d9192e 100644 --- a/smarty_bit/function.sameurl.php +++ b/smarty_bit/function.sameurl.php @@ -1,6 +1,14 @@ <?php -// Do NOT change this plugin under any circunstances! +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ +// Do NOT change this plugin under any circunstances! +/** + * smarty_function_sameurl + */ function smarty_function_sameurl($params, &$smarty) { global $sameurl_elements; diff --git a/smarty_bit/function.showdate.php b/smarty_bit/function.showdate.php index dd314d6..0150b43 100644 --- a/smarty_bit/function.showdate.php +++ b/smarty_bit/function.showdate.php @@ -1,4 +1,13 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * smarty_function_showdate + */ function smarty_function_showdate($params, &$smarty) { diff --git a/smarty_bit/function.var_dump.php b/smarty_bit/function.var_dump.php index 09c678c..30ffee1 100644 --- a/smarty_bit/function.var_dump.php +++ b/smarty_bit/function.var_dump.php @@ -1,6 +1,12 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + /** \file - * $Header: /cvsroot/bitweaver/_bit_kernel/smarty_bit/function.var_dump.php,v 1.1 2005/06/19 04:52:53 bitweaver Exp $ + * $Header: /cvsroot/bitweaver/_bit_kernel/smarty_bit/function.var_dump.php,v 1.2 2005/06/28 07:45:46 spiderr Exp $ * * \author zaufi <zaufi@sendmail.ru> */ diff --git a/smarty_bit/modifier.act_icon.php b/smarty_bit/modifier.act_icon.php index b390865..72d2d2d 100644 --- a/smarty_bit/modifier.act_icon.php +++ b/smarty_bit/modifier.act_icon.php @@ -1,6 +1,13 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ - +/** + * smarty_modifier_act_icon + */ function smarty_modifier_act_icon($type,$isInter='n') { $md = $isInter == 'y' ? "_blue" : ""; diff --git a/smarty_bit/modifier.adjust.php b/smarty_bit/modifier.adjust.php index 58da421..b6b2078 100644 --- a/smarty_bit/modifier.adjust.php +++ b/smarty_bit/modifier.adjust.php @@ -1,6 +1,11 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ -/* +/** * Smarty plugin * ------------------------------------------------------------- * Type: modifier diff --git a/smarty_bit/modifier.avatarize.php b/smarty_bit/modifier.avatarize.php index c013388..4f0fb94 100644 --- a/smarty_bit/modifier.avatarize.php +++ b/smarty_bit/modifier.avatarize.php @@ -1,6 +1,11 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ -/* +/** * Smarty plugin * ------------------------------------------------------------- * Type: modifier diff --git a/smarty_bit/modifier.bit_date_format.php b/smarty_bit/modifier.bit_date_format.php index d117d69..66a9440 100644 --- a/smarty_bit/modifier.bit_date_format.php +++ b/smarty_bit/modifier.bit_date_format.php @@ -1,6 +1,16 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * required setup + */ +require_once $smarty->_get_plugin_filepath('shared','make_timestamp'); -/* +/** * Smarty plugin * ------------------------------------------------------------- * Type: modifier @@ -11,7 +21,6 @@ * default_date: default date if $string is empty * ------------------------------------------------------------- */ -require_once $smarty->_get_plugin_filepath('shared','make_timestamp'); function smarty_modifier_bit_date_format($string, $format = "%b %e, %Y", $default_date=null, $tra_format=null) { global $gBitSystem, $user; diff --git a/smarty_bit/modifier.bit_long_date.php b/smarty_bit/modifier.bit_long_date.php index 78e806e..2228e1a 100644 --- a/smarty_bit/modifier.bit_long_date.php +++ b/smarty_bit/modifier.bit_long_date.php @@ -1,6 +1,18 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ +/** + * required setup + */ require_once $smarty->_get_plugin_filepath('modifier','bit_date_format'); + +/** + * smarty_modifier_bit_long_date + */ function smarty_modifier_bit_long_date($string) { global $gBitSystem; diff --git a/smarty_bit/modifier.bit_long_datetime.php b/smarty_bit/modifier.bit_long_datetime.php index f7b14ed..c00943a 100644 --- a/smarty_bit/modifier.bit_long_datetime.php +++ b/smarty_bit/modifier.bit_long_datetime.php @@ -1,6 +1,18 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ +/** + * required setup + */ require_once $smarty->_get_plugin_filepath('modifier','bit_date_format'); + +/** + * smarty_modifier_bit_long_datetime + */ function smarty_modifier_bit_long_datetime($string) { global $gBitSystem; diff --git a/smarty_bit/modifier.bit_long_time.php b/smarty_bit/modifier.bit_long_time.php index b7e2839..3fd4c33 100644 --- a/smarty_bit/modifier.bit_long_time.php +++ b/smarty_bit/modifier.bit_long_time.php @@ -1,6 +1,18 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ +/** + * required setup + */ require_once $smarty->_get_plugin_filepath('modifier','bit_date_format'); + +/** + * smarty_modifier_bit_long_time + */ function smarty_modifier_bit_long_time($string) { global $gBitSystem; diff --git a/smarty_bit/modifier.bit_short_date.php b/smarty_bit/modifier.bit_short_date.php index f2352ac..d64ddad 100644 --- a/smarty_bit/modifier.bit_short_date.php +++ b/smarty_bit/modifier.bit_short_date.php @@ -1,6 +1,18 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ +/** + * required setup + */ require_once $smarty->_get_plugin_filepath('modifier','bit_date_format'); + +/** + * smarty_modifier_bit_short_date + */ function smarty_modifier_bit_short_date($string) { global $gBitSystem; diff --git a/smarty_bit/modifier.bit_short_datetime.php b/smarty_bit/modifier.bit_short_datetime.php index 53cab7d..a46ff50 100644 --- a/smarty_bit/modifier.bit_short_datetime.php +++ b/smarty_bit/modifier.bit_short_datetime.php @@ -1,7 +1,18 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ +/** + * required setup + */ require_once $smarty->_get_plugin_filepath('modifier','bit_date_format'); +/** + * smarty_modifier_bit_short_datetime + */ function smarty_modifier_bit_short_datetime($string) { global $gBitSystem; diff --git a/smarty_bit/modifier.bit_short_time.php b/smarty_bit/modifier.bit_short_time.php index 796a095..bf2534c 100644 --- a/smarty_bit/modifier.bit_short_time.php +++ b/smarty_bit/modifier.bit_short_time.php @@ -1,6 +1,19 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * required setup + */ require_once $smarty->_get_plugin_filepath('modifier','bit_date_format'); + +/** + * smarty_modifier_bit_short_time + */ function smarty_modifier_bit_short_time($string) { global $gBitSystem; diff --git a/smarty_bit/modifier.countryflag.php b/smarty_bit/modifier.countryflag.php index 95a0cc7..c93aa7d 100644 --- a/smarty_bit/modifier.countryflag.php +++ b/smarty_bit/modifier.countryflag.php @@ -1,6 +1,11 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ -/* +/** * Smarty plugin * ------------------------------------------------------------- * Type: modifier diff --git a/smarty_bit/modifier.dbg.php b/smarty_bit/modifier.dbg.php index 9ca785f..7736925 100644 --- a/smarty_bit/modifier.dbg.php +++ b/smarty_bit/modifier.dbg.php @@ -1,8 +1,14 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + /** \file - * $Header: /cvsroot/bitweaver/_bit_kernel/smarty_bit/modifier.dbg.php,v 1.1 2005/06/19 04:52:53 bitweaver Exp $ + * $Header: /cvsroot/bitweaver/_bit_kernel/smarty_bit/modifier.dbg.php,v 1.2 2005/06/28 07:45:47 spiderr Exp $ * - * \author zaufi <zaufi@sendmail.ru> + * @author zaufi <zaufi@sendmail.ru> */ /** diff --git a/smarty_bit/modifier.div.php b/smarty_bit/modifier.div.php index bd89878..7431b1f 100644 --- a/smarty_bit/modifier.div.php +++ b/smarty_bit/modifier.div.php @@ -1,6 +1,12 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + -/* +/** * Smarty plugin * ------------------------------------------------------------- * Type: modifier diff --git a/smarty_bit/modifier.duration.php b/smarty_bit/modifier.duration.php index 38439bc..51daa45 100644 --- a/smarty_bit/modifier.duration.php +++ b/smarty_bit/modifier.duration.php @@ -1,6 +1,11 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ -/* +/** * Smarty plugin * ------------------------------------------------------------- * Type: modifier diff --git a/smarty_bit/modifier.iconify.php b/smarty_bit/modifier.iconify.php index 7f9aa02..31eb528 100644 --- a/smarty_bit/modifier.iconify.php +++ b/smarty_bit/modifier.iconify.php @@ -1,6 +1,11 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ -/* +/** * Smarty plugin * ------------------------------------------------------------- * Type: modifier diff --git a/smarty_bit/modifier.kbsize.php b/smarty_bit/modifier.kbsize.php index f2c8652..ec521b6 100644 --- a/smarty_bit/modifier.kbsize.php +++ b/smarty_bit/modifier.kbsize.php @@ -1,6 +1,11 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ -/* +/** * Smarty plugin * ------------------------------------------------------------- * Type: modifier diff --git a/smarty_bit/modifier.nlbr.php b/smarty_bit/modifier.nlbr.php index fb63ed4..03f9d96 100644 --- a/smarty_bit/modifier.nlbr.php +++ b/smarty_bit/modifier.nlbr.php @@ -1,6 +1,11 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ -/* +/** * Smarty plugin * ------------------------------------------------------------- * Type: modifier diff --git a/smarty_bit/modifier.quoted.php b/smarty_bit/modifier.quoted.php index 4dfecb9..f529375 100644 --- a/smarty_bit/modifier.quoted.php +++ b/smarty_bit/modifier.quoted.php @@ -1,6 +1,11 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ -/* +/** * Smarty plugin * ------------------------------------------------------------- * Type: modifier diff --git a/smarty_bit/modifier.times.php b/smarty_bit/modifier.times.php index 8f3379e..385d134 100644 --- a/smarty_bit/modifier.times.php +++ b/smarty_bit/modifier.times.php @@ -1,5 +1,13 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ +/** + * smarty_modifier_times + */ function smarty_modifier_times($n1,$n2) { return $n1*$n2; diff --git a/smarty_bit/modifier.userlink.php b/smarty_bit/modifier.userlink.php index 11931ac..b7d2f36 100644 --- a/smarty_bit/modifier.userlink.php +++ b/smarty_bit/modifier.userlink.php @@ -1,5 +1,13 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ +/** + * smarty_modifier_userlink + */ function smarty_modifier_userlink($user,$class='username') { return '<a class="'.$class.'" href="'.USERS_PKG_URL.'index.php?home='.$user.'">'.$user.'</a>'; } diff --git a/smarty_bit/outputfilter.highlight.php b/smarty_bit/outputfilter.highlight.php index 2e76635..3bbc7c8 100644 --- a/smarty_bit/outputfilter.highlight.php +++ b/smarty_bit/outputfilter.highlight.php @@ -1,5 +1,11 @@ <?php -/* +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** * Smarty plugin * ------------------------------------------------------------- * File: outputfilter.highlight.php diff --git a/smarty_bit/prefilter.tr.php b/smarty_bit/prefilter.tr.php index c9d6ee8..31cd6a2 100644 --- a/smarty_bit/prefilter.tr.php +++ b/smarty_bit/prefilter.tr.php @@ -1,4 +1,13 @@ <?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * smarty_prefilter_tr + */ function smarty_prefilter_tr($source) { // Now replace the matched language strings with the entry in the file // $return = preg_replace_callback('/\{tr[^\{]*\}([^\{]+)\{\/tr\}/', '_translate_lang', $source); @@ -8,6 +17,9 @@ function smarty_prefilter_tr($source) { return $return; } +/** + * _translate_lang + */ function _translate_lang($key) { global $gBitLanguage, $lang; $trans = $gBitLanguage->translate( $key[2] ); diff --git a/smarty_bit/resource.bitpackage.php b/smarty_bit/resource.bitpackage.php index cd35ced..63d09e4 100755 --- a/smarty_bit/resource.bitpackage.php +++ b/smarty_bit/resource.bitpackage.php @@ -1,20 +1,23 @@ <?php -/* -* Smarty plugin -* ------------------------------------------------------------- -* File: resource.bitpackage.php -* Type: resource -* Name: bitpackage -* Purpose: Fetches templates from the correct package -* ------------------------------------------------------------- -*/ -function smarty_resource_bitpackage_source($tpl_name, &$tpl_source, &$smarty) -{ +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * Smarty plugin + * ------------------------------------------------------------- + * File: resource.bitpackage.php + * Type: resource + * Name: bitpackage + * Purpose: Fetches templates from the correct package + * ------------------------------------------------------------- + */ +function smarty_resource_bitpackage_source($tpl_name, &$tpl_source, &$smarty) { global $gBitSystem, $gBitSystem; // gBitSystem is just for temporary backward compatibility $ret = false; -// list( $package, $template ) = split( '/', $tpl_name ); - $path = explode( '/', $tpl_name ); $package = array_shift( $path ); $subdir = ''; @@ -25,51 +28,46 @@ function smarty_resource_bitpackage_source($tpl_name, &$tpl_source, &$smarty) $subdir .= preg_match( '/mod_/', $template ) ? 'modules' : 'templates'; // look in themes/force/ - $forceTemplate = THEMES_PKG_PATH."/force/$template"; - // look in themes/style/<stylename>/<package>/templates/ - $overrideTemplate = $gBitSystem->getStylePath()."/$package/$subdir/$template"; - // look in themes/style/<stylename>/<package>/ - module files are unique anyway - $overrideTemplateSimple = $gBitSystem->getStylePath()."/$package/$template"; - // look in root of style themes/style/<stylename>/ - $overrideRootTemplate = $gBitSystem->getStylePath().$template; + $forceTemplate = THEMES_PKG_PATH."/force/$package/$template"; + $forceTemplateSimple = THEMES_PKG_PATH."/force/$template"; + // look in themes/styles/<stylename> + $overrideTemplate = $gBitSystem->getStylePath()."/$package/$template"; + $overrideTemplateSimple = $gBitSystem->getStylePath().$template; // look for default package template $package_template = BIT_PKG_PATH.$gBitSystem->mPackages[strtolower( $package )]['dir']."/$subdir/$template"; -//vd( $forceTemplate.' - '.$overrideTemplate.' - '.$overrideRootTemplate.' - '.$package_template ); + //vd( $forceTemplateSimple.' - '.$overrideTemplate.' - '.$overrideTemplateSimple.' - '.$package_template ); global $gNoForceStyle; if ( empty( $gNoForceStyle ) && file_exists( $forceTemplate ) ) { $tpl_source = fread( fopen($forceTemplate, "r"), filesize($forceTemplate) ); - $ret = true; + $ret = TRUE; + } elseif ( empty( $gNoForceStyle ) && file_exists( $forceTemplateSimple ) ) { + $tpl_source = fread( fopen($forceTemplateSimple, "r"), filesize($forceTemplateSimple) ); + $ret = TRUE; } elseif ( file_exists( $overrideTemplate ) ) { $tpl_source = fread( fopen($overrideTemplate, "r"), filesize($overrideTemplate) ); - $ret = true; + $ret = TRUE; } elseif ( file_exists( $overrideTemplateSimple ) ) { - $tpl_source = fread( fopen($overrideTemplateSimple, "r"), filesize($overrideTemplateSimple) ); - $ret = true; - } elseif ( file_exists( $overrideRootTemplate ) ) { - $tpl_source = filesize($overrideRootTemplate) ? fread( fopen($overrideRootTemplate, "r"), filesize($overrideRootTemplate) ) : ''; - $ret = true; + $tpl_source = filesize($overrideTemplateSimple) ? fread( fopen($overrideTemplateSimple, "r"), filesize($overrideTemplateSimple) ) : ''; + $ret = TRUE; } elseif ( file_exists( $package_template )) { $tpl_source = fread( fopen($package_template, "r"), filesize($package_template) ); - $ret = true; + $ret = TRUE; } else { - $tpl_source = "<p>MISSING TEMPLATE:<br/> <b>p_resource_type:</b> $p_resource_type<br><b>p_resource_name:</b> $p_resource_name<br><b>p_template_source:</b> $p_template_source<br><b>p_template_timestamp:</b> $p_template_timestamp<br><b>p_smarty_obj:</b> $p_smarty_obj <br /><b>override_template:</b> $override_template<br/><b>package_template:</b>$package_template<br/><b>TIKI Package Path:</b>".BIT_PKG_PATH; - $ret = true; + $tpl_source = "<p>MISSING TEMPLATE:<br/> <b>p_resource_type:</b> $p_resource_type<br/><b>p_resource_name:</b> $p_resource_name<br/><b>p_template_source:</b> $p_template_source<br/><b>p_template_timestamp:</b> $p_template_timestamp<br/><b>p_smarty_obj:</b> $p_smarty_obj <br /><b>override_template:</b> $override_template<br/><b>package_template:</b>$package_template<br/><b>TIKI Package Path:</b>".BIT_PKG_PATH; + $ret = TRUE; } return $ret; } // the PHP sibling file needs to be included in modules_inc before this fetch so caching works properly -function smarty_resource_bitpackage_timestamp($tpl_name, &$tpl_timestamp, &$smarty) -{ +function smarty_resource_bitpackage_timestamp($tpl_name, &$tpl_timestamp, &$smarty) { //$tpl_timestamp = time(); //return true; global $gBitSystem; - $ret = false; - -// list( $package, $template ) = split( '/', $tpl_name ); + $ret = FALSE; $path = explode( '/', $tpl_name ); $package = array_shift( $path ); @@ -80,49 +78,47 @@ function smarty_resource_bitpackage_timestamp($tpl_name, &$tpl_timestamp, &$smar } $subdir .= preg_match( '/mod_/', $template ) ? 'modules' : 'templates'; - // look in themes/force/ - $forceTemplate = THEMES_PKG_PATH."/force/$template"; - // look in themes/style/<stylename>/<package>/templates/ - $overrideTemplate = $gBitSystem->getStylePath()."/$package/$subdir/$template"; + $forceTemplate = THEMES_PKG_PATH."/force/$package/$template"; + $forceTemplateSimple = THEMES_PKG_PATH."/force/$template"; // look in themes/style/<stylename>/<package>/templates/ - $overrideTemplateSimple = $gBitSystem->getStylePath()."/$package/$template"; + $overrideTemplate = $gBitSystem->getStylePath()."/$package/$template"; // look in root of style themes/style/<stylename>/ - $overrideRootTemplate = $gBitSystem->getStylePath().$template; + $overrideTemplateSimple = $gBitSystem->getStylePath().$template; // look for default package template $package_template = BIT_PKG_PATH.$gBitSystem->mPackages[strtolower( $package )]['dir']."/$subdir/$template"; -//print "<br/>Time ($package $template)(FORCE: $forceTemplate<br/>OVERRIDE: $overrideTemplate $overrideRootTemplate $package_template)<br/>"; + + //print "<br/>Time ($package $template)(FORCE: $forceTemplateSimple<br/>OVERRIDE: $overrideTemplate $overrideTemplateSimple $package_template)<br/>"; + global $gNoForceStyle; if ( empty( $gNoForceStyle ) && file_exists( $forceTemplate ) ) { $tpl_timestamp = filemtime($forceTemplate); - $ret = true; + $ret = TRUE; + } elseif ( empty( $gNoForceStyle ) && file_exists( $forceTemplateSimple ) ) { + $tpl_timestamp = filemtime($forceTemplateSimple); + $ret = TRUE; } elseif ( file_exists( $overrideTemplate ) ) { $tpl_timestamp = filemtime($overrideTemplate); - $ret = true; + $ret = TRUE; } elseif ( file_exists( $overrideTemplateSimple ) ) { $tpl_timestamp = filemtime($overrideTemplateSimple); - $ret = true; - } elseif ( file_exists( $overrideRootTemplate ) ) { - $tpl_timestamp = filemtime($overrideRootTemplate); - $ret = true; + $ret = TRUE; } elseif ( file_exists( $package_template )) { $tpl_timestamp = filemtime($package_template); - $ret = true; + $ret = TRUE; } else { - $ret = false; + $ret = FALSE; } return $ret; } -function smarty_resource_bitpackage_secure($tpl_name, &$smarty) -{ +function smarty_resource_bitpackage_secure($tpl_name, &$smarty) { // assume all templates are secure - return true; + return TRUE; } -function smarty_resource_bitpackage_trusted($tpl_name, &$smarty) -{ +function smarty_resource_bitpackage_trusted($tpl_name, &$smarty) { // not used for templates } ?> diff --git a/smarty_bit/resource.style.php b/smarty_bit/resource.style.php index 2378a48..3553f2b 100644 --- a/smarty_bit/resource.style.php +++ b/smarty_bit/resource.style.php @@ -1,9 +1,14 @@ <?php -/* +/** * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * Smarty plugin - smarty_resource_style_source * ------------------------------------------------------------- - * File: resource.style.php - * Type: resource + * * ------------------------------------------------------------- */ function smarty_resource_style_source($tpl_name, &$tpl_source, &$smarty) @@ -13,6 +18,12 @@ function smarty_resource_style_source($tpl_name, &$tpl_source, &$smarty) // if not then fall } +/** + * Smarty plugin - smarty_resource_style_timestamp + * ------------------------------------------------------------- + * + * ------------------------------------------------------------- + */ function smarty_resource_style_timestamp($tpl_name, &$tpl_timestamp, &$smarty) { // do database call here to populate $tpl_timestamp. @@ -28,12 +39,24 @@ function smarty_resource_style_timestamp($tpl_name, &$tpl_timestamp, &$smarty) } } +/** + * Smarty plugin - smarty_resource_style_secure + * ------------------------------------------------------------- + * + * ------------------------------------------------------------- + */ function smarty_resource_style_secure($tpl_name, &$smarty) { // assume all templates are secure return true; } +/** + * Smarty plugin - smarty_resource_style_trusted + * ------------------------------------------------------------- + * + * ------------------------------------------------------------- + */ function smarty_resource_style_trusted($tpl_name, &$smarty) { // not used for templates diff --git a/tagline_lib.php b/tagline_lib.php index 4da410b..b9a2c1b 100644 --- a/tagline_lib.php +++ b/tagline_lib.php @@ -1,29 +1,33 @@ <?php /** -* $Header: /cvsroot/bitweaver/_bit_kernel/Attic/tagline_lib.php,v 1.1 2005/06/19 04:52:53 bitweaver Exp $ -* -* Copyright (c) 2004 bitweaver.org -* Copyright (c) 2003 tikwiki.org -* Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. -* All Rights Reserved. See copyright.txt for details and a complete list of authors. -* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details -* -* $Id: tagline_lib.php,v 1.1 2005/06/19 04:52:53 bitweaver Exp $ -*/ + * @version $Header: /cvsroot/bitweaver/_bit_kernel/Attic/tagline_lib.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ + * @package kernel + * + * Copyright (c) 2004 bitweaver.org + * Copyright (c) 2003 tikwiki.org + * Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. + * All Rights Reserved. See copyright.txt for details and a complete list of authors. + * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details + * + * $Id: tagline_lib.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ + * + */ + /** -* A library used to store taglines used for Message of the day and other randomly select texts. -* -* Currently used for cookies. -* -* @date created 2003/06/19 -* @author awcolley -* -* @version $Revision: 1.1 $ $Date: 2005/06/19 04:52:53 $ $Author: bitweaver $ -* -* @class TagLineLib -* @todo does not need to inherit BitBase class. Should hold a BitDb connection as a -* global variable. -*/ + * A library used to store taglines used for Message of the day and other randomly select texts. + * + * Currently used for cookies. + * + * @package kernel + * @subpackage TagLineLib + * + * created 2003/06/19 + * + * @author awcolley + * + * @todo does not need to inherit BitBase class. Should hold a BitDb connection as a + * global variable. + */ class TagLineLib extends BitBase { /** diff --git a/templates/header.tpl b/templates/header.tpl index 5d06e2c..ba9b83f 100644 --- a/templates/header.tpl +++ b/templates/header.tpl @@ -101,7 +101,6 @@ theme : "advanced", plugins : "table", debug : false, - cleanup : false, content_css : "{$gBitLoc.THEMES_STYLE_URL}tinymce/tinymce.css", theme_advanced_buttons3_add_before : "tablecontrols,separator", theme_advanced_styles : "Tiki Box=tikibox;Tiki Bar=tikibar;Tiki Table=tikitable;Odd table row=odd;Even table row=even" diff --git a/templates/menu_kernel_admin.tpl b/templates/menu_kernel_admin.tpl index 08a9d7a..73c87df 100644 --- a/templates/menu_kernel_admin.tpl +++ b/templates/menu_kernel_admin.tpl @@ -17,7 +17,7 @@ {* unused - spiderr <li><a class="item" href="{$gBitLoc.KERNEL_PKG_URL}admin/admin_dsn.php">{tr}DSN{/tr}</a></li> *} <li><a class="item" href="{$gBitLoc.KERNEL_PKG_URL}admin/admin_system.php">{tr}System Cache{/tr}</a></li> <li><a class="item" href="{$gBitLoc.KERNEL_PKG_URL}admin/list_cache.php">{tr}Link Cache{/tr}</a></li> - <li><a class="item" href="{$gBitLoc.KERNEL_PKG_URL}admin/phpinfo.php">{tr}phpinfo{/tr}</a></li> + <li><a class="item" href="{$gBitLoc.KERNEL_PKG_URL}admin/phpinfo.php">{tr}PHPinfo{/tr}</a></li> <li><a class="item" href="{$gBitLoc.KERNEL_PKG_URL}admin/admin_notifications.php">{tr}Notification{/tr}</a></li> {if $gBitUser->hasPermission( 'bit_p_edit_cookies' )} <li><a class="item" href="{$gBitLoc.KERNEL_PKG_URL}admin/admin_cookies.php">{tr}Cookies{/tr}</a></li> @@ -25,6 +25,6 @@ {if $gBitSystemPrefs.feature_debug_console eq 'y'} <li><a class="item" href="javascript:toggle('debugconsole');">{tr}Debugger console{/tr}</a></li> {/if} - <li><a class="item" href="{$gBitLoc.KERNEL_PKG_URL}admin/index.php?version_check=1">{tr}Version Check{/tr}</a></li> + <li><a class="item" href="{$gBitLoc.KERNEL_PKG_URL}admin/index.php?version_check=1">{tr}Check Version{/tr}</a></li> </ul> {/strip} diff --git a/templates/menu_layout_admin.tpl b/templates/menu_layout_admin.tpl index f3a39b5..53a852d 100644 --- a/templates/menu_layout_admin.tpl +++ b/templates/menu_layout_admin.tpl @@ -5,8 +5,5 @@ <li><a class="item" href="{$gBitLoc.KERNEL_PKG_URL}admin/index.php?page=modules">{tr}Modules{/tr}</a></li> <li><a class="item" href="{$gBitLoc.KERNEL_PKG_URL}admin/index.php?page=custom_modules">{tr}Custom Modules{/tr}</a></li> {* <li><a class="item" href="{$gBitLoc.KERNEL_PKG_URL}admin/index.php?page=menus">{tr}Menus{/tr}</a></li>*} - {if $gBitSystemPrefs.feature_edit_templates eq 'y' and $gBitUser->hasPermission( 'bit_p_edit_templates' )} - <li><a class="item" href="{$gBitLoc.THEMES_PKG_URL}edit_templates.php">{tr}Templates{/tr}</a></li> - {/if} </ul> {/strip} diff --git a/view_cache.php b/view_cache.php index a72555a..c0a84f4 100644 --- a/view_cache.php +++ b/view_cache.php @@ -1,12 +1,17 @@ <?php - -// $Header: /cvsroot/bitweaver/_bit_kernel/view_cache.php,v 1.1 2005/06/19 04:52:53 bitweaver Exp $ +/** + * @version $Header: /cvsroot/bitweaver/_bit_kernel/view_cache.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $ + * @package kernel + * @subpackage functions + */ // Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. -// Initialization +/** + * required setup + */ require_once( '../bit_setup_inc.php' ); require_once( WIKI_PKG_PATH.'BitPage.php' ); |
