diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2005-08-11 13:03:45 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2005-08-11 13:03:45 +0000 |
| commit | 22473a9ca7ccf4b044cd268a2a038447c11dea6a (patch) | |
| tree | 8e527409a7245f0bee5c8990030f9abc8e8d5623 | |
| parent | 0e49118d5f60e7bb6d0e5bb82da5a37795c32b0e (diff) | |
| download | kernel-22473a9ca7ccf4b044cd268a2a038447c11dea6a.tar.gz kernel-22473a9ca7ccf4b044cd268a2a038447c11dea6a.tar.bz2 kernel-22473a9ca7ccf4b044cd268a2a038447c11dea6a.zip | |
merge recent changes with HEAD - keeping stuff up to date in case someone starts going nuts in HEAD
| -rwxr-xr-x | BitDb.php | 8 | ||||
| -rwxr-xr-x | BitSystem.php | 34 | ||||
| -rw-r--r-- | admin/admin_modules_inc.php | 4 | ||||
| -rw-r--r-- | admin/db_performance.php | 2 | ||||
| -rw-r--r-- | mod_lib.php | 5 | ||||
| -rw-r--r-- | templates/minifind.tpl | 9 |
6 files changed, 42 insertions, 20 deletions
@@ -3,7 +3,7 @@ * ADOdb Library interface Class * * @package kernel - * @version $Header: /cvsroot/bitweaver/_bit_kernel/Attic/BitDb.php,v 1.9 2005/08/07 21:11:31 squareing Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_kernel/Attic/BitDb.php,v 1.10 2005/08/11 13:03:45 squareing Exp $ * * Copyright (c) 2004 bitweaver.org * Copyright (c) 2003 tikwiki.org @@ -941,6 +941,12 @@ class BitDb return $this->mDb->MetaTables( $ttype, $showSchema, $mask ); } + /** + * @return # rows affected by UPDATE/DELETE + */ + function Affected_Rows() { + return $this->mDb->Affected_Rows(); + } /** * Check for Postgres specific extensions */ diff --git a/BitSystem.php b/BitSystem.php index 0d93eff..8d02d2c 100755 --- a/BitSystem.php +++ b/BitSystem.php @@ -3,7 +3,7 @@ * Main bitweaver systems functions * * @package kernel - * @version $Header: /cvsroot/bitweaver/_bit_kernel/BitSystem.php,v 1.12 2005/08/07 17:38:44 squareing Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_kernel/BitSystem.php,v 1.13 2005/08/11 13:03:45 squareing Exp $ * @author spider <spider@steelsun.com> */ // +----------------------------------------------------------------------+ @@ -1165,14 +1165,10 @@ asort( $this->mAppMenu ); */ function getBrowserStyleCss() { global $gSniffer; - $gSniffer->mBrowserInfo['client'] = $gSniffer->property( 'browser' ); - $gSniffer->mBrowserInfo['version'] = $gSniffer->property( 'version' ); - $style = $this->getStyle(); - $ret = NULL; if( file_exists( $this->getStylePath().$this->getStyle().'_'.$gSniffer->property( 'browser' ).'.css' ) ) { $ret = $this->getStyleUrl().$this->getStyle().'_'.$gSniffer->property( 'browser' ).'.css'; } - return $ret; + return !empty( $ret ) ? $ret : NULL; } // >>> // === getAltStyleCss @@ -2167,7 +2163,7 @@ Proceed to the installer <b>at <a href=\"".BIT_ROOT_URL."install/install.php\">" } // should be moved somewhere else. unbreaking things for now - 25-JUN-2005 - spiderr - // \todo remove html hardcoded in diff2 + // \TODO remove html hardcoded in diff2 function diff2($page1, $page2) { $page1 = split("\n", $page1); $page2 = split("\n", $page2); @@ -2182,6 +2178,30 @@ Proceed to the installer <b>at <a href=\"".BIT_ROOT_URL."install/install.php\">" return $html; } + // function to scan other package for files that need to be integrated + // @param $pFile path and filename in question. if the file is a template, no template/ needs to be prepended + // @param $pTrippleCheck (boolean) set to TRUE if you want to make sure all appropriate files are present for the integration + function getPackageIntegrationFiles( $pFile=NULL, $pTrippleCheck=FALSE ) { + global $gBitSystem; + $ret = array(); + if( !empty( $pFile ) ) { + foreach( $gBitSystem->mPackages as $package => $packageInfo ) { + if( is_file( $packageInfo['path'].$pFile ) ) { + if( preg_match( "/\.tpl$/", $pFile ) ) { + $ret[$package] = 'bitpackage:'.$package.'/'.preg_replace( "/templates\//", "", $pFile ); + } else { + $ret[$package] = $packageInfo['path'].$pFile; + } + } + + // if we are doing the tripple check and not all files are present, unset the info for that package + if( $pTrippleCheck && !( is_file( $packageInfo['path'].'get_form_info_inc.php' ) && is_file( $packageInfo['path'].'get_form_info_inc.php' ) && is_file( $packageInfo['path'].'get_form_info_inc.php' ) ) ) { + unset( $ret[$package] ); + } + } + } + return $ret; + } } // === installError diff --git a/admin/admin_modules_inc.php b/admin/admin_modules_inc.php index 24f734b..834f10f 100644 --- a/admin/admin_modules_inc.php +++ b/admin/admin_modules_inc.php @@ -1,6 +1,6 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_kernel/admin/Attic/admin_modules_inc.php,v 1.3 2005/08/07 17:38:45 squareing Exp $ +// $Header: /cvsroot/bitweaver/_bit_kernel/admin/Attic/admin_modules_inc.php,v 1.4 2005/08/11 13:03:45 squareing 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. @@ -127,7 +127,7 @@ foreach ($all_modules as $name=>$module) { // Get a list of all modules currently used by the kernel for layouts $query = "SELECT tl.`module_id`, tl.`layout`, tmm.`module_rsrc` FROM `".BIT_DB_PREFIX."tiki_layouts` tl, `".BIT_DB_PREFIX."tiki_module_map` tmm WHERE tl.`module_id` = tmm.`module_id` AND tl.`user_id` = 1"; -$result = $modlib->query($query); +$result = $modlib->mDb->query($query); $rows = $result->getRows(); // Set up the javascript diff --git a/admin/db_performance.php b/admin/db_performance.php index bfd5256..ba079ca 100644 --- a/admin/db_performance.php +++ b/admin/db_performance.php @@ -28,6 +28,6 @@ For more information, see the <a href="http://phplens.com/lens/adodb/docs-perf.h </p> <?php - $perf =& NewPerfMonitor( $gBitSystem->getDb ); + $perf =& NewPerfMonitor( $gBitSystem->mDb ); $perf->UI($pollsecs=5); ?> diff --git a/mod_lib.php b/mod_lib.php index fe52e06..d3715bd 100644 --- a/mod_lib.php +++ b/mod_lib.php @@ -3,7 +3,7 @@ * Modules Management Library * * @package kernel - * @version $Header: /cvsroot/bitweaver/_bit_kernel/Attic/mod_lib.php,v 1.5 2005/08/07 17:38:45 squareing Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_kernel/Attic/mod_lib.php,v 1.6 2005/08/11 13:03:45 squareing Exp $ */ /** @@ -203,6 +203,7 @@ class ModLib extends BitBase { function unassignModule( $pModuleId, $pUserId = NULL, $pLayout = NULL ) { global $gBitUser; + global $gQueryUser; if (!is_numeric($pModuleId)) { $pModuleId = $this->get_module_id($pModuleId); @@ -226,7 +227,7 @@ class ModLib extends BitBase { } // security check - if( ($gBitUser->isAdmin() || ( $pUserId && $gBitUser->mUserId==$pUserId )) && is_numeric( $pModuleId ) ) { + if( ($gBitUser->isAdmin() || ( $pUserId && $gBitUser->mUserId==$pUserId ) || $gBitUser->object_has_permission( $gBitUser->mUserId, $gQueryUser->mInfo['content_id'], 'bituser', 'bit_p_admin_user') ) && is_numeric( $pModuleId ) ) { $query = "DELETE FROM `".BIT_DB_PREFIX."tiki_layouts` where `module_id`=? $userSql $layoutSql"; $result = $this->mDb->query( $query, $binds ); /* diff --git a/templates/minifind.tpl b/templates/minifind.tpl index f523db3..5063398 100644 --- a/templates/minifind.tpl +++ b/templates/minifind.tpl @@ -4,12 +4,7 @@ <input type="hidden" name="{$name}" value="{$value}" /> {/foreach} <input type="text" name="find" value="{$find|escape}" /> - <input type="submit" name="search" value="{tr}find{/tr}" /> - <a href="{$smarty.server.PHP_SELF} - {if $hidden}?{/if} - {foreach from=$hidden item=value key=name} - {$name}={$value}& - {/foreach} - ">{tr}reset{/tr}</a> + <input type="submit" name="search" value="{tr}Find{/tr}" /> + <input type="button" onclick="location.href='{$smarty.server.PHP_SELF}{if $hidden}?{/if}{foreach from=$hidden item=value key=name}{$name}={$value}&{/foreach}'" value="{tr}Reset{/tr}" /> {/form} {/strip} |
