|
From: Jon O. <jon...@us...> - 2006-07-01 21:30:34
|
Update of /cvsroot/mxbb/mx_kb/kb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9904/modules/mx_kb/kb/includes Modified Files: functions.php functions_kb.php Log Message: Minor fixes Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/includes/functions.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** functions.php 28 Jun 2006 21:18:14 -0000 1.8 --- functions.php 1 Jul 2006 21:30:30 -0000 1.9 *************** *** 1476,1482 **** * page header. * - * @param unknown_type $page_title */ ! function kb_page_header( $page_title ) { global $kb_config, $lang, $userdata, $images, $mode; --- 1476,1481 ---- * page header. * */ ! function kb_page_header( ) { global $kb_config, $lang, $userdata, $images, $mode; *************** *** 1582,1592 **** $template->assign_vars( array( - 'QUICK_JUMP_ACTION' => this_kb_mxurl(), - 'S_HIDDEN_VARS' => $s_hidden_vars, - 'L_QUICK_GO' => $lang['Quick_go'], 'L_QUICK_NAV' => $lang['Quick_nav'], 'L_QUICK_JUMP' => $lang['Quick_jump'], 'QUICK_NAV' => $mx_kb->modules[$mx_kb->module_name]->jumpbox, 'S_AUTH_LIST' => $mx_kb->modules[$mx_kb->module_name]->auth_can_list, --- 1581,1591 ---- $template->assign_vars( array( 'L_QUICK_GO' => $lang['Quick_go'], 'L_QUICK_NAV' => $lang['Quick_nav'], 'L_QUICK_JUMP' => $lang['Quick_jump'], 'QUICK_NAV' => $mx_kb->modules[$mx_kb->module_name]->jumpbox, + 'QUICK_JUMP_ACTION' => this_kb_mxurl(), + + 'S_HIDDEN_VARS' => $s_hidden_vars, 'S_AUTH_LIST' => $mx_kb->modules[$mx_kb->module_name]->auth_can_list, Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/includes/functions_kb.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** functions_kb.php 28 Jun 2006 13:58:08 -0000 1.9 --- functions_kb.php 1 Jul 2006 21:30:30 -0000 1.10 *************** *** 24,27 **** --- 24,50 ---- /** + * Enter description here... + * + * @param unknown_type $module_name + */ + function adminmodule( $module_name ) + { + if ( !class_exists( 'linkdb_' . $module_name ) ) + { + global $module_root_path, $phpEx; + + $this->module_name = $module_name; + + require_once( $module_root_path . 'kb/admin/admin_' . $module_name . '.' . $phpEx ); + eval( '$this->modules[' . $module_name . '] = new mx_kb_' . $module_name . '();' ); + + if ( method_exists( $this->modules[$module_name], 'init' ) ) + { + $this->modules[$module_name]->init(); + } + } + } + + /** * load module * *************** *** 1285,1316 **** * Enter description here... * - * @param unknown_type $category_id - */ - function auth_can($category_id) - { - global $lang; - - $this->debug('mx_kb->auth_can', basename( __FILE__ )); - - // - // User authorisation levels output - // - $this->auth_can_list = '<br />' . ( ( $this->auth_user[$category_id]['auth_post'] ) ? $lang['KB_Rules_post_can'] : $lang['KB_Rules_post_cannot'] ) . '<br />'; - $this->auth_can_list .= ( ( $this->auth_user[$category_id]['auth_edit'] ) ? $lang['KB_Rules_edit_can'] : $lang['KB_Rules_edit_cannot'] ) . '<br />'; - $this->auth_can_list .= ( ( $this->auth_user[$category_id]['auth_delete'] ) ? $lang['KB_Rules_delete_can'] : $lang['KB_Rules_delete_cannot'] ) . '<br />'; - $this->auth_can_list .= ( ( $this->comments[$category_id]['activated'] ? (( $this->auth_user[$category_id]['auth_comment'] ? $lang['KB_Rules_comment_can'] : $lang['KB_Rules_comment_cannot'] ) . '<br />') : '' )); - $this->auth_can_list .= ( ( $this->ratings[$category_id]['activated'] ? (( $this->auth_user[$category_id]['auth_rate'] ? $lang['KB_Rules_rate_can'] : $lang['KB_Rules_rate_cannot'] ) . '<br />') : '' )); - $this->auth_can_list .= ( ( $this->auth_user[$category_id]['auth_approval'] ) ? $lang['KB_Rules_approval_can'] : $lang['KB_Rules_approval_cannot'] ) . '<br />'; - $this->auth_can_list .= ( ( $this->auth_user[$category_id]['auth_approval_edit'] ) ? $lang['KB_Rules_approval_edit_can'] : $lang['KB_Rules_approval_edit_cannot'] ) . '<br />'; - - if ( $this->auth_user[$category_id]['auth_mod'] ) - { - $this->auth_can_list .= $lang['KB_Rules_moderate_can']; - } - } - - /** - * Enter description here... - * * @param unknown_type $article_id * @param unknown_type $cat_id --- 1308,1311 ---- *************** *** 1547,1550 **** --- 1542,1573 ---- * Enter description here... * + * @param unknown_type $category_id + */ + function auth_can($category_id) + { + global $lang; + + $this->debug('mx_kb->auth_can', basename( __FILE__ )); + + // + // User authorisation levels output + // + $this->auth_can_list = '<br />' . ( ( $this->auth_user[$category_id]['auth_post'] ) ? $lang['KB_Rules_post_can'] : $lang['KB_Rules_post_cannot'] ) . '<br />'; + $this->auth_can_list .= ( ( $this->auth_user[$category_id]['auth_edit'] ) ? $lang['KB_Rules_edit_can'] : $lang['KB_Rules_edit_cannot'] ) . '<br />'; + $this->auth_can_list .= ( ( $this->auth_user[$category_id]['auth_delete'] ) ? $lang['KB_Rules_delete_can'] : $lang['KB_Rules_delete_cannot'] ) . '<br />'; + $this->auth_can_list .= ( ( $this->comments[$category_id]['activated'] ? (( $this->auth_user[$category_id]['auth_comment'] ? $lang['KB_Rules_comment_can'] : $lang['KB_Rules_comment_cannot'] ) . '<br />') : '' )); + $this->auth_can_list .= ( ( $this->ratings[$category_id]['activated'] ? (( $this->auth_user[$category_id]['auth_rate'] ? $lang['KB_Rules_rate_can'] : $lang['KB_Rules_rate_cannot'] ) . '<br />') : '' )); + $this->auth_can_list .= ( ( $this->auth_user[$category_id]['auth_approval'] ) ? $lang['KB_Rules_approval_can'] : $lang['KB_Rules_approval_cannot'] ) . '<br />'; + $this->auth_can_list .= ( ( $this->auth_user[$category_id]['auth_approval_edit'] ) ? $lang['KB_Rules_approval_edit_can'] : $lang['KB_Rules_approval_edit_cannot'] ) . '<br />'; + + if ( $this->auth_user[$category_id]['auth_mod'] ) + { + $this->auth_can_list .= $lang['KB_Rules_moderate_can']; + } + } + + /** + * Enter description here... + * * @param unknown_type $article_id * @return unknown |