kernel
[ class tree: kernel ] [ index: kernel ] [ all elements ]

Source for file mod_package_menu.php

Documentation is available at mod_package_menu.php

  1. <?php
  2. /**
  3.  * @package kernel
  4.  * @subpackage modules
  5.  */
  6. global $gBitSystem, $gBitUser, $moduleParams;
  7.  
  8. // if we're on any page in an admin/ dir, we'll simply set this to kernel
  9. if( $gBitUser->isAdmin() ) {
  10.     $admin = preg_match( "!/admin/!", $_SERVER['SCRIPT_NAME'] );
  11. } else {
  12.     $admin =  false;
  13. }
  14.  
  15. $package = !empty($moduleParams['module_params']['package'])?$moduleParams['module_params']['package']:ACTIVE_PACKAGE;
  16.  
  17. if( !empty( $gBitSystem->mAppMenu[$package]['menu_template'] ) && !$admin ) {
  18.     $_template->tpl_vars['packageMenu'] = new Smarty_variable(  $gBitSystem->mAppMenu[$package]  );
  19. }
  20.  
  21. if( empty( $module_title )) {
  22.     $pkgName = constant( strtoupper( $package ).'_PKG_NAME' );
  23.  
  24.     if( $pkgName == 'kernel' || $admin ) {
  25.         $pkgName = 'Administration';
  26.     }
  27.     $title = $gBitSystem->getConfig( $pkgName."_menu_text", ucfirst( $pkgName ));
  28.     $_template->tpl_vars['moduleTitle'] = new Smarty_variable(  $title  );
  29. }
  30. ?>

Documentation generated on Wed, 29 Jul 2015 13:57:11 +0000 by phpDocumentor 1.5.0-lsces