本文整理汇总了PHP中PHPWS_DB::query方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPWS_DB::query方法的具体用法?PHP PHPWS_DB::query怎么用?PHP PHPWS_DB::query使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPWS_DB
的用法示例。
在下文中一共展示了PHPWS_DB::query方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
private function delete()
{
// Because we're halfway between an "old way" and a "new way", delete
// takes input from query instead of JSON. Beg your pardon but this
// is the quickest way to get this thing out the door.
$facultyId = $_REQUEST['faculty_id'];
$departmentId = $_REQUEST['department_id'];
$sql = "DELETE FROM intern_faculty_department WHERE faculty_id = {$facultyId} AND department_id = {$departmentId}";
$result = \PHPWS_DB::query($sql);
if (\PHPWS_Error::logIfError($result)) {
header('HTTP/1.1 500 Internal Server Error');
exit;
}
header('HTTP/1.1 204 No Content');
exit;
}
示例2: _buildBackupTable
public function _buildBackupTable($table)
{
$db = new PHPWS_DB($table);
$result = $db->getTableColumns(TRUE);
foreach ($result as $col) {
if ($col['name'] == 'id') {
continue;
}
$allColumns[] = $col;
}
$columns = PHPWS_DB::parseColumns($allColumns);
$columns[] = 'backup_id int NOT NULL';
$columns[] = 'backup_order smallint NOT NULL';
$sql = 'CREATE TABLE ' . Backup::getBackupTableName($table) . ' (' . implode(', ', $columns) . ')';
return PHPWS_DB::query($sql);
}
示例3: execute
public function execute(CommandContext $context)
{
if (!UserStatus::isAdmin() || !Current_User::allow('hms', 'edit_terms')) {
PHPWS_Core::initModClass('hms', 'exception/PermissionException.php');
throw new PermissionException('You do not have permission to edit terms.');
}
$successCmd = CommandFactory::getCommand('ShowEditTerm');
$errorCmd = CommandFactory::getCommand('ShowCreateTerm');
$year = $context->get('year_drop');
$sem = $context->get('term_drop');
if (!isset($year) || is_null($year) || empty($year)) {
NQ::simple('hms', hms\NotificationView::ERROR, 'You must provide a year.');
$errorCmd->redirect();
}
if (!isset($sem) || is_null($sem) || empty($sem)) {
NQ::simple('hms', hms\NotificationView::ERROR, 'You must provide a semester.');
$errorCmd->redirect();
}
// Check to see if the specified term already exists
if (!Term::isValidTerm($year . $sem)) {
$term = new Term(NULL);
$term->setTerm($year . $sem);
$term->setBannerQueue(1);
try {
$term->save();
} catch (DatabaseException $e) {
NQ::simple('hms', hms\NotificationView::ERROR, 'There was an error saving the term. Please try again or contact ESS.');
$errorCmd->redirect();
}
} else {
$term = new Term($year . $sem);
// The term already exists, make sure there are no halls for this term
$db = new PHPWS_DB('hms_residence_hall');
$db->addWhere('term', $term->getTerm());
$num = $db->count();
if (!is_null($num) && $num > 0) {
NQ::simple('hms', hms\NotificationView::ERROR, 'One or more halls already exist for this term, so nothing can be copied.');
$errorCmd->redirect();
}
}
$text = Term::toString($term->getTerm());
$copy = $context->get('copy_pick');
$copyAssignments = false;
$copyRoles = false;
// If you want to copy roles and/or assignments
// you must also copy the hall structure.
if (isset($copy['struct'])) {
// Copy hall structure
if (isset($copy['assign'])) {
// Copy assignments.
$copyAssignments = true;
}
if (isset($copy['role'])) {
// Copy roles.
$copyRoles = true;
}
} else {
// either $copy == 'nothing', or the view didn't specify... either way, we're done
NQ::simple('hms', hms\NotificationView::SUCCESS, "{$text} term created successfully.");
$successCmd->redirect();
}
# Figure out which term we're copying from, if there isn't one then use the "current" term.
$fromTerm = $context->get('from_term');
if (is_null($fromTerm)) {
$fromTerm = Term::getCurrentTerm();
}
PHPWS_Core::initModClass('hms', 'HMS_Residence_Hall.php');
PHPWS_Core::initModClass('hms', 'HousingApplication.php');
$db = new PHPWS_DB();
try {
$db->query('BEGIN');
# Get the halls from the current term
$halls = HMS_Residence_Hall::get_halls($fromTerm);
set_time_limit(36000);
foreach ($halls as $hall) {
$hall->copy($term->getTerm(), $copyAssignments, $copyRoles);
}
$db->query('COMMIT');
} catch (Exception $e) {
$db->query('ROLLBACK');
PHPWS_Error::log(print_r($e, true), 'hms');
NQ::simple('hms', hms\NotificationView::ERROR, 'There was an error copying the hall structure and/or assignments. The term was created, but nothing was copied.');
$errorCmd->redirect();
}
if ($copyAssignments) {
NQ::simple('hms', hms\NotificationView::SUCCESS, "{$text} term created successfully. The hall structure and assignments were copied successfully.");
} else {
NQ::simple('hms', hms\NotificationView::SUCCESS, "{$text} term created successfully and hall structure copied successfully.");
}
Term::setSelectedTerm($term->getTerm());
$successCmd->redirect();
}
示例4: checkin_update
//.........这里部分代码省略.........
+ Removed error message from report if no reasons created
+ Added the time of arrival to the report
+ Changed report date entry interface
+ Upper cased names.
</pre>';
case version_compare($current_version, '1.0.4', '<'):
$content[] = '<pre>1.0.4 changes
---------------------
+ Fixed waiting time setting</pre>';
case version_compare($current_version, '1.1.0', '<'):
$content[] = '<pre>1.1.0 changes
---------------------
+ Added code to prevent refreshed duplicates
+ Fixed possible error in admin view
+ Added monthly and student reports
+ Added report for number of times a visitor has visited within 30 days.
+ PHP 5 Strict changes</pre>';
case version_compare($current_version, '1.1.1', '<'):
$content[] = '<pre>1.1.1 changes
---------------------
+ Reports limited to admins</pre>';
case version_compare($current_version, '1.2', '<'):
$db = new PHPWS_DB('checkin_staff');
$db->addTableColumn('active', 'smallint not null default 1');
$content[] = '<pre>1.2 changes
--------------
+ Fixed blue button on admin menu
+ Staff can now be deactivated so they appear on reports but do not receive visitors</pre>';
case version_compare($current_version, '1.3', '<'):
$db = new PHPWS_DB('checkin_visitor');
$db->addTableColumn('email', 'varchar(255) NULL');
$content[] = '<pre>1.3 changes
---------------
+ Option to collect visitor email addresses.</pre>';
case version_compare($current_version, '1.4.0', '<'):
$content[] = '<pre>1.4.0 changes
---------------
+ May now report by visitor name.</pre>';
case version_compare($current_version, '1.5.0', '<'):
$content[] = '<pre>';
// Make changes to checkin_visitor table
$db = new PHPWS_DB('checkin_visitor');
if (PHPWS_Error::logIfError($db->addTableColumn('gender', 'varchar(20) default NULL'))) {
$content[] = 'Unable to create checkin_visitor.gender column.</pre>';
return false;
} else {
$content[] = 'Created checkin_visitor.gender column.';
}
if (PHPWS_Error::logIfError($db->addTableColumn('birthdate', 'varchar(20) default NULL'))) {
$content[] = 'Unable to create checkin_visitor.birthdate column.</pre>';
return false;
} else {
$content[] = 'Created checkin_visitor.birthdate column.';
}
// Make changes to checkin_staff table
$db = new PHPWS_DB('checkin_staff');
if (PHPWS_Error::logIfError($db->addTableColumn('birthdate_filter_end', 'varchar(20) default NULL', 'f_regexp'))) {
$content[] = 'Unable to create checkin_staff.birthdate_filter_end column.</pre>';
return false;
} else {
$content[] = 'Created checkin_staff.birthdate_filter_end column.';
}
if (PHPWS_Error::logIfError($db->addTableColumn('birthdate_filter_start', 'varchar(20) default NULL', 'f_regexp'))) {
$content[] = 'Unable to create checkin_staff.birthdate_filter_start column.</pre>';
return false;
} else {
$content[] = 'Created checkin_staff.birthdate_filter_start column.';
}
if (PHPWS_Error::logIfError($db->addTableColumn('gender_filter', 'varchar(20) default NULL', 'f_regexp'))) {
$content[] = 'Unable to create checkin_staff.gender_filter column.</pre>';
return false;
} else {
$content[] = 'Created checkin_staff.gender_filter column.';
}
if (PHPWS_Error::logIfError($db->query('ALTER TABLE checkin_staff CHANGE filter lname_filter varchar(255) default NULL'))) {
$content[] = 'Unable to rename checkin_staff.filter column.</pre>';
return false;
} else {
$content[] = 'Renamed checkin_staff.filter to checkin_staff.lname_filter.';
}
if (PHPWS_Error::logIfError($db->query('ALTER TABLE checkin_staff CHANGE f_regexp lname_regexp varchar(255) default NULL'))) {
$content[] = 'Unable to rename checkin_staff.f_regexp column.</pre>';
return false;
} else {
$content[] = 'Renamed checkin_staff.f_regexp to checkin_staff.lname_regexp.';
}
$content[] = '1.5.0 changes
---------------
+ Fixed the "print view" for daily reports.
+ Option to collect visitor gender.
+ Option to collect visitor birthdate.
+ Added staff filters for gender and birthdate.
+ Staff can now have more than one filter.</pre>';
case version_compare($current_version, '1.5.1', '<'):
$content[] = '<pre>1.5.1 changes
----------------
+ Fixed some bugs and notices</pre>';
}
return true;
}
示例5: _confirmArchive
function _confirmArchive()
{
if (isset($_REQUEST['PHAT_ArchiveConfirm'])) {
include PHPWS_SOURCE_DIR . 'mod/phatform/inc/Archive.php';
$error = NULL;
$error = archive($this->getId());
if (PHPWS_Error::isError($error)) {
PHPWS_Error::log($error);
javascript('alert', array('content' => dgettext('phatform', 'Failed to archive.')));
unset($_REQUEST['PHAT_ArchiveConfirm']);
unset($error);
$_REQUEST['PHAT_FORM_OP'] = 'ArchiveConfirm';
$this->action();
return;
}
$this->_saved = 0;
$this->_position = 0;
$sql = 'UPDATE mod_phatform_forms SET saved=\'' . $this->_saved . "' WHERE id='" . $this->getId() . "'";
PHPWS_DB::query($sql);
$sql = 'DROP TABLE mod_phatform_form_' . $this->getId();
PHPWS_DB::query($sql);
$table = 'mod_phatform_form_' . $this->getId() . '_seq';
if (PHPWS_DB::isTable($table)) {
$sql = 'DROP TABLE ' . $table;
PHPWS_DB::query($sql);
}
$_REQUEST['PHAT_FORM_OP'] = 'EditAction';
$_REQUEST['PHAT_Submit'] = 1;
$this->action();
} else {
if (isset($_REQUEST['PHAT_ArchiveCancel'])) {
$_REQUEST['PHAT_MAN_OP'] = 'List';
$_SESSION['PHAT_FormManager']->action();
} else {
$hiddens['module'] = 'phatform';
$hiddens['PHAT_FORM_OP'] = 'ArchiveConfirm';
foreach ($hiddens as $key => $value) {
$eles[] = PHPWS_Form::formHidden($key, $value);
}
$elements[0] = implode("\n", $eles);
$confirmTags['WARNING_TAG'] = dgettext('phatform', 'WARNING!');
$confirmTags['MESSAGE'] = dgettext('phatform', 'You have chosen to edit a saved form! All current data will be archived and cleared if you chose to continue! Make sure you export your data from your form before you continue!');
$confirmTags['CANCEL_BUTTON'] = PHPWS_Form::formSubmit(dgettext('phatform', 'Cancel'), 'PHAT_ArchiveCancel');
$confirmTags['CONFIRM_BUTTON'] = PHPWS_Form::formSubmit(dgettext('phatform', 'Confirm'), 'PHAT_ArchiveConfirm');
$elements[0] .= PHPWS_Template::processTemplate($confirmTags, 'phatform', 'form/archiveConfirm.tpl');
$content = PHPWS_Form::makeForm('PHAT_FormArchiveConfirm', 'index.php', $elements);
$GLOBALS['CNT_phatform']['title'] = dgettext('phatform', 'Form') . ': ' . $this->getLabel();
$GLOBALS['CNT_phatform']['content'] .= $content;
}
}
}
示例6: import
/**
* Imports a SQL dump into the database.
* This function can not be called statically.
* @returns True if successful, false if not successful and report_errors = false or
* Error object if report_errors = true
*/
public static function import($text, $report_errors = true)
{
PHPWS_DB::touchDB();
// first_import makes sure at least one query was completed
// successfully
$first_import = false;
$sqlArray = PHPWS_Text::sentence($text);
$error = false;
foreach ($sqlArray as $sqlRow) {
if (empty($sqlRow) || preg_match("/^[^\\w\\d\\s\\(\\)]/i", $sqlRow)) {
continue;
}
$sqlCommand[] = $sqlRow;
if (preg_match("/;\$/", $sqlRow)) {
$query = implode(' ', $sqlCommand);
$sqlCommand = array();
if (!DB_ALLOW_TABLE_INDEX && preg_match('/^create index/i', $query)) {
continue;
}
PHPWS_DB::homogenize($query);
$result = PHPWS_DB::query($query);
if (DB::isError($result)) {
if ($report_errors) {
return $result;
} else {
PHPWS_Error::log($result);
$error = true;
}
}
$first_import = true;
}
}
if (!$first_import) {
if ($report_errors) {
return PHPWS_Error::get(PHPWS_DB_IMPORT_FAILED, 'core', 'PHPWS_DB::import');
} else {
PHPWS_Error::log(PHPWS_DB_IMPORT_FAILED, 'core', 'PHPWS_DB::import');
$error = true;
}
}
if ($error) {
return false;
} else {
return true;
}
}
示例7: rollback
public static function rollback()
{
// if transaction not started, return false.
if (!$GLOBALS['DB_Transaction']) {
return false;
}
$GLOBALS['DB_Transaction'] = false;
return PHPWS_DB::query('ROLLBACK');
}
示例8: signup_update
//.........这里部分代码省略.........
-------------------
+ Install sql was missing new columns in signup_sheet table.
+ Removed the phone number parsing. Got in the way of extensions and
the like.
</pre>';
case version_compare($currentVersion, '1.2.0', '<'):
$content[] = '<pre>1.2.0 changes
----------------
+ Fixed: signup errors reseting slot pick
+ Removed redundant error message
+ previous register fix would not list empty slots.
+ Removed string length on phone number
+ Only pulling registered users for slots open.
+ PHP 5 formatted.
</pre>';
case version_compare($currentVersion, '1.2.1', '<'):
$content[] = '<pre>1.2.1 changes
----------------
+ Removed reference symbols
+ Added dngettext for "openings(s)" translation
+ Rewrote getAllSlots. The slots filled number wasn\'t joining
properly.
+ Fixed sheet view link.</pre>';
case version_compare($currentVersion, '1.2.2', '<'):
$content[] = '<pre>1.2.2 changes
----------------
+ Fixed url sent to key.</pre>';
case version_compare($currentVersion, '1.3.0', '<'):
$content[] = '<pre>';
$db = new PHPWS_DB('signup_peeps');
$db->addTableColumn('extra1', 'varchar(255) null');
$db->addTableColumn('extra2', 'varchar(255) null');
$db->addTableColumn('extra3', 'varchar(255) null');
$db->query('update signup_peeps set extra1 = organization');
$db = new PHPWS_DB('signup_sheet');
$db->addTableColumn('extra1', 'varchar(255) null');
$db->addTableColumn('extra2', 'varchar(255) null');
$db->addTableColumn('extra3', 'varchar(255) null');
$db->addValue('extra1', 'Organization');
$db->update();
$files = array('templates/applicants.tpl', 'templates/edit_peep.tpl', 'templates/peeps.tpl', 'templates/signup_form.tpl');
signupUpdateFiles($files, $content);
$content[] = '1.3.0 changes
--------------
+ Added extra 1 thru 3 to sheet and peeps for extra questions.
</pre>';
case version_compare($currentVersion, '1.3.1', '<'):
$content[] = '<pre>1.3.1 changes
-------------------
+ Fixed incorrect counting of people in slots.</pre>';
case version_compare($currentVersion, '1.3.2', '<'):
$content[] = '<pre>1.3.2 changes
-------------------
+ PHP 5 strict fixes.
+ Icon class added</pre>';
case version_compare($currentVersion, '1.3.3', '<'):
$content[] = '<pre>1.3.3 changes
-------------------
+ New additions by Chris Coley
- Added move to bottom and top for slot ordering.
- Phone number error checked.
- Refined slot search, only slots with searched member.
- Start and end times order options on sheet listing.
- Added clearer instructions to sheet setup.
- Emails sent according to last search.
- UI additions to ease administration.
示例9: hms_update
//.........这里部分代码省略.........
$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');
示例10: getOptionSets
/**
* Provides a list of option sets currently stored in the database
*
* @return array The listing of option sets
* @access public
*/
function getOptionSets()
{
$sql = 'SELECT id, label FROM mod_phatform_options';
$optionResult = PHPWS_DB::query($sql);
$options[0] = '';
while ($row = $optionResult->fetchrow(MDB2_FETCHMODE_ASSOC)) {
$options[$row['id']] = $row['label'];
}
if (sizeof($options) > 1) {
return $options;
} else {
return NULL;
}
}
示例11: cleanUpArchive
function cleanUpArchive()
{
if (isset($_REQUEST['ARCHIVE_filename'])) {
$db = new PHPWS_DB('mod_phatform_forms');
$db->addWhere('archiveFileName', $_REQUEST['ARCHIVE_filename']);
$result = $db->select();
if ($result) {
$sql = 'DROP TABLE ' . $result[0]['archiveTableName'];
if (PHPWS_DB::query($sql)) {
$result = $db->delete();
if ($result) {
return dgettext('phatform', 'Successfully deleted table associated with the archive with filename ') . "<b>'" . $_REQUEST['ARCHIVE_filename'] . "'</b>.";
} else {
return dgettext('phatform', 'There was a problem deleting viewing archive table associated for filename ') . "<b>'" . $_REQUEST['ARCHIVE_filename'] . "'</b>.";
}
} else {
return dgettext('phatform', 'There was a problem deleting viewing archive table associated for filename ') . "<b>'" . $_REQUEST['ARCHIVE_filename'] . "'</b>.";
}
}
}
}
示例12: _doMassUpdate
/**
* Updates simple attributes for multiple items at once.
*
* This function is called when multiple items are requested to be hidden, approved, or
* visable. It simply creates an sql statement based on the type of request on the item
* ids contained in the $_REQUEST['PHPWS_MAN_ITEMS'] array and executes it on the database.
* Note: should only be called by managerAction()
*
* @param string $column The name of the column to update.
* @param mixed $value The value to set the column to.
* @return boolean TRUE on success and FALSE on failure.
* @access private
*/
function _doMassUpdate($column, $value)
{
if (is_array($_REQUEST['PHPWS_MAN_ITEMS']) && sizeof($_REQUEST['PHPWS_MAN_ITEMS']) > 0) {
if (isset($this->_table)) {
$table = $this->_table;
} else {
$table = $this->_tables[$this->listName];
}
/* Begin sql update statement */
$sql = 'UPDATE ' . $table . " SET {$column}='{$value}' WHERE id='";
/* Set flag to know when to add sql for checking against extra ids */
$flag = FALSE;
foreach ($_REQUEST['PHPWS_MAN_ITEMS'] as $itemId) {
if ($flag) {
$sql .= " OR id='";
}
$sql .= $itemId . "'";
$flag = TRUE;
}
/* Execute query and test for failure */
$result = PHPWS_DB::query($sql);
if ($result) {
return TRUE;
} else {
return FALSE;
}
}
}
示例13: access_update
//.........这里部分代码省略.........
$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;
}