Update of /cvsroot/squirrelmail/smdoc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv29914/lib Modified Files: class.object.php smdoc.class.external.php smdoc.class.user.php smdoc.env.database.php smdoc.env.foowd.php smdoc.error.constants.php smdoc.extern.siteindex.php Log Message: Changes to make the database impl do what I want. Plus, other stuff I don't remember Index: class.object.php =================================================================== RCS file: /cvsroot/squirrelmail/smdoc/lib/class.object.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- class.object.php 23 Oct 2003 05:18:06 -0000 1.5 +++ class.object.php 30 Oct 2003 03:30:48 -0000 1.6 @@ -41,7 +41,6 @@ setPermission('foowd_object', 'object', 'revert', 'Gods'); setPermission('foowd_object', 'object', 'delete', 'Gods'); setPermission('foowd_object', 'object', 'clone', 'Gods'); -setPermission('foowd_object', 'object', 'permissions', 'Gods'); /* Class descriptor */ setClassMeta('foowd_object', 'Base Object'); @@ -301,6 +300,7 @@ unset($returnArray['foowd_vars_meta']); // member variable meta data unset($returnArray['foowd_indexes']); // object indexes unset($returnArray['foowd_original_access_vars']); // indexes used to load object + unset($returnArray['foowd_primary_key']); // indices used as primary key for save/update/delete return array_keys($returnArray); } @@ -336,6 +336,8 @@ $this->foowd_original_access_vars['version'] = $this->version; $this->foowd_original_access_vars['classid'] = $this->classid; $this->foowd_original_access_vars['workspaceid'] = $this->workspaceid; +// Default primary key + $this->foowd_primary_key = array('objectid','version','classid','workspaceid'); } /** @@ -555,7 +557,8 @@ if ($result) { $this->foowd_changed = FALSE; } - $this->foowd->track(); return $result; + $this->foowd->track(); + return $result; } /** @@ -566,9 +569,11 @@ function delete() { // remove all versions of an object from the database $this->foowd->track('foowd_object->delete'); if ($this->foowd->database->delete($this)) { - $this->foowd->track(); return TRUE; + $this->foowd->track(); + return TRUE; } else { - $this->foowd->track(); return FALSE; + $this->foowd->track(); + return FALSE; } } @@ -597,9 +602,9 @@ unset($obj['foowd_indexes']); unset($obj['foowd_original_access_vars']); - include_once(FOOWD_DIR.'input.textarray.php'); - include_once(FOOWD_DIR.'input.textarea.php'); - include_once(FOOWD_DIR.'input.textbox.php'); + include_once(INPUT_DIR.'input.textarray.php'); + include_once(INPUT_DIR.'input.textarea.php'); + include_once(INPUT_DIR.'input.textbox.php'); foreach ($obj as $memberName => $memberVar) { if (isset($this->foowd_vars_meta[$memberName])) { @@ -678,7 +683,7 @@ $groups = $this->foowd->getUserGroups(); $changed = FALSE; - include_once(FOOWD_DIR.'input.dropdown.php'); + include_once(INPUT_DIR.'input.dropdown.php'); foreach (get_class_methods($this) as $methodName) { if (substr($methodName, 0, 7) == 'method_') { @@ -796,9 +801,9 @@ function class_create(&$foowd, $className) { $foowd->track('foowd_object->class_create'); - include_once(FOOWD_DIR.'input.querystring.php'); - include_once(FOOWD_DIR.'input.form.php'); - include_once(FOOWD_DIR.'input.textbox.php'); + include_once(INPUT_DIR.'input.querystring.php'); + include_once(INPUT_DIR.'input.form.php'); + include_once(INPUT_DIR.'input.textbox.php'); $queryTitle = new input_querystring('title', REGEX_TITLE, NULL); $createForm = new input_form('createForm', NULL, 'POST', _("Create"), NULL); @@ -879,7 +884,7 @@ function method_admin() { $this->foowd->track('foowd_object->method_admin'); - include_once(FOOWD_DIR.'input.form.php'); + include_once(INPUT_DIR.'input.form.php'); $adminForm = new input_form('adminForm', NULL, 'POST'); $this->addFormItemsToAdminForm($adminForm); @@ -897,7 +902,7 @@ function method_revert() { $this->foowd->track('foowd_object->method_revert'); - include_once(FOOWD_DIR.'input.querystring.php'); + include_once(INPUT_DIR.'input.querystring.php'); $confirm = new input_querystring('confirm', '/^[y]$/', FALSE); if ($confirm->value) { @@ -922,7 +927,7 @@ function method_delete() { $this->foowd->track('foowd_object->method_delete'); - include_once(FOOWD_DIR.'input.querystring.php'); + include_once(INPUT_DIR.'input.querystring.php'); $confirm = new input_querystring('confirm', '/^[y]$/', FALSE); if ($confirm->value) { @@ -949,9 +954,9 @@ function method_clone() { $this->foowd->track('foowd_object->method_clone'); - include_once(FOOWD_DIR.'input.form.php'); - include_once(FOOWD_DIR.'input.textbox.php'); - include_once(FOOWD_DIR.'input.dropdown.php'); + include_once(INPUT_DIR.'input.form.php'); + include_once(INPUT_DIR.'input.textbox.php'); + include_once(INPUT_DIR.'input.dropdown.php'); $cloneForm = new input_form('cloneForm', NULL, 'POST', 'Clone Object', NULL); $cloneTitle = new input_textbox('cloneTitle', REGEX_TITLE, $this->getTitle(), 'Clone Title'); @@ -984,7 +989,7 @@ function method_permissions() { $this->foowd->track('foowd_object->method_permissions'); - include_once(FOOWD_DIR.'input.form.php'); + include_once(INPUT_DIR.'input.form.php'); $permissionForm = new input_form('permissionForm', NULL, 'POST'); $changed = $this->addPermissionDropdowns($permissionForm); Index: smdoc.class.external.php =================================================================== RCS file: /cvsroot/squirrelmail/smdoc/lib/smdoc.class.external.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -w -r1.7 -r1.8 --- smdoc.class.external.php 23 Oct 2003 05:24:53 -0000 1.7 +++ smdoc.class.external.php 30 Oct 2003 03:30:48 -0000 1.8 @@ -56,7 +56,7 @@ $this->updatorid = 0; $this->updatorName = 'System'; $this->url = getURI(array('classid' => EXTERNAL_CLASS_ID, - 'objectid' => $objectid)); + 'objectid' => $objectid), FALSE); $this->title = htmlspecialchars($EXTERNAL_RESOURCES[$objectid]['title']); Index: smdoc.class.user.php =================================================================== RCS file: /cvsroot/squirrelmail/smdoc/lib/smdoc.class.user.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -w -r1.10 -r1.11 --- smdoc.class.user.php 25 Oct 2003 15:18:54 -0000 1.10 +++ smdoc.class.user.php 30 Oct 2003 03:30:49 -0000 1.11 @@ -14,11 +14,10 @@ setConst('USER_CLASS_NAME', constant('META_'. USER_CLASS_ID .'_CLASSNAME')); setConst('USER_CLASS', 'smdoc_user'); -setPermission('smdoc_user', 'object', 'xml', 'Nobody'); setPermission('smdoc_user', 'object', 'clone', 'Nobody'); -include_once(SM_PATH . 'class.anonuser.php'); -include_once(SM_PATH . 'class.user.php'); +include_once(SM_DIR . 'class.anonuser.php'); +include_once(SM_DIR . 'class.user.php'); /** * The smdoc extended user class. @@ -839,14 +838,16 @@ $foowd->track('smdoc_user->class_create'); include_once($foowd->path.'/input.textbox.php'); - include_once(SM_PATH.'smdoc.input.password.php'); + include_once(SM_DIR.'smdoc.input.password.php'); include_once($foowd->path.'/input.form.php'); $queryTitle = new input_querystring('title', REGEX_TITLE, NULL); $createUsername = new input_textbox('createUsername', REGEX_TITLE, $queryTitle->value, _("Username").':'); + $verifyPassword = new input_passwordbox('verifyPassword', REGEX_PASSWORD, NULL, _("Verify").':'); - $createPassword = new input_verify_passwordbox('createPassword', $verifyPassword, REGEX_PASSWORD, NULL, _("Password").':'); - $createEmail = new input_textbox('createEmail', REGEX_EMAIL, NULL, _("Email Address").':', NULL, NULL, NULL, FALSE); + $createPassword = new input_passwordbox('createPassword', REGEX_PASSWORD, NULL, _("Password").':', $verifyPassword); + + $createEmail = new input_textbox('createEmail', REGEX_EMAIL, NULL, _("Email Address").':', FALSE); $createForm = new input_form('createForm', NULL, 'POST', _("Create"), _("Reset")); if ( $createForm->submitted() && $createUsername->value != '' ) @@ -867,7 +868,8 @@ $url = getURI(array('class' => $className, 'method' => 'login', 'ok' => USER_CREATE_OK, - 'username' => htmlspecialchars($createUsername->value))); + 'username' => htmlspecialchars($createUsername->value)), + FALSE); header('Location: ' . $url); return NULL; case -1: @@ -935,7 +937,7 @@ $ok = ( $result == 0 ) ? USER_LOGIN_OK : USER_LOGIN_PREV; $url = getURI(array('objectid' => $foowd->user->objectid, 'classid' => USER_CLASS_ID, - 'ok' => $ok)); + 'ok' => $ok), FALSE); $foowd->track(); header('Location: ' . $url); case 1: @@ -948,7 +950,7 @@ $return['form'] = &$loginForm; break; case 8: - $url = getURI(array('error' => USER_LOGIN_BAD_HOST)); + $url = getURI(array('error' => USER_LOGIN_BAD_HOST), FALSE); $foowd->track(); header('Location: ' . $url); } @@ -975,7 +977,7 @@ case 3: $url = getURI(array('class' => 'smdoc_user', 'method' => 'login', - 'ok' => USER_LOGOUT_OK)); + 'ok' => USER_LOGOUT_OK), FALSE); header('Location: ' . $url); return NULL; } @@ -999,7 +1001,9 @@ $return['lastvisit'] = $this->updated; if ($foowd->user->objectid == $this->objectid) { - $return['update'] = getURI(array('objectid' => $this->objectid, 'classid' => $this->classid, 'method' => 'update')); + $return['update'] = getURI(array('objectid' => $this->objectid, + 'classid' => $this->classid, + 'method' => 'update')); $return['SM_version'] = $this->smver_to_string(); $return['IMAP_server'] = $this->imap_to_string(); $return['SMTP_server'] = $this->smtp_to_string(); @@ -1031,16 +1035,16 @@ include_once($foowd->path.'/input.form.php'); include_once($foowd->path.'/input.dropdown.php'); include_once($foowd->path.'/input.textbox.php'); - include_once(SM_PATH.'smdoc.input.checkbox.php'); - include_once(SM_PATH.'smdoc.input.password.php'); + include_once(SM_DIR.'smdoc.input.checkbox.php'); + include_once(SM_DIR.'smdoc.input.password.php'); $updateForm = new input_form('updateForm', NULL, 'POST', _("Update")); - $email = new input_textbox('email', REGEX_EMAIL, $this->email, _("Email").': ', NULL, NULL, NULL, FALSE); + $email = new input_textbox('email', REGEX_EMAIL, $this->email, _("Email").': ', FALSE); $showEmail = new input_smdoc_checkbox('show_email', $this->show_email, _("Share Email").': '); - $verify = new input_passwordbox('verify', REGEX_PASSWORD, '', _("Verify").': ', NULL, NULL, NULL, FALSE); - $password = new input_verify_passwordbox('password', $verify, REGEX_PASSWORD, '', _("Change Password").': ', NULL, NULL, NULL, FALSE); + $verify = new input_passwordbox('verify', REGEX_PASSWORD, '', _("Verify").': ', NULL, FALSE); + $password = new input_passwordbox('password', REGEX_PASSWORD, '', _("Change Password").': ', $verify, FALSE); $nicks = $this->IM_nicks; if ( !array_key_exists('MSN', $nicks) ) $nicks['MSN'] = ''; @@ -1049,12 +1053,12 @@ if ( !array_key_exists('Y!', $nicks) ) $nicks['Y!'] = ''; if ( !array_key_exists('WWW', $nicks) ) $nicks['WWW'] = ''; - $ircNick = new input_textbox('irc', $this->foowd_vars_meta['irc'], $this->IRC_nick, 'IRC: ', NULL, NULL, NULL, FALSE); - $msnNick = new input_textbox('msn', $this->foowd_vars_meta['msn'], $nicks['MSN'], 'MSN: ', NULL, NULL, NULL, FALSE); - $aimNick = new input_textbox('aim', $this->foowd_vars_meta['aim'], $nicks['AIM'], 'AIM: ', NULL, NULL, NULL, FALSE); - $icqNick = new input_textbox('icq', $this->foowd_vars_meta['icq'], $nicks['ICQ'], 'ICQ: ', NULL, NULL, NULL, FALSE); - $yahooNick = new input_textbox('ym', $this->foowd_vars_meta['yahoo'], $nicks['Y!'], 'Y!: ', NULL, NULL, NULL, FALSE); - $www = new input_textbox('www', $this->foowd_vars_meta['www'], $nicks['WWW'], 'WWW:', NULL, NULL, NULL, FALSE); + $ircNick = new input_textbox('irc', $this->foowd_vars_meta['irc'], $this->IRC_nick, 'IRC: ', FALSE); + $msnNick = new input_textbox('msn', $this->foowd_vars_meta['msn'], $nicks['MSN'], 'MSN: ', FALSE); + $aimNick = new input_textbox('aim', $this->foowd_vars_meta['aim'], $nicks['AIM'], 'AIM: ', FALSE); + $icqNick = new input_textbox('icq', $this->foowd_vars_meta['icq'], $nicks['ICQ'], 'ICQ: ', FALSE); + $yahooNick = new input_textbox('ym', $this->foowd_vars_meta['yahoo'], $nicks['Y!'], 'Y!: ', FALSE); + $www = new input_textbox('www', $this->foowd_vars_meta['www'], $nicks['WWW'], 'WWW:', FALSE); $smtpServer = new input_dropdown('smtp', $this->SMTP_server, $this->smtp_to_string(true), _("SMTP Server:")); $imapServer = new input_dropdown('imap', $this->IMAP_server, $this->imap_to_string(true), _("IMAP Server:")); $smVersion = new input_dropdown('smver', $this->SM_version, $this->smver_to_string(true), _("SquirrelMail Version:")); @@ -1107,7 +1111,7 @@ case 1: $url = getURI(array('objectid' => $foowd->user->objectid, 'classid' => USER_CLASS_ID, - 'ok' => USER_UPDATE_OK)); + 'ok' => USER_UPDATE_OK), FALSE); header('Location: ' . $url); break; case 2: Index: smdoc.env.database.php =================================================================== RCS file: /cvsroot/squirrelmail/smdoc/lib/smdoc.env.database.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- smdoc.env.database.php 25 Oct 2003 15:18:54 -0000 1.3 +++ smdoc.env.database.php 30 Oct 2003 03:30:49 -0000 1.4 @@ -10,8 +10,8 @@ */ require_once 'DB.php'; -include_once(SM_PATH.'env.database.php'); -include_once(SM_PATH.'smdoc.env.cache.php'); +include_once(SM_DIR.'env.database.php'); +include_once(SM_DIR.'smdoc.env.cache.php'); /** * SquirrelMail modification to foowd db. @@ -21,12 +21,42 @@ class smdoc_db extends foowd_db { /** - * Current table information + * Time in seconds since last update of object before checking for old + * archived versions to delete. Default 1 day (86400 seconds). + * @access public + */ + var $tidy_delay = 86400; + + /** + * Database factory method. + * + * Used for creating a database object of the correct sub-class. Given the + * name of the DB layer to use, the method will load the corrisponding DB + * layer class if it has not already been loaded. * - * @var str + * @static + * @param object foowd The foowd environment object. + * @param str type The type of database object to load. + * @return mixed The new database object or FALSE on failure. */ - var $default_table; + function factory(&$foowd) + { + $foowd->track('smdoc_db->factory'); + + $dbClass = isset($db['db_class']) ? $db['db_class'] : 'smdoc_db'; + $dbFile = isset($db['db_path']) ? $db['db_path'] : SM_DIR . 'smdoc.env.database.php'; + + if ( file_exists($dbFile) ) + require_once($dbFile); + else + trigger_error('Could not find database file: ' . $dbFile, E_USER_ERROR); + + if (!class_exists($dbClass)) + trigger_error('Could not find database class: ' . $dbClass, E_USER_ERROR); + $foowd->track(); + return new $dbClass($foowd); + } /** * Constructs a new database object. @@ -71,7 +101,14 @@ $this->foowd = &$foowd; $this->objects = new smdoc_obj_cache(); - $this->default_table = $db['db_table']; + $this->default_source = $db['db_table']; + + if ( isset($foowd->config_settings['archive']) ) + { + $archive = $foowd->config_settings['archive']; + if ( isset($archive['tidy_delay']) ) + $this->tidy_delay = $archive['tidy_delay']; + } } /** @@ -105,7 +142,8 @@ $result = $this->conn->query($query); // Always check that $result is not an error - if (DB::isError($result)) { + if (DB::isError($result)) + { $this->foowd->debug('msg', $result->getMessage()); return FALSE; } @@ -134,7 +172,8 @@ $row = $result->fetchRow(); // Always check that $result is not an error - if (DB::isError($row)) { + if (DB::isError($row)) + { $this->foowd->debug('msg', $row->getMessage()); return FALSE; } @@ -212,7 +251,7 @@ $this->foowd->track('smdoc_db->getObjList'); if ( $source == NULL ) - $source = $this->default_table; + $source = $this->default_source; if ( $setWorkspace ) $this->setWorkspace($where); @@ -233,9 +272,7 @@ if ( $limit == NULL ) $limit = ''; elseif ( !is_string($limit) ) - { $limit = ' LIMIT ' . $limit; - } $select = 'SELECT '; if ( $indexes == NULL ) @@ -302,6 +339,7 @@ * @param array record1 Retrieved associative array created from query row. * @param array record2 Retrieved associative array created from query row. * @return TRUE if version is defined in both records, and version1 > version2 + * @see #getObjList */ function checkRecordVersion($record1, $record2) { @@ -318,6 +356,8 @@ * @access private * @param str source The source to fetch the object from * @param array record Retrieved associative array created from query row. + * @see #getObjList + * @see #getObj */ function unserializeObject($source, $record) { @@ -326,4 +366,118 @@ return new foowd_object(); } + + + /** + * Save an object. + * + * @param object object The object to save + * @return bool Success or failure. + */ + function save(&$object) + { + $this->foowd->track('smdoc_db->save'); + + if (!isset($object->foowd_update) || $object->foowd_update) + $object->update(); // update object meta data + + $serializedObj = serialize($object); + + if (is_array($object->foowd_source)) + { + $source = $object->foowd_source['table']; + $makeTable = $object->foowd_source['table_create']; + } + elseif ( isset($object->foowd_source) ) + $source = $object->foowd_source; + else + $source = $this->default_source; + + // Build array of DB indices from object meta data + $fieldArray['object'] = $serializedObj; + foreach ( $object->foowd_indexes as $index => $definition ) + { + if ( isset($object->$index) ) + { + if ( $object->$index == FALSE ) + $fieldArray[$index] = 0; + else + $fieldArray[$index] = $object->$index; + } + } + + // buildWhere + foreach( $object->foowd_primary_key as $k => $index ) + $where[$index] = $object->foowd_original_access_vars[$index]; + $where = 'WHERE ' . $this->buildWhere($where); + + $update = 'UPDATE '.$source.' SET '; + $insert = 'INSERT INTO '.$source.' ('; + $values = ''; + + $foo = FALSE; + foreach ( $fieldArray as $field => $value ) + { + if ( $foo ) + { + $update .= ', '; + $insert .= ', '; + $values .= ', '; + } + $foo = TRUE; + $set = FALSE; + + $insert .= $field; + if ( isset($object->foowd_indexes[$field]['type']) ) + { + if ( $object->foowd_indexes[$field]['type'] == 'INT' ) + { + $update .= $field.' = '.$value; + $values .= $value; + $set = TRUE; + } + elseif ( $object->foowd_indexes[$field]['type'] == 'DATETIME' ) + { + $update .= $field.' = \''.date($this->dateTimeFormat, $value).'\''; + $values .= '\''.date($this->dateTimeFormat, $value).'\''; + $set = TRUE; + } + } + + if ( !$set ) + { + $update .= $field.' = '.$this->escape($value); + $values .= $this->escape($value); + } + } + $insert .= ') VALUES ('.$values.')'; + + $saveResult = 0; + + // try to update existing record + if ( $this->query_success($this->query($update)) ) + $saveResult = 1; + // if fail, write new record + elseif ( $this->query_success($this->query($insert)) ) + $saveResult = 2; + // if fail, modify table to include indexes from class definition + elseif ( $this->alterTable($source, $fieldArray) ) + { + // indexes were altered, retry update + if ( $this->query_success($this->query($update)) ) + $saveResult = 3; + // if that fails, retry insert + elseif ( $this->query_success($this->query($insert)) ) + $saveResult = 4; + } + + // tidy old archived versions + $tidyDate = time() - $this->tidy_delay; + if ( $saveResult && $object->updated < $tidyDate ) + $this->tidy($object); + + $this->foowd->track(); + return $saveResult; + } + } Index: smdoc.env.foowd.php =================================================================== RCS file: /cvsroot/squirrelmail/smdoc/lib/smdoc.env.foowd.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -w -r1.7 -r1.8 --- smdoc.env.foowd.php 25 Oct 2003 15:18:54 -0000 1.7 +++ smdoc.env.foowd.php 30 Oct 2003 03:30:49 -0000 1.8 @@ -10,7 +10,7 @@ */ define('FOOWD_CLASS_NAME', 'smdoc'); -include_once(SM_PATH . 'env.foowd.php'); +include_once(SM_DIR . 'env.foowd.php'); /** * The SMDoc Foowd environment class. @@ -40,7 +40,7 @@ $this->debug = FALSE; if ( $settings['debug']['debug_enabled'] ) { - require_once(SM_PATH . 'smdoc.env.debug.php'); + require_once(SM_DIR . 'smdoc.env.debug.php'); $this->debug = new smdoc_debug($this); } @@ -49,13 +49,13 @@ /* * Initialize Database connection */ - require_once(SM_PATH . 'smdoc.env.database.php'); + require_once(SM_DIR . 'smdoc.env.database.php'); $this->database = new smdoc_db($this); /* * Initialize template */ - require_once(SM_PATH . 'env.template.php'); + require_once(SM_DIR . 'env.template.php'); $this->template = new foowd_template($this); $this->template->template_dir = $settings['template']['template_dir']; $this->template->assign_by_ref('foowd', $this); @@ -63,13 +63,13 @@ /* * User group initialization */ - require_once(SM_PATH . 'smdoc.class.group.php'); + require_once(SM_DIR . 'smdoc.class.group.php'); $this->groups = new smdoc_group($this); /* * Get current User */ - require_once(SM_PATH . 'smdoc.class.user.php'); + require_once(SM_DIR . 'smdoc.class.user.php'); $this->user = smdoc_user::factory($this); $this->track(); Index: smdoc.error.constants.php =================================================================== RCS file: /cvsroot/squirrelmail/smdoc/lib/smdoc.error.constants.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- smdoc.error.constants.php 4 Sep 2003 06:56:23 -0000 1.3 +++ smdoc.error.constants.php 30 Oct 2003 03:30:49 -0000 1.4 @@ -9,6 +9,14 @@ * $Id$ */ +function getStatusStrings(&$ok, &$error) +{ + if ( isset($ok) && defined($ok.'_MSG') ) + $ok = constant($ok.'_MSG'); + elseif ( isset($error) && defined($error.'_MSG')) + $error = constant($error.'_MSG'); +} + define('INVALID_METHOD', 1); define('1_MSG', _("Called invalid or disabled method")); @@ -24,11 +32,21 @@ define('USER_LOGOUT_OK', 5); define('5_MSG', _("You are now logged out.")); + define('FORM_FILL_FIELDS', 6); define('6_MSG', _("Required fields are marked with an *")); define('USER_CREATE_OK', 7); define('7_MSG', _("User created and saved.")); -define('USER_UPDATE_OK', 8); -define('8_MSG', _("User updated.")); +define('OBJECT_CREATE_OK', 8); +define('8_MSG', -("Object created and saved.")); + +define('USER_UPDATE_OK', 9); +define('9_MSG', _("User updated.")); + +define('OBJECT_UPDATE_OK', 10); +define('10_MSG', _("Object updated.")); + +define('OBJECT_UPDATE_CANCEL', 11); +define('11_MSG', _("Action cancelled.")); Index: smdoc.extern.siteindex.php =================================================================== RCS file: /cvsroot/squirrelmail/smdoc/lib/smdoc.extern.siteindex.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- smdoc.extern.siteindex.php 25 Oct 2003 15:18:54 -0000 1.5 +++ smdoc.extern.siteindex.php 30 Oct 2003 03:30:49 -0000 1.6 @@ -35,8 +35,6 @@ $objects =& $foowd->getObjList($indices, NULL, NULL, $orderby, NULL, FALSE, TRUE); -show($objects); - $list_objects = array(); $i = 0; |