예제 #1
0
 public function userOption($module_title)
 {
     $module = new PHPWS_Module($module_title);
     $directory = $module->getDirectory();
     $final_file = $directory . 'inc/my_page.php';
     if (!is_file($final_file)) {
         PHPWS_Error::log(PHPWS_FILE_NOT_FOUND, 'users', 'userOption', $final_file);
         return dgettext('users', 'There was a problem with this module\'s My Page file.');
     }
     include $final_file;
     if (!function_exists('my_page')) {
         return PHPWS_Error::get(USER_MISSING_MY_PAGE, 'users', 'My_Page::userOption', $module_title);
     }
     $content = my_page();
     return $content;
 }
예제 #2
0
 public function checkDependency()
 {
     // Module doesn't have dependencies therefore no
     // need to check
     if (!$this->_dependency) {
         return true;
     }
     $dep_list = $this->getDependencies();
     if (empty($dep_list)) {
         return false;
     }
     foreach ($dep_list['MODULE'] as $stats) {
         extract($stats);
         $module = new PHPWS_Module($TITLE, false);
         if (!$module->isInstalled()) {
             return false;
         }
         if (version_compare($VERSION, $module->getVersion(), '>')) {
             return false;
         }
     }
     return true;
 }
예제 #3
0
 /**
  * Checks all modules for update status
  */
 public static function checkAll()
 {
     PHPWS_Core::initModClass('boost', 'Boost.php');
     $all_mods = PHPWS_Boost::getAllMods();
     if (empty($all_mods)) {
         return;
     }
     PHPWS_Core::initCoreClass('Module.php');
     $all_mods[] = 'core';
     if (!ini_get('allow_url_fopen')) {
         return false;
     }
     foreach ($all_mods as $mod_title) {
         $module = new PHPWS_Module($mod_title);
         $file = $module->getVersionHttp();
         if (empty($file)) {
             continue;
         }
         $full_xml_array = PHPWS_Text::xml2php($file, 2);
         if (empty($full_xml_array)) {
             continue;
         }
         $version_info = PHPWS_Text::tagXML($full_xml_array);
         if (empty($version_info) || empty($version_info['VERSION'])) {
             continue;
         }
         $_SESSION['Boost_Needs_Update'][$mod_title] = $version_info['VERSION'];
     }
 }
예제 #4
0
 public function aboutView($module)
 {
     PHPWS_Core::initCoreClass('Module.php');
     $mod = new PHPWS_Module($module);
     $file = $mod->getDirectory() . 'boost/about.html';
     if (is_file($file)) {
         include $file;
     } else {
         echo dgettext('boost', 'The About file is missing for this module.');
     }
     exit;
 }
예제 #5
0
파일: Form.php 프로젝트: HaldunA/phpwebsite
 public static function listModules($type)
 {
     Layout::addStyle('boost');
     $allow_update = true;
     $core_update_needed = false;
     $dir_content = array();
     if (!PHPWS_Boost::checkDirectories($dir_content)) {
         $tpl['DIRECTORIES'] = implode('<br />', $dir_content);
         $allow_update = false;
     }
     $core_mods = PHPWS_Core::coreModList();
     $installed_mods = PHPWS_Core::installModList();
     $dir_mods = PHPWS_Boost::getAllMods();
     if ($type == 'core_mods') {
         $allowUninstall = false;
         $modList = $core_mods;
         $core_file = new PHPWS_Module('core');
         $core_db = new PHPWS_Module('core', false);
         $template['TITLE'] = $core_db->proper_name;
         $template['VERSION'] = $core_db->version;
         if (isset($_SESSION['Boost_Needs_Update']['core'])) {
             $link_title = $_SESSION['Boost_Needs_Update']['core'];
             if (version_compare($core_file->version, $_SESSION['Boost_Needs_Update']['core'], '<')) {
                 $link_title = sprintf(dgettext('boost', '%s - New'), $link_title);
             }
         } else {
             $link_title = dgettext('boost', 'Check');
         }
         if ($core_file->isAbout()) {
             $address = PHPWS_Text::linkAddress('boost', array('action' => 'aboutView', 'aboutmod' => $core_file->title), true);
             $aboutView = array('label' => dgettext('boost', 'About'), 'address' => $address);
             $template['ABOUT'] = Layout::getJavascript('open_window', $aboutView);
         }
         $link_command['opmod'] = 'core';
         $link_command['action'] = 'check';
         if (ini_get('allow_url_fopen')) {
             $template['LATEST'] = PHPWS_Text::secureLink($link_title, 'boost', $link_command);
         } else {
             $template['LATEST'] = dgettext('boost', 'Check disabled');
         }
         if (version_compare($core_db->version, $core_file->version, '<')) {
             if ($core_file->checkDependency()) {
                 if ($allow_update) {
                     $link_command['action'] = 'update_core';
                     $core_links[] = PHPWS_Text::secureLink(dgettext('boost', 'Update'), 'boost', $link_command);
                 } else {
                     $core_links[] = dgettext('boost', 'Update');
                 }
                 $tpl['WARNING'] = dgettext('boost', 'The Core requires updating! You should do so before any modules.');
                 $core_update_needed = true;
             } else {
                 $link_command['action'] = 'show_dependency';
                 $core_links[] = PHPWS_Text::secureLink(dgettext('boost', 'Missing dependency'), 'boost', $link_command);
             }
             $template['VERSION'] = sprintf('%s &gt; %s', $core_db->version, $core_file->version);
             $template['COMMAND'] = implode(' | ', $core_links);
         } else {
             $template['COMMAND'] = dgettext('boost', 'None');
         }
         $template['ROW'] = 1;
         $tpl['mod-row'][] = $template;
     } else {
         $allowUninstall = true;
         $modList = array_diff($dir_mods, $core_mods);
     }
     $tpl['TITLE_LABEL'] = dgettext('boost', 'Module Title');
     $tpl['COMMAND_LABEL'] = dgettext('boost', 'Commands');
     $tpl['ABOUT_LABEL'] = dgettext('boost', 'More information');
     $tpl['VERSION_LABEL'] = dgettext('boost', 'Current version');
     if ($type == 'core_mods' && Current_User::isDeity() && DEITIES_CAN_UNINSTALL) {
         $tpl['WARNING'] = dgettext('boost', 'WARNING: Only deities can uninstall core modules. Doing so may corrupt your installation!');
     }
     if (empty($modList)) {
         return dgettext('boost', 'No modules available.');
     }
     sort($modList);
     $count = 1;
     foreach ($modList as $title) {
         $links = array();
         $template = $link_command = NULL;
         $link_command['opmod'] = $title;
         $mod = new PHPWS_Module($title);
         if (!$mod->isFullMod()) {
             continue;
         }
         $proper_name = $mod->getProperName();
         if (!isset($proper_name)) {
             $proper_name = $title;
         }
         $template['VERSION'] = $mod->version;
         $template['TITLE'] = $proper_name;
         $template['ROW'] = $count % 2 + 1;
         $version_check = $mod->getVersionHttp();
         if (isset($version_check)) {
             if (isset($_SESSION['Boost_Needs_Update'][$mod->title])) {
                 $link_title = $_SESSION['Boost_Needs_Update'][$mod->title];
                 if (version_compare($mod->version, $_SESSION['Boost_Needs_Update'][$mod->title], '<')) {
                     $link_title = sprintf(dgettext('boost', '%s - New'), $link_title);
                 }
             } else {
                 $link_title = dgettext('boost', 'Check');
             }
             $link_command['action'] = 'check';
             if (ini_get('allow_url_fopen')) {
                 $template['LATEST'] = PHPWS_Text::secureLink($link_title, 'boost', $link_command);
             } else {
                 $template['LATEST'] = dgettext('boost', 'Check disabled');
             }
         }
         if (!$mod->isInstalled()) {
             if ($mod->checkDependency()) {
                 $link_title = dgettext('boost', 'Install');
                 $link_command['action'] = 'install';
             } else {
                 $link_title = dgettext('boost', 'Missing dependency');
                 $link_command['action'] = 'show_dependency';
             }
             if ($GLOBALS['Boost_Ready']) {
                 if (javascriptEnabled()) {
                     $js['width'] = 640;
                     $js['height'] = 480;
                     $js['address'] = PHPWS_Text::linkAddress('boost', $link_command, true);
                     $js['label'] = $link_title;
                     $links[] = javascript('open_window', $js);
                     unset($js);
                 } else {
                     $links[] = PHPWS_Text::secureLink($link_title, 'boost', $link_command);
                 }
             } else {
                 $links[] =& $link_title;
             }
         } else {
             if ($mod->needsUpdate()) {
                 $db_mod = new PHPWS_Module($mod->title, false);
                 $template['VERSION'] = $db_mod->version . ' &gt; ' . $mod->version;
                 if ($mod->checkDependency()) {
                     if ($title == 'boost' && !$core_update_needed) {
                         $tpl['WARNING'] = dgettext('boost', 'Boost requires updating! You should do so before any other module!');
                     }
                     $link_title = dgettext('boost', 'Update');
                     $link_command['action'] = 'update';
                 } else {
                     $link_title = dgettext('boost', 'Missing dependency');
                     $link_command['action'] = 'show_dependency';
                 }
                 if ($allow_update) {
                     $js['width'] = 640;
                     $js['height'] = 480;
                     $js['address'] = PHPWS_Text::linkAddress('boost', $link_command, true);
                     $js['label'] = $link_title;
                     $links[] = javascript('open_window', $js);
                     unset($js);
                 } else {
                     $links[] =& $link_title;
                 }
             }
             if ($type != 'core_mods' || Current_User::isDeity() && DEITIES_CAN_UNINSTALL) {
                 if ($dependents = $mod->isDependedUpon()) {
                     $link_command['action'] = 'show_depended_upon';
                     $depend_warning = sprintf(dgettext('boost', 'This module is depended upon by: %s'), implode(', ', $dependents));
                     $links[] = PHPWS_Text::secureLink(dgettext('boost', 'Depended upon'), 'boost', $link_command, NULL, $depend_warning);
                 } else {
                     $links[] = PHPWS_Boost::uninstallLink($title);
                 }
             }
         }
         if ($mod->isAbout()) {
             $address = PHPWS_Text::linkAddress('boost', array('action' => 'aboutView', 'aboutmod' => $mod->title), true);
             $aboutView = array('label' => dgettext('boost', 'About'), 'address' => $address);
             $template['ABOUT'] = Layout::getJavascript('open_window', $aboutView);
         }
         if (!empty($links)) {
             $template['COMMAND'] = implode(' | ', $links);
         } else {
             $template['COMMAND'] = dgettext('boost', 'None');
         }
         $tpl['mod-row'][] = $template;
         $count++;
     }
     $tpl['OLD_MODS'] = Boost_Form::oldModList();
     if (ini_get('allow_url_fopen')) {
         $tpl['CHECK_FOR_UPDATES'] = PHPWS_Text::secureLink(dgettext('boost', 'Check all'), 'boost', array('action' => 'check_all', 'tab' => $type));
     } else {
         $tpl['CHECK_FOR_UPDATES'] = dgettext('boost', 'Server configuration prevents version checking.');
     }
     $tpl['LATEST_LABEL'] = dgettext('boost', 'Latest version');
     $release_version = PHPWS_Core::releaseVersion();
     $tpl['PHPWS_VERSION'] = $release_version;
     $result = PHPWS_Template::process($tpl, 'boost', 'module_list.tpl');
     return $result;
 }
예제 #6
0
/**
 *
 * @author theFergus <kevin at tux dot appstate dot edu>
 */
function hms_update(&$content, $currentVersion)
{
    $files = array();
    switch ($currentVersion) {
        case version_compare($currentVersion, '0.1.2', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_1_2.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/student/rlc_signup_form_page2.tmp';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = _('+ RLC application form template');
            $content[] = _('+ RLC application table');
        case version_compare($currentVersion, '0.1.3', '<'):
            $files[] = 'templates/student/rlc_signup_confirmation.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = _('+ Complete system for RLC applications');
        case version_compare($currentVersion, '0.1.4', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_1_4.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/display_final_rlc_assignments.tpl';
            $files[] = 'templates/admin/display_rlc_student_detail_form_questions.tpl';
            $files[] = 'templates/admin/make_new_rlc_assignments.tpl';
            $files[] = 'templates/admin/make_new_rlc_assignments_summary.tpl';
            $files[] = 'templates/admin/display_rlc_student_detail.tpl';
            $files[] = 'templates/admin/deadlines.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = _('+ RLC administration templates');
            $content[] = _('+ Deadline for Questionnaire replaced by deadlines for Profile and Application');
            $content[] = _('+ Deadline added for editing applications');
            $content[] = _('+ Deadline added for submitting RLC applications');
        case version_compare($currentVersion, '0.1.5', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_1_5.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/deadlines.tpl';
            $files[] = 'templates/admin/statistics.tpl';
            $files[] = 'templates/student/application_search.tpl';
            $files[] = 'templates/student/application_search_pager.tpl';
            $files[] = 'templates/student/application_search_results.tpl';
            $files[] = 'templates/student/contract.tpl';
            $files[] = 'templates/student/student_application.tpl';
            $files[] = 'templates/student/student_application_combined.tpl';
            $files[] = 'templates/student/student_application_redo.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = _('+ Fixed RLC deadline bug in deadlines.tpl');
            $content[] = _('+ Added Number of People Assigned');
            $content[] = _('+ Added Number of Applications Received');
            $content[] = _('+ Added Number of Learning Community Applications Received');
            $content[] = _('+ Refactored questionnaire references to application');
            $content[] = _('+ Added the contract verbage for when a student first logs in');
            $content[] = _('+ Completed Housing applications now go straight into the RLC application if the student said they were interested');
            $content[] = _('+ Added link to allow students to go to the RLC application on first login as soon as they complete an application');
            $content[] = _('+ Added link to the pdf of the contract for students that want to print it out');
        case version_compare($currentVersion, '0.1.6', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_1_6.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/maintenance.tpl';
            $files[] = 'templates/misc/login.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = _('+ Modifying permissions for RLC admins to approve members and assign to rooms');
            $content[] = _('+ Added verbage for students to see before they login');
        case version_compare($currentVersion, '0.1.7', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_1_7.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/make_new_rlc_assignments_summary.tpl';
            $files[] = 'templates/admin/rlc_assignments_page.tpl';
            $files[] = 'templates/admin/add_floor.tpl';
            $files[] = 'templates/admin/display_room_data.tpl';
            $files[] = 'templates/admin/display_hall_data.tpl';
            $files[] = 'templates/admin/get_hall_floor_room.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = '+ Removed capacity_per_room';
            $content[] = '+ Added bedrooms_per_room';
            $content[] = '+ Added beds_per_bedroom';
            $content[] = '+ Added list of existing halls when adding new halls';
            $content[] = '+ Room assignments working - assignments now by bed instead of room';
        case version_compare($currentVersion, '0.1.8', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_1_8.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/display_learning_community_data.tpl';
            $files[] = 'templates/admin/maintenance.tpl';
            $files[] = 'templates/admin/display_hall_data.tpl';
            $files[] = 'templates/admin/add_floor.tpl';
            $files[] = 'templates/admin/display_floor_data.tpl';
            $files[] = 'templates/student/student_application.tpl';
            $files[] = 'templates/admin/select_room_for_delete.tpl';
            $files[] = 'templates/admin/display_room_data.tpl';
            $files[] = 'templates/admin/verify_delete_room.tpl';
            $files[] = 'templates/admin/select_floor_for_delete_room.tpl';
            $files[] = 'templates/misc/side_thingie.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = '+ Added abbreviation and capacity changes to Add RLC template. They now properly save and delete.';
            $content[] = '+ Deleting a building now deletes the bedrooms and beds in that building.';
            $content[] = '+ Hid Edit Building temporarily. Bedroom/bed maintenance needs to be finished first.';
            $content[] = '+ Editing a floor works again. Can not delete/add rooms from floor maintenance, must go through room menu.';
            $content[] = '+ Removed gender option from student_application.tpl';
        case version_compare($currentVersion, '0.1.9', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_1_9.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/maintenance.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = '+ Sync\'d with the current live release.';
        case version_compare($currentVersion, '0.1.10', '<'):
            $files[] = 'templates/admin/assign_floor.tpl';
            $files[] = 'templates/admin/bed_and_id.tpl';
            $files[] = 'templates/admin/get_hall_floor.tpl';
            $files[] = 'templates/admin/maintenance.tpl';
            $files[] = 'templates/admin/select_floor_for_edit.tpl';
            $files[] = 'templates/admin/select_residence_hall.tpl';
            $files[] = 'templates/admin/select_room_for_edit.tpl';
            $files[] = 'templates/student/student_application.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = '+ Changed templates regarding editing/deleting rooms and floors to be more user friendly';
            $content[] = '+ Changed to version 0.1.10 to get all dev sites and production site in sync';
            $content[] = '+ Changed HMS_Room so beds are deleted manually instead of through a db object';
            $content[] = '+ Added mechanism to handle mass assignment of an entire floor';
            $content[] = '+ Added student\'s name and gender to student application template';
            $content[] = '+ All locations where usernames are saved have been extended to size 32';
            $content[] = '+ All RLC question response lengths have been extended to 2048 characters';
            $content[] = '+ WSDL modified to reflect change in Web Services server location';
        case version_compare($currentVersion, '0.1.11', '<'):
            $content[] = '+ Fixed minor glitch where assignment by room range was pulling rooms incorrectly (did not take floor number into account)';
        case version_compare($currentVersion, '0.1.12', '<'):
            $files[] = 'templates/student/contract.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = '+ Contract text now shows in a scrollable iframe';
            $content[] = '+ PDF of the contract now opens in a new tab/window';
            $content[] = '+ Link to Acrobat download, opens in new tab/window';
            $content[] = '+ Added link to a FAQ page. We need to make sure there *is* a FAQ page.';
        case version_compare($currentVersion, '0.1.13', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_1_13.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/maintenance.tpl';
            $files[] = 'templates/admin/bed_and_id.tpl';
            $files[] = 'templates/misc/side_thingie.tpl';
            $files[] = 'templates/student/profile_form.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = '+ Jeremy\'s updates to the side bar and various debugging options';
            $content[] = '+ Alphabetization of hall drop-downs';
            $content[] = '+ Assign by floor should always show ascending room numbers';
            $content[] = '+ Fixed bug in assign by floor that kept *all* assignments from going through';
            $content[] = '+ At building creation, all deleteds should be set to 0 instead of NULL';
            $content[] = '+ Added mechanism to allow viewing of all available and assigned rooms/beds in a hall';
            $content[] = '+ Various bug and syntax fixes by Jeremy';
            $content[] = '+ Added meal plan option when assigning by an entire floor';
            $content[] = '+ Adjusted color of "optionally skipped" items in side thingie';
            $content[] = '+ Added a template for the profile form';
        case version_compare($currentVersion, '0.1.14', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_1_14.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/student/profile_form.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = '+ Updated profile_form template';
        case version_compare($currentVersion, '0.1.15', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_1_15.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/student/student_success_failure_message.tpl';
            $files[] = 'templates/admin/deadlines.tpl';
            $files[] = 'templates/admin/maintenance.tpl';
            $files[] = 'templates/admin/display_final_rlc_assignments.tpl';
            $files[] = 'templates/admin/rlc_assignments_pager.tpl';
            $files[] = 'templates/admin/make_new_rlc_assignments_summary.tpl';
            $files[] = 'templates/student/rlc_application.tpl';
            $files[] = 'templates/student/profile_form.tpl';
            $files[] = 'templates/student/verify_single_student.tpl';
            $files[] = 'templates/admin/get_single_username.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = '+ Added success/failure message template';
            $content[] = '+ Added unique constraint to user_id column in student profiles.';
            $content[] = '+ Added new deadlines (for profiles) to the deadlines page.';
            $content[] = '+ Allowed access to RLC assignments on the maintenance page.';
            $content[] = '+ Finalized Final RLC Assignments page.';
            $content[] = '+ Fixed formatting in the RLC Applicatition assignments pager and the corresponding summary.';
            $content[] = '+ Added student viewing of their RLC applications.';
        case version_compare($currentVersion, '0.1.16', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_1_16.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/student/profile_form.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = '+ Added "writing" column to student_profiles table';
            $content[] = '+ Adjusted student profile template for reuse in viewing profiles';
            $content[] = '+ jtickle\'s additions for ordering RLC applications';
        case version_compare($currentVersion, '0.1.17', '<'):
            $content[] = '+ Added profile editing!';
        case version_compare($currentVersion, '0.1.18', '<'):
            $files[] = 'templates/admin/maintenance.tpl';
            $files[] = 'templates/student/profile_form.tpl';
            $files[] = 'templates/profile_search.tpl';
            $files[] = 'templates/profile_search_pager.tpl';
            $files[] = 'templates/profile_search_results.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = '+ Yay for searching by student';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = '+ Added profile searching!';
            $content[] = '+ Added code to prevent duplicate RLC Applications';
            $content[] = '+ Improved "Side Thingie" to show roomate status/deadlines';
        case version_compare($currentVersion, '0.1.19', '<'):
            $files[] = 'templates/admin/rlc_assignments_pager.tpl';
            $files[] = 'templates/admin/make_new_rlc_assignments.tpl';
            $files[] = 'templates/student/show_student_info.tpl';
            $files[] = 'templates/admin/maintenance.tpl';
            $files[] = 'templates/admin/rlc_roster.tpl';
            $files[] = 'templates/admin/rlc_roster_table.tpl';
            $files[] = 'templates/admin/search_by_rlc.tpl';
            $files[] = 'templates/admin/full_name_gender_email.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = '+ Minor improvement to RLC Assignments pager';
            $content[] = '+ Yay for searching by student actually working';
            $content[] = '+ Yay for searching by RLC =)';
        case version_compare($currentVersion, '0.1.21', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_1_21.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/student/rlc_application.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = '* Modified some text when viewing a RLC app for less clutter';
            $content[] = 'Roommate preference (or assigned roommate) listed in the RLC application export';
            $content[] = '+ Added support for an aggregate value in the application';
            $content[] = 'Calculating Aggregates...';
            $db = new PHPWS_DB('hms_application');
            $db->addColumn('id');
            $db->addColumn('term_classification');
            $db->addColumn('student_status');
            $db->addColumn('preferred_bedtime');
            $db->addColumn('room_condition');
            $result = $db->select();
            if (PEAR::isError($result)) {
                return $result;
            }
            /*
             * The following is weird, and I just wanted to take a few minutes
             * to explain exactly what the hell is going on here.  Any students
             * in the database at this point have filled out an application but
             * do not have the aggregate number that is used to autoassign
             * roommates.  What follows generates the appropriate aggregate
             * number for each student.  The aggregate number is a bitmask that
             * will end up looking like this:
             *
             * Bits Meaning
             * 43   term_classification
             * 2    student_status
             * 1    preferred_bedtime
             * 0    room_condition
             *
             * Unfortunately, this code is duplicated in HMS_Application.
             * Fortunately, this code should only be needed once.
             */
            $i = 0;
            foreach ($result as $row) {
                $aggregate = 0;
                $aggregate |= $row['term_classification'] - 1 << 3;
                $aggregate |= $row['student_status'] - 1 << 2;
                $aggregate |= $row['preferred_bedtime'] - 1 << 1;
                $aggregate |= $row['room_condition'] - 1;
                $db->reset();
                $db->addWhere('id', $row['id']);
                $db->addValue('aggregate', $aggregate);
                $result = $db->update();
                if (PEAR::isError($result)) {
                    return $result;
                }
                $i++;
            }
            $content[] = "+ Calculated {$i} aggregates.";
        case version_compare($currentVersion, '0.1.22', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_1_22.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/display_room_data.tpl';
            $files[] = 'templates/student/profile_search_pager.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = "* Fixed bug in pagination of student profile results";
            $content[] = '** Bug still exists where search values need to be set in $_SESSION';
            $content[] = "+ Added 'displayed room number' to room editing";
            $content[] = "+ Added 'displayed room number' to the assign by floor/mass assignment page";
            $content[] = "+ Fixed bug in assigned RLC members page where address/telephone number were displaying incorrectly or not at all";
        case version_compare($currentVersion, '0.1.23', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_1_23.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $content[] = '+ Increased length of the asu_username field for RLC assignments';
            $content[] = '+ Added stateful pagination when assigning people to RLCs';
            $content[] = '+ Corrected count when viewing the Learning Community Assignments';
        case version_compare($currentVersion, '0.1.24', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_1_24.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/student/show_student_info.tpl';
            $files[] = 'templates/admin/add_floor.tpl';
            $files[] = 'templates/admin/display_floor_data.tpl';
            $files[] = 'templates/admin/display_room_data.tpl';
            $files[] = 'templates/admin/display_hall_data.tpl';
            $files[] = 'templates/admin/add_room.tpl';
            $files[] = 'templates/admin/maintenance.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = '+ Added a _deleted_ flag to hms_assignment';
            $content[] = '+ Added a timestamp field to hms_assignment';
            $content[] = '+ Added a move_student method to move a single student between rooms';
            $content[] = '+ Student Housing Application now a link when displaying other student information (results from a search)';
            $content[] = '+ Added a flag to hms_room for private rooms';
            $content[] = '+ Added a flag to hms_room for ra rooms';
            $content[] = '+ Added a flag to hms_room for freshman reserved rooms';
            $content[] = '+ Student\'s first, middle and last names now show beside the username at the building overview page of assigned rooms/students';
            $content[] = '+ Added method to add a room to a floor';
            $content[] = '+ Added pricing tier to the room. Always.';
            $content[] = '+ Added roommate status to the student search results.';
        case version_compare($currentVersion, '0.1.25', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_1_25.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/full_name_gender_email.tpl';
            $files[] = 'templates/admin/rlc_roster_table.tpl';
            $files[] = 'templates/admin/maintenance.tpl';
            $files[] = 'templates/admin/verify_break_roommates.tpl';
            $files[] = 'templates/admin/confirm_remove_from_rlc.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = '+ Fixed numerous bugs that arrived with the _deleted_ flag';
            $content[] = '+ Added the ability to review RLC Applications after assignment';
            $content[] = '+ Fixed error reporting for assigning students to nonexistent rooms';
            $content[] = '+ Re-instated the ability to create and break roommates';
            $content[] = '+ Auto Assignment';
        case version_compare($currentVersion, '0.1.26', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_1_26.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $content[] = '+ Letters are ready!';
        case version_compare($currentVersion, '0.1.27', '<'):
            $files[] = 'templates/student/show_student_info.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = '+ Added ability to change meal plans to student search screen';
        case version_compare($currentVersion, '0.1.28', '<'):
            $files[] = 'templates/admin/display_floor_Data.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = '+ Added ability to change movein times per floor';
        case version_compare($currentVersion, '0.1.29', '<'):
            $files[] = 'templates/admin/maintenance.tpl';
            $files[] = 'templates/admin/get_hall_floor_room.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
            $content[] = '+ OMG BANNER WORKS hopefully';
        case version_compare($currentVersion, '0.1.30', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_1_30.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/deadlines.tpl';
            $files[] = 'templates/student/main_menu_spring.tpl';
            $files[] = 'templates/student/main_menu_fall.tpl';
            $files[] = 'templates/student/student_application.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
            $content[] = '+ Added check to prevent students selecting themselves as roommates';
            $content[] = '+ Added check to make sure a requested roommate has a housing application';
            $content[] = '+ Cleaned up main menu, added checks for deadlines for menu options';
            $content[] = '+ Fixed colors for messages returned when setting deadlines (UI)';
            $content[] = '+ Added entry term to hms_application and rlc application tables';
            $content[] = '+ Added entry term to student application';
        case version_compare($currentVersion, '0.1.31', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_1_31.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/student/rlc_signup_form_page1.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
            $content[] = '+ Added some verbage and a link to the top of the RLC signup form.';
            $content[] = '+ Added activity log table';
        case version_compare($currentVersion, '0.1.32', '<'):
            $files[] = 'templates/admin/display_room_data.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
            $content[] = '+ Updated edit room template to disallow room gender changes is someone is assigned.';
        case version_compare($currentVersion, '0.1.33', '<'):
            $files[] = 'templates/admin/display_room_data.tpl';
            $files[] = 'templates/admin/maintenance.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
        case version_compare($currentVersion, '0.2.0', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_0.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/maintenance.tpl';
            $files[] = 'templates/admin/edit_terms.tpl';
            $files[] = 'templates/admin/term_pager.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
            $content[] = '+ Added term database and term admin to maintenance panel';
        case version_compare($currentVersion, '0.2.1', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_1.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $content[] = '+ Renamed entry_term column in hms_application to term';
        case version_compare($currentVersion, '0.2.2', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_2.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.2.3', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_3.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/edit_terms.tpl';
            $files[] = 'templates/admin/add_term.tpl';
            $fiels[] = 'maintenance.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
            $content[] = '+ Redesigned hall structure';
            $content[] = '+ Massive db update for hall structure changes';
            $content[] = '+ Seperated add term and edit term pages';
        case version_compare($currentVersion, '0.2.4', '<'):
            $files[] = 'templates/admin/assign_student.tpl';
            $files[] = 'templates/admin/unassign_student.tpl';
            $files[] = 'templates/admin/maintenance.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
        case version_compare($currentVersion, '0.2.5', '<'):
            $files[] = 'templates/admin/select_residence_hall.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
        case version_compare($currentVersion, '0.2.6', '<'):
            $files[] = 'templates/admin/assign_student_move_confirm.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
        case version_compare($currentVersion, '0.2.7', '<'):
            $files[] = 'templates/admin/maintenance.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
            $content[] = '+ Maintenance template was phoned in, now properly updated';
        case version_compare($currentVersion, '0.2.8', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_8.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/select_room.tpl';
            $files[] = 'template/admin/maintenance.tpl';
            $files[] = 'templates/admin/edit_room.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
            $content[] = '+ Room selection for editing rooms now works';
            $content[] = '+ Added Queue system for "offline" editing of assignments';
            $content[] = '+ Room editing also works now';
        case version_compare($currentVersion, '0.2.9', '<'):
            $files[] = 'templates/admin/select_room.tpl';
            $files[] = 'templates/admin/edit_room.tpl';
            $files[] = 'templates/admin/maintenance.tpl';
            $files[] = 'template/admin/assignment_pager_by_room.tpl';
            $files[] = 'javascript/assign_student/head.js';
            $fiels[] = 'javascript/select_room/head.js';
            PHPWS_Boost::updatefiles($files, 'hms');
            $content[] = '+ Added queue items to Maintenance panel';
            $content[] = '+ Removed "move student" link';
            $content[] = '+ Added assignment pager to room edit page';
        case version_compare($currentVersion, '0.2.10', '<'):
            $files[] = 'templates/admin/maintenance.tpl';
            $files[] = 'templates/admin/edit_room.tpl';
            $files[] = 'templates/admin/select_suite.tpl';
            $files[] = 'javascript/select_suite/head.js';
            $files[] = 'templates/admin/edit_suite.tpl';
            $files[] = 'templates/admin/room_pager_by_suite.tpl';
            $files[] = 'templates/admin/assignment_pager_by_suite.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
            $content[] = '+ Added ability to edit suites.';
            $content[] = '+ Fixed "DB Error" in queued assignments';
        case version_compare($currentVersion, '0.2.12', '<'):
            $files[] = 'javascript/autosuggest/autosuggest.js';
            $files[] = 'javascript/autosuggest/head.js';
            $files[] = 'javascript/autosuggest/zxml.js';
            $files[] = '/templates/admin/maintenance.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
            $content[] = 'Autoassigner baby!';
            $content[] = 'Autocompletion for usernames';
        case version_compare($currentVersion, '0.2.13', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_13.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/movein_time_pager.tpl';
            $files[] = 'templates/admin/edit_movein_time.tpl';
            $files[] = 'templates/admin/maintenance.tpl';
            $files[] = 'javascript/select_floor/head.js';
            $files[] = 'templates/admin/select_floor.js';
            $files[] = 'templates/admin/display_floor_data.tpl';
            $files[] = 'templates/admin/edit_room.tpl';
            $files[] = 'templates/admin/select_room.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
        case version_compare($currentVersion, '0.2.14', '<'):
            $db = new PHPWS_DB();
            $result = $db->query('ALTER TABLE hms_floor DROP COLUMN ft_movein;');
            if (PEAR::isError($result)) {
                return $result;
            }
            $result = $db->query('ALTER TABLE hms_floor DROP COLUMN c_movein;');
            if (PEAR::isError($result)) {
                return $result;
            }
            $result = $db->query('ALTER TABLE hms_floor ADD COLUMN ft_movein_time_id smallint REFERENCES hms_movein_time(id);');
            if (PEAR::isError($result)) {
                return $result;
            }
            $result = $db->query('ALTER TABLE hms_floor ADD COLUMN rt_movein_time_id smallint REFERENCES hms_movein_time(id);');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/room_pager_by_floor.tpl';
            $files[] = 'templates/admin/edit_floor.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
        case version_compare($currentVersion, '0.2.15', '<'):
            $files[] = 'templates/admin/floor_pager_by_hall.tpl';
            $files[] = 'templates/admin/edit_residence_hall.tpl';
            $files[] = 'templates/admin/select_residence_hall.tpl';
            $files[] = 'templates/admin/maintenance.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
        case version_compare($currentVersion, '0.2.16', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_16.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/edit_room.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
        case version_compare($currentVersion, '0.2.17', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_17.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/select_bed.tpl';
            $files[] = 'templates/admin/edit_bed.tpl';
            $files[] = 'templates/admin/maintenance.tpl';
            $files[] = 'javascript/select_bed/head.js';
            $files[] = 'templates/admin/bed_pager_by_room.tpl';
            $files[] = 'templates/admin/edit_room.tpl';
            $files[] = 'javascript/assign_student/head.js';
            $files[] = 'templates/admin/assign_student.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
        case version_compare($currentVersion, '0.2.18', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_18.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/deadlines.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
        case version_compare($currentVersion, '0.2.19', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_19.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/deadlines.tpl';
            $files[] = 'templates/student/freshmen_welcome_screen.tpl';
            $files[] = 'templates/student/freshmen_welcome_screen.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
        case version_compare($currentVersion, '0.2.20', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFIle(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_20.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.2.21', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFIle(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_21.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/student/welcome_screen_freshmen.tpl';
            $files[] = 'templates/student/welcome_screen_transfer.tpl';
            $files[] = 'templates/student/welcome_screen_no_entry_term.tpl';
            $files[] = 'templates/student/welcome_screen_deadline_past.tpl';
            $files[] = 'templates/student/welcome_screen_non_traditional.tpl';
            $files[] = 'templates/student/welcome_screen_too_soon.tpl';
            $files[] = 'templates/student/contact_page.tpl';
            $files[] = 'templates/student/contact_form_thankyou.tpl';
            $files[] = 'templates/student/rlc_signup_form_page1.tpl';
            $files[] = 'templates/student/rlc_singup_form_page2.tpl';
            $files[] = 'templates/student/rlc_singup_confirmation.tpl';
            $files[] = 'templates/student/student_application.tpl';
            $files[] = 'templates/student/main_menu_fall.tpl';
            $files[] = 'templates/admin/assign_student.tpl';
            $files[] = 'templates/admin/deadlines.tpl';
            $files[] = 'templates/admin/rlc_assignments_pager.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
        case version_compare($currentVersion, '0.2.22', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_22.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.2.23', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_23.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/student/roommate_accept_reject_form.tpl';
            $files[] = 'templates/student/select_roommate.tpl';
            $files[] = 'templates/student/requestor_handle_rlc_application.tpl';
            $files[] = 'templates/student/select_roommate_confirmation.tpl';
            $files[] = 'templates/student/roommate_accept_reject_screen.tpl';
            $files[] = 'templates/student/main_menu_fall.tpl';
            $files[] = 'templates/student/roommate_accept_done.tpl';
            $files[] = 'templates/student/roommate_reject_done.tpl';
            $files[] = 'templates/student/requested_roommate_list.tpl';
            $files[] = 'templates/student/roommate_accept_confirm.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
        case version_compare($currentVersion, '0.2.24', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_24.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.2.25', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_25.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/edit_floor.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
        case version_compare($currentVersion, '0.2.26', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_26.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/display_final_rlc_assignments.tpl';
            $files[] = 'templates/student/show_student_info.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
        case version_compare($currentVersion, '0.2.28', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_28.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/term_pager.tpl';
            $files[] = 'templates/admin/maintenance.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
        case version_compare($currentVersion, '0.2.29', '<'):
            PHPWS_Boost::registerMyModule('hms', 'users', $content);
            $files[] = 'templates/admin/permission_denied.tpl';
            $files[] = 'templates/admin/maintenance.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
        case version_compare($currentVersion, '0.2.30', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_30.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $files[] = 'templates/admin/make_new_rlc_assignments.tpl';
            $files[] = 'templates/admin/rlc_assignments_pager.tpl';
            $files[] = 'templates/admin/view_by_rlc_pager.tpl';
            $files[] = 'templates/admin/rlc_roster.tpl';
            $files[] = 'templates/admin/maintenance.tpl';
            $files[] = 'templates/admin/log_pager.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
        case version_compare($currentVersion, '0.2.31', '<'):
            PHPWS_Boost::registerMyModule('hms', 'users', $content);
            // ust need to update the permissions
        // ust need to update the permissions
        case version_compare($currentVersion, '0.2.32', '<'):
            $files[] = 'templates/admin/show_confirmed_roommates.tpl';
            $files[] = 'templates/admin/roommate_pager.tpl';
            $files[] = 'templates/admin/create_roommate_group.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
        case version_compare($currentVersion, '0.2.33', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_33.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.2.34', '<'):
            $files[] = 'templates/admin/display_reports.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $content[] = 'Added Special Needs report.';
            $content[] = 'Reports now better suited for printing.';
        case version_compare($currentVersion, '0.2.35', '<'):
            $files[] = 'templates/admin/statistics.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
            $db = new PHPWS_Db();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_35.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            $content[] = 'Updated Statistics Template';
            $content[] = 'Updated Term Information';
        case version_compare($currentVersion, '0.2.36', '<'):
            $db = new PHPWS_Db();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_36.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.2.40', '<'):
            PHPWS_Boost::registerMyModule('hms', 'users', $content);
            // ust need to update the permissions
        // ust need to update the permissions
        case version_compare($currentVersion, '0.2.41', '<'):
            $files[] = 'templates/admin/activity_log_pager.tpl';
            PHPWS_Boost::updateFiles($files, 'hms');
        case version_compare($currentVersion, '0.2.42', '<'):
            $files[] = 'templates/admin/maintenance.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
            $db = new PHPWS_Db();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_42.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.2.45', '<'):
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
        case version_compare($currentVersion, '0.2.46', '<'):
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
        case version_compare($currentVersion, '0.2.49', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_49.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.2.50', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_50.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.2.51', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_51.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.2.52', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_2_52.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.3.0', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_3_0.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.3.1', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_3_1.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.3.2', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_3_2.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.3.3', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_3_3.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.3.5', '<'):
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
        case version_compare($currentVersion, '0.3.7', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_3_7.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.3.8', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_3_8.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.3.9', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_3_9.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.3.10', '<'):
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_3_10.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.3.11', '<'):
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
        case version_compare($currentVersion, '0.3.13', '<'):
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_3_13.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.3.16', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_3_16.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.3.17', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_3_17.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.3.18', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_3_18.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.3.19', '<'):
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_3_19.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.3.20', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_3_20.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.3.21', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_3_21.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.3.31', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_3_31.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.0', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_0.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.1', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_1.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.2', '<'):
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_2.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.3', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_3.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.4', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_4.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.5', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_5.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.6', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_6.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.7', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_7.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.9', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_9.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.12', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_12.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.13', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_13.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.14', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_14.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.15', '<'):
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
        case version_compare($currentVersion, '0.4.18', '<'):
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
        case version_compare($currentVersion, '0.4.19', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_19.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
        case version_compare($currentVersion, '0.4.22', '<'):
            $files[] = 'templates/admin/floor_assignment.tpl';
            PHPWS_Boost::updatefiles($files, 'hms');
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
        case version_compare($currentVersion, '0.4.23', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_23.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.24', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_24.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.26', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_26.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.28', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_28.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.30', '<'):
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
        case version_compare($currentVersion, '0.4.32', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_32.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.33', '<'):
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_33.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.34', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_34.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.35', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_35.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.37', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_37.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.38', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_38.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.39', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_39.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.42', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_42.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.43', '<'):
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_43.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.44', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_44.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.45', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_45.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.47', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_47.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.48', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_48.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.49', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_49.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.50', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_50.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.51', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_51.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.52', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_52.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            Users_Permission::registerPermissions('hms', $content);
        case version_compare($currentVersion, '0.4.53', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_53.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.55', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_55.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.61', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/0_4_61.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
        case version_compare($currentVersion, '0.4.63', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-63.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.66', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-66.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.67', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-67.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.68', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-68.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
        case version_compare($currentVersion, '0.4.69', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-69.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.70', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-70.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.71', '<'):
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
        case version_compare($currentVersion, '0.4.72', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-72.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.73', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-73.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.74', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-74.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.75', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-75.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.77', '<'):
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
        case version_compare($currentVersion, '0.4.78', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-78.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.79', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-79.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.80', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-80.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.81', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-81.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.82', '<'):
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
        case version_compare($currentVersion, '0.4.83', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-83.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.84', '<'):
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
        case version_compare($currentVersion, '0.4.85', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-85.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.86', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-86.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.87', '<'):
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
        case version_compare($currentVersion, '0.4.88', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-88.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.89', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-89.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.90', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-90.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.91', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-91.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.4.92', '<'):
            PHPWS_Core::initModClass('users', 'Permission.php');
            Users_Permission::registerPermissions('hms', $content);
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-04-92.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.5.0', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-05-00.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.5.1', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-05-01.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.5.2', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-05-02.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.5.3', '<'):
            PHPWS_Core::initCoreClass('Module.php');
            $module = new \PHPWS_Module('pulse', false);
            $pulse_version = $module->getVersion();
            if (version_compare($pulse_version, '2.0.0', '<')) {
                $content[] = '<p style="color:red;font-weight:bold">Pulse needs to be upgraded.</p>';
            }
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-05-03.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.5.4', '<'):
            $content[] = '<pre>Adding hms_hall_structure view.</pre>';
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-05-04.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.5.5', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-05-05.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
        case version_compare($currentVersion, '0.5.6', '<'):
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/hms/boost/updates/00-05-06.sql');
            if (PEAR::isError($result)) {
                return $result;
            }
    }
    return TRUE;
}
예제 #7
0
/**
 * @author Matthew McNaney <mcnaney at gmail dot com>
 * @version $Id$
 */
function access_update(&$content, $version)
{
    switch (1) {
        case version_compare($version, '0.1.0', '<'):
            if (PHPWS_Boost::updateFiles(array('conf/config.php'), 'access')) {
                $content[] = '- Copied config.php locally.';
            } else {
                $content[] = '- Unable to copy config.php locally.';
            }
            $content[] = '- Added rewrite conditionals to .htaccess write.';
        case version_compare($version, '0.1.1', '<'):
            $content[] = '<pre>';
            $files = array('templates/main.tpl', 'templates/box.tpl', 'templates/shortcut_menu.tpl');
            if (PHPWS_Boost::updateFiles($files, 'access')) {
                $content[] = '-- Copied following template files locally:';
            } else {
                $content[] = '-- Failed to copy the following files locally:';
            }
            $content[] = implode("\n", $files);
            $content[] = '+ Fixed header tags (Bug #1652279)';
            $content[] = '</pre>';
        case version_compare($version, '0.1.2', '<'):
            $content[] = '<pre>
0.1.2 changes
---------------
+ Added translate functions.
</pre>
';
        case version_compare($version, '0.2.0', '<'):
            $content[] = '<pre>
0.2.0 changes
---------------';
            $files = array('conf/error.php', 'templates/forms/administrator.tpl', 'templates/forms/update_file.tpl', 'img/access.png');
            if (PHPWS_Boost::updateFiles($files, 'access')) {
                $content[] = '+ The following files were updated successfully.';
            } else {
                $content[] = '+ The following files were not updated successfully.';
            }
            $content[] = '    ' . implode("\n    ", $files);
            $content[] = '+ Update panel shows the current .htaccess file as well as
  the one the admin is about to save.
+ Changed the admin panel to turn off different components.
+ Rewrite engine enabled by default.
+ Shortcuts now separated by dashes and not underlines
+ Keywords in shortcuts parsed better.
+ Admins can now edit shortcut keywords from the admin panel.
+ Deny/Allow tab changed to Allow/Deny since it is set that way every where else.
+ Allow/Deny can now be disabled in the Admin panel.
+ Added a way to restore the default .htaccess file.
+ Removed symbolic link option from htaccess writes.
+ New control panel icon.
</pre>
';
        case version_compare($version, '0.2.1', '<'):
            $content[] = '<pre>0.2.1 changes
---------------
+ Updated to new language format.</pre>';
        case version_compare($version, '0.2.2', '<'):
            $content[] = '<pre>';
            $files = array('conf/error.php', 'templates/forms/administrator.tpl', 'templates/forms/update_file.tpl', 'img/access.png', 'conf/config.php');
            if (PHPWS_Boost::updateFiles($files, 'access')) {
                $content[] = '+ The following files were updated successfully.';
            } else {
                $content[] = '+ The following files were not updated successfully.';
            }
            $content[] = '    ' . implode("\n    ", $files);
            $content[] = '
0.2.2 changes
---------------
+ The default rewrite conditional was missing a file check.
+ Previous update had updated files going to incorrect directory.
+ Template was removing curly brackets from review mode. Fixed.
</pre>';
        case version_compare($version, '0.2.3', '<'):
            $content[] = '<pre>
0.2.3 changes
---------------
+ Fixed bug #1690698: Cannot create a new .htaccess file if original
  is deleted. Thanks singletrack
+ Fixed bug #1690544: If the .htaccess file is not writable or
  missing, give the user a warning message.</pre>';
        case version_compare($version, '1.0.0', '<'):
            $content[] = '<pre>';
            $files = array('templates/forms/allow_deny.tpl', 'templates/forms/shortcut_list.tpl');
            if (PHPWS_Boost::updateFiles($files, 'access')) {
                $content[] = '--- The following files were updated successfully.';
            } else {
                $content[] = '--- The following files were not updated successfully.';
            }
            $content[] = implode("\n", $files);
            $content[] = '1.0.0 changes
---------------
+ Rewritten for phpwebsite 1.5.0 changes.
+ addIP and removeIP allow modules to restrict users.
</pre>';
        case version_compare($version, '1.0.1', '<'):
            $content[] = '<pre>1.0.1 changes
---------------
+ Fixed Access option not appearing on MiniAdmin
+ .html completely removed from shortcuts
</pre>';
        case version_compare($version, '1.0.2', '<'):
            $content[] = '<pre>1.0.2 changes
---------------
+ Removed htaccess file. Now expect core/inc/htaccess.
</pre>';
        case version_compare($version, '1.1.0', '<'):
            PHPWS_Boost::updateFiles(array('templates/htaccess.tpl'), 'access');
            $content[] = '<pre>1.1.0 changes
---------------
+ New ability to added a RewriteBase to a .htaccess file.
+ Updated to PHP 5 standards.
</pre>';
        case version_compare($version, '1.1.1', '<'):
            $content[] = '<pre>1.1.1 changes
---------------
+ Reformated shortcut creation method. Should work with old version
  as well as any new longer links.</pre>';
        case version_compare($version, '1.1.2', '<'):
            $content[] = '<pre>1.1.2 changes
---------------
+ Fixed some error notices
+ Fixed access shortcuts to work with GET arrays</pre>';
        case version_compare($version, '1.1.3', '<'):
            $content[] = '<pre>1.1.3 changes
---------------
+ Access forces bad urls to 404 error
</pre>';
        case version_compare($version, '1.1.4', '<'):
            $content[] = '<pre>1.1.4 changes
---------------
+ Trimming the title to prevent extra spaces in shortcuts
</pre>';
        case version_compare($version, '1.1.5', '<'):
            $module = new PHPWS_Module('access');
            PHPWS_Error::logIfError($module->save());
            $content[] = '<pre>1.1.5 changes
---------------
+ Lowered Access priority to assure its init.php is called early.</pre>';
        case version_compare($version, '1.1.6', '<'):
            $content[] = '<pre>1.1.6 changes
---------------
+ Added link check on url setting to prevent ./ from suffixing and
  breaking storage.</pre>';
        case version_compare($version, '1.1.7', '<'):
            $content[] = '<pre>1.1.7 changes
---------------
+ Code changes to make PHP 5 strict compatible.</pre>';
        case version_compare($version, '1.1.8', '<'):
            $content[] = '<pre>1.1.8 changes
---------------
+ Fixed shortcuts not working with some older pages
+ Pager links added to shortcut list</pre>';
        case version_compare($version, '1.1.9', '<'):
            $content[] = '<pre>1.1.9 changes
---------------
+ Fixed a bug in Access module which was causing the RewriteBase? to be set to the empty string</pre>';
        case version_compare($version, '1.2.0', '<'):
            $sql = "ALTER TABLE  access_shortcuts CHANGE  keyword  keyword VARCHAR( 255 ) NOT NULL DEFAULT ''";
            PHPWS_DB::query($sql);
            $content[] = '<pre>1.2.0 changes
---------------
+ Shortcut length increased and observed in code.</pre>';
        case version_compare($version, '1.2.1', '<'):
            $sql = "ALTER TABLE  access_shortcuts CHANGE  keyword  keyword VARCHAR( 255 ) NOT NULL DEFAULT ''";
            PHPWS_DB::query($sql);
            $content[] = '<pre>1.2.1 changes
---------------
+ Added tools to shortcuts to give all pages shortcuts and to autoforward on id calls.
+ Made sure the varchar is changed since the install did not reflect the change.</pre>';
        case version_compare($version, '1.2.2', '<'):
            $content[] = '<pre>1.2.2 changes
--------------
+ Fixed autoforwarding</pre>';
        case version_compare($version, '1.3.0', '<'):
            $content[] = '<pre>1.3.0 changes
--------------
+ Bootstrap changes, use of modal
+ Various bug fixes
</pre>';
    }
    return true;
}