From: George B. <gbr...@us...> - 2004-06-01 19:22:08
|
Update of /cvsroot/phpwebsite-comm/modules/staffman/boost In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1287/boost Modified Files: install.php uninstall.php Log Message: Correct for search problem in 0.9.3-3 Index: uninstall.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/staffman/boost/uninstall.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** uninstall.php 6 Jan 2004 20:26:54 -0000 1.5 --- uninstall.php 1 Jun 2004 19:21:57 -0000 1.6 *************** *** 26,41 **** $status = 1; - /* uninstall help */ - if (isset($_SESSION["OBJ_help"])) { - CLS_help::uninstall_help("staffman"); - $content .= "Staff Listing removed from Help system.<br />"; - } - - /* remove any staffmember fatcat items */ - if(isset($_SESSION["OBJ_fatcat"])) { - if(PHPWS_Fatcat::purge(NULL, "staffman")) - $content .= "Removed any staffmembers in fatcat categories.<br />"; - } - /* uninstall menu item, if any */ if (isset($_SESSION["OBJ_menuman"])) { --- 26,29 ---- *************** *** 43,50 **** $content .= "Removed link to Staffmember Listing from menu.<br />"; } - - /* uninstall search */ - $GLOBALS['core']->sqlDelete("mod_search_register", "module", "staffman"); - $content .= "Staff Listing removed from Search system.<br />"; $ok = PHPWS_File::rmdir(PHPWS_SOURCE_DIR . "images/staffman/"); --- 31,34 ---- Index: install.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/staffman/boost/install.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** install.php 6 Jan 2004 20:26:54 -0000 1.2 --- install.php 1 Jun 2004 19:21:57 -0000 1.3 *************** *** 37,63 **** $content .= "Boost could not create the Staff Listing image directory:<br />" . PHPWS_HOME_DIR . "images/staffman<br />You will have to do this manually!<br />"; } ! /* register the module with the help system if it's loaded */ ! if(isset($_SESSION["OBJ_help"])) { ! CLS_help::setup_help("staffman"); ! $content .= "Staff Listing successfully registered with Help system.<br />"; } - - /* register the module with the search system */ - /* comment out this section if you don't want search included */ - $search['module'] = "staffman"; - $search['search_class'] = "STAFF_ListManager"; - $search['search_function'] = "search"; - // note: label holds the last name; spaces in the list are REQUIRED - $search['search_cols'] = "label, firstname, position, contact, notes"; - $search['view_string'] = "&STAFF_MAN_op=sView&STAFF_id="; - $search['show_block'] = 1; - - if(!$GLOBALS['core']->sqlInsert($search, "mod_search_register")) { - $content .= "Staff Listing NOT registered with Search system.<br />"; - } else { - $content .= "Staff Listing successfully registered with Search system.<br />"; - } - /* end of search section */ } else { --- 37,66 ---- $content .= "Boost could not create the Staff Listing image directory:<br />" . PHPWS_HOME_DIR . "images/staffman<br />You will have to do this manually!<br />"; } + + // by 9.3-3, boost does all registration for help and search (conf/help.php and search.php required) + if($GLOBALS["core"]->version < "0.9.3-3") { + /* register the module with the help system if it's loaded */ + if(isset($_SESSION["OBJ_help"])) { + CLS_help::setup_help("staffman"); + $content .= "Staff Listing successfully registered with Help system.<br />"; + } + + /* register the module with the search system */ + /* comment out this section if you don't want search included */ + $search['module'] = "staffman"; + $search['search_class'] = "STAFF_ListManager"; + $search['search_function'] = "search"; + // note: label holds the last name; spaces in the list are REQUIRED + $search['search_cols'] = "label, firstname, position, contact, notes"; + $search['view_string'] = "&STAFF_MAN_op=sView&STAFF_id="; + $search['show_block'] = 1; ! if(!$GLOBALS['core']->sqlInsert($search, "mod_search_register")) { ! $content .= "Staff Listing NOT registered with Search system.<br />"; ! } else { ! $content .= "Staff Listing successfully registered with Search system.<br />"; ! } ! /* end of search section */ } } else { |