Changeset 141
- Timestamp:
- Jun 3, 2006 11:09:51 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/module_maker/skel/admin.php
r137 r141 275 275 $db->query("DELETE FROM %DB_TBL% WHERE %PRIMARY_KEY% = '" . $db->escapeString($id) . "'"); 276 276 277 $app->raiseMsg(sprintf(_("The %ITEM_TITLE% < strong>%s</strong> has been deleted."), $name), MSG_SUCCESS, __FILE__, __LINE__);277 $app->raiseMsg(sprintf(_("The %ITEM_TITLE% <em>%s</em> has been deleted."), $name), MSG_SUCCESS, __FILE__, __LINE__); 278 278 279 279 // Unlock record. … … 297 297 $version->create('%DB_TBL%', '%PRIMARY_KEY%', $last_insert_id, $frm['<##>']); 298 298 299 $app->raiseMsg(sprintf(_("The %ITEM_TITLE% < strong>%s</strong> has been added."), $frm['<##>']), MSG_SUCCESS, __FILE__, __LINE__);299 $app->raiseMsg(sprintf(_("The %ITEM_TITLE% <em>%s</em> has been added."), $frm['<##>']), MSG_SUCCESS, __FILE__, __LINE__); 300 300 301 301 return $last_insert_id; … … 322 322 $version->create('%DB_TBL%', '%PRIMARY_KEY%', $frm['%PRIMARY_KEY%'], $frm['<##>']); 323 323 324 $app->raiseMsg(sprintf(_("The %ITEM_TITLE% < strong>%s</strong> has been updated."), $frm['<##>']), MSG_SUCCESS, __FILE__, __LINE__);324 $app->raiseMsg(sprintf(_("The %ITEM_TITLE% <em>%s</em> has been updated."), $frm['<##>']), MSG_SUCCESS, __FILE__, __LINE__); 325 325 326 326 // Unlock record. -
trunk/lib/Auth_File.inc.php
r136 r141 329 329 if (!isset($users)) { 330 330 if (false === ($users = file($this->_params['htpasswd_file']))) { 331 $app->logMsg(sprintf( _("Could not read htpasswd file: %s"), $this->_params['htpasswd_file']), LOG_ERR, __FILE__, __LINE__);331 $app->logMsg(sprintf('Could not read htpasswd file: %s', $this->_params['htpasswd_file']), LOG_ERR, __FILE__, __LINE__); 332 332 return false; 333 333 } -
trunk/lib/FormValidator.inc.php
r136 r141 410 410 // Test email address format. 411 411 if (!preg_match($e->getParam('regex'), $email, $e_parts)) { 412 $this->addError($form_name, sprintf(_(" <strong>%s</strong>is not a valid email address."), oTxt($email)));412 $this->addError($form_name, sprintf(_("%s is not a valid email address."), oTxt($email))); 413 413 $app->logMsg(sprintf('The email address %s is not valid.', getFormData($form_name)), LOG_DEBUG, __FILE__, __LINE__); 414 414 return false; … … 430 430 // Compare ip2long twice for php4 backwards compat. 431 431 if ((ip2long($domain) == '-1' || ip2long($domain) === false) && function_exists('checkdnsrr') && !checkdnsrr($domain . '.', 'MX') && gethostbyname($domain) == $domain) { 432 $this->addError($form_name, sprintf(_(" <strong>%s</strong>is not a valid email domain name"), oTxt($domain)));432 $this->addError($form_name, sprintf(_("%s is not a valid email domain name"), oTxt($domain))); 433 433 $app->logMsg(sprintf('The email address %s contains an invalid email domain name (%s).', getFormData($form_name), $domain), LOG_INFO, __FILE__, __LINE__); 434 434 return false; … … 451 451 $phone = getFormData($form_name); 452 452 453 return $this->checkRegex($form_name, '/^[0-9 +().-]*$/', true, sprintf(_("The phone number <strong>%s</strong>is not valid."), $phone))454 && $this->stringLength($form_name, 0, 25, sprintf(_("The phone number <strong>%s</strong>is too long"), $phone));453 return $this->checkRegex($form_name, '/^[0-9 +().-]*$/', true, sprintf(_("The phone number %s is not valid."), $phone)) 454 && $this->stringLength($form_name, 0, 25, sprintf(_("The phone number %s is too long"), $phone)); 455 455 } 456 456 -
trunk/lib/Hierarchy.inc.php
r136 r141 164 164 // Make sure this is not empty and an array, even if it has only one value. 165 165 if ('' == $parents) { 166 $app->raiseMsg(sprintf(_("Cannot add node < strong>%s %s</strong>, no parent was specified."), $child_type, $child_id), MSG_ERR, __FILE__, __LINE__);167 $app->logMsg(sprintf( _("Cannot add node <strong>%s %s</strong>, no parent was specified."), $child_type, $child_id), LOG_ERR, __FILE__, __LINE__);166 $app->raiseMsg(sprintf(_("Cannot add node <em>%s %s</em>, no parent was specified."), $child_type, $child_id), MSG_ERR, __FILE__, __LINE__); 167 $app->logMsg(sprintf('Cannot add node %s %s, no parent was specified.', $child_type, $child_id), LOG_ERR, __FILE__, __LINE__); 168 168 return false; 169 169 } else if (!is_array($parents)) { … … 179 179 $parent = $this->toArrayID($parent_string); 180 180 if ($this->nodeExists($child_type, $child_id, $parent['node_type'], $parent['node_id'], $relationship_type)) { 181 $app->raiseMsg(sprintf(_("Cannot add node < strong>%s %s</strong> to parent <strong>%s %s</strong>. It already exists there"), $child_type, $child_id, $parent['node_type'], $parent['node_id']), MSG_ERR, __FILE__, __LINE__);182 $app->logMsg(sprintf( _("Cannot add node <strong>%s %s</strong> to parent <strong>%s %s</strong>. It already exists there"), $child_type, $child_id, $parent['node_type'], $parent['node_id']), LOG_ERR, __FILE__, __LINE__);181 $app->raiseMsg(sprintf(_("Cannot add node <em>%s %s</em> to parent <em>%s %s</em>. It already exists there"), $child_type, $child_id, $parent['node_type'], $parent['node_id']), MSG_ERR, __FILE__, __LINE__); 182 $app->logMsg(sprintf('Cannot add node %s %s to parent %s %s. It already exists there', $child_type, $child_id, $parent['node_type'], $parent['node_id']), LOG_ERR, __FILE__, __LINE__); 183 183 return false; 184 184 } 185 185 if (!$this->nodeExists($parent['node_type'], $parent['node_id'])) { 186 $app->raiseMsg(sprintf(_("Cannot add node < strong>%s %s</strong> to nonexistent parent <strong>%s %s</strong>."), $child_type, $child_id, $parent['node_type'], $parent['node_id']), MSG_ERR, __FILE__, __LINE__);187 $app->logMsg(sprintf( _("Cannot add node <strong>%s %s</strong> to nonexistent parent <strong>%s %s</strong>."), $child_type, $child_id, $parent['node_type'], $parent['node_id']), LOG_ERR, __FILE__, __LINE__);186 $app->raiseMsg(sprintf(_("Cannot add node <em>%s %s</em> to nonexistent parent <em>%s %s</em>."), $child_type, $child_id, $parent['node_type'], $parent['node_id']), MSG_ERR, __FILE__, __LINE__); 187 $app->logMsg(sprintf('Cannot add node %s %s to nonexistent parent %s %s.', $child_type, $child_id, $parent['node_type'], $parent['node_id']), LOG_ERR, __FILE__, __LINE__); 188 188 return false; 189 189 } … … 293 293 // Make sure this is not empty and an array, even if it has only one value. 294 294 if (empty($new_parents)) { 295 $app->raiseMsg(sprintf(_("Cannot move node < strong>%s %s</strong>, no parent was specified."), $child_type, $child_id), MSG_ERR, __FILE__, __LINE__);296 $app->logMsg(sprintf( _("Cannot move node <strong>%s %s</strong>, no parent was specified."), $child_type, $child_id), LOG_ERR, __FILE__, __LINE__);295 $app->raiseMsg(sprintf(_("Cannot move node <em>%s %s</em>, no parent was specified."), $child_type, $child_id), MSG_ERR, __FILE__, __LINE__); 296 $app->logMsg(sprintf('Cannot move node %s %s, no parent was specified.', $child_type, $child_id), LOG_ERR, __FILE__, __LINE__); 297 297 return false; 298 298 } else if (!is_array($new_parents)) { … … 307 307 $parent = $this->toArrayID($parent_string); 308 308 if (!$this->nodeExists($parent['node_type'], $parent['node_id'])) { 309 $app->raiseMsg(sprintf(_("Cannot move node < strong>%s %s</strong> to nonexistent parent <strong>%s %s</strong>."), $child_type, $child_id, $parent['node_type'], $parent['node_id']), MSG_ERR, __FILE__, __LINE__);310 $app->logMsg(sprintf( _("Cannot move node <strong>%s %s</strong> to nonexistent parent <strong>%s %s</strong>."), $child_type, $child_id, $parent['node_type'], $parent['node_id']), LOG_ERR, __FILE__, __LINE__);309 $app->raiseMsg(sprintf(_("Cannot move node <em>%s %s</em> to nonexistent parent <em>%s %s</em>."), $child_type, $child_id, $parent['node_type'], $parent['node_id']), MSG_ERR, __FILE__, __LINE__); 310 $app->logMsg(sprintf('Cannot move node %s %s to nonexistent parent %s %s.', $child_type, $child_id, $parent['node_type'], $parent['node_id']), LOG_ERR, __FILE__, __LINE__); 311 311 return false; 312 312 } 313 313 if ($this->isAncestor($child_type, $child_id, $parent['node_type'], $parent['node_id'])) { 314 $app->raiseMsg(sprintf(_("Cannot move node < strong>%s %s</strong> to parent <strong>%s %s</strong> because a node cannot have itself as a parent."), $child_type, $child_id, $parent['node_type'], $parent['node_id']), MSG_ERR, __FILE__, __LINE__);315 $app->logMsg(sprintf( _("Cannot move node <strong>%s %s</strong> to parent <strong>%s %s</strong> because a node cannot have itself as a parent."), $child_type, $child_id, $parent['node_type'], $parent['node_id']), LOG_ERR, __FILE__, __LINE__);314 $app->raiseMsg(sprintf(_("Cannot move node <em>%s %s</em> to parent <em>%s %s</em> because a node cannot have itself as a parent."), $child_type, $child_id, $parent['node_type'], $parent['node_id']), MSG_ERR, __FILE__, __LINE__); 315 $app->logMsg(sprintf('Cannot move node %s %s to parent %s %s because a node cannot have itself as a parent.', $child_type, $child_id, $parent['node_type'], $parent['node_id']), LOG_ERR, __FILE__, __LINE__); 316 316 return false; 317 317 } … … 741 741 // Preventing circular references. 742 742 if ($my_children[$i]['child_type'] == $child_type && $my_children[$i]['child_id'] == $child_id && !($_return_flag && $include_curr)) { 743 $app->logMsg(sprintf( _("Circular reference detected: %s has itself as a parent."), $this->toStringID($my_children[$i]['child_type'], $my_children[$i]['child_id'])), LOG_ERR, __FILE__, __LINE__);743 $app->logMsg(sprintf('Circular reference detected: %s has itself as a parent.', $this->toStringID($my_children[$i]['child_type'], $my_children[$i]['child_id'])), LOG_ERR, __FILE__, __LINE__); 744 744 continue; 745 745 } -
trunk/lib/ImageThumb.inc.php
r136 r141 583 583 if (!unlink($dest_file)) { 584 584 $return_val++; 585 $app->logMsg(sprintf( _("Delete thumbs failed: %s"), $dest_file), LOG_WARNING, __FILE__, __LINE__);585 $app->logMsg(sprintf('Delete thumbs failed: %s', $dest_file), LOG_WARNING, __FILE__, __LINE__); 586 586 } 587 587 } … … 610 610 $source_file = realpath(sprintf('%s/%s', $this->getParam('source_dir'), $file_name)); 611 611 if (!unlink($source_file)) { 612 $app->logMsg(sprintf( _("Delete original failed: %s"), $source_file), LOG_WARNING, __FILE__, __LINE__);612 $app->logMsg(sprintf('Delete original failed: %s', $source_file), LOG_WARNING, __FILE__, __LINE__); 613 613 return false; 614 614 } -
trunk/lib/Lock.inc.php
r138 r141 368 368 369 369 <p><?php 370 printf(_("The record <strong>%s</strong> is currently being edited by <strong>%s</strong>(%d minutes elapsed). You cannot modify the record while it is locked by another user."),370 printf(_("The record %s is currently being edited by %s (%d minutes elapsed). You cannot modify the record while it is locked by another user."), 371 371 $this->getTitle(), 372 372 $this->getEditor(), -
trunk/lib/MCVE.inc.php
r136 r141 154 154 $app->raiseMsg(sprintf(_("MCVE %s success: %s %s"), $type, $ret_text, ('' == $verbiage ? '' : '(' . trim($verbiage) . ')')), MSG_SUCCESS, __FILE__, __LINE__); 155 155 } 156 $app->logMsg(sprintf( _("MCVE success details. Auth: %s; Batch: %s; Item: %s; TTID: %s; AVS: %s; CV: %s."),156 $app->logMsg(sprintf('MCVE success details. Auth: %s; Batch: %s; Item: %s; TTID: %s; AVS: %s; CV: %s.', 157 157 MCVE_TransactionAuth($this->conn, $tid), 158 158 MCVE_TransactionBatch($this->conn, $tid), -
trunk/lib/PageSequence.inc.php
r136 r141 140 140 } else { 141 141 // Step with specified key does not exist. 142 $app->logMsg(sprintf( _("Step %s not defined in sequence %s"), $step_id, $this->sequence_title), LOG_INFO, __FILE__, __LINE__);142 $app->logMsg(sprintf('Step %s not defined in sequence %s', $step_id, $this->sequence_title), LOG_INFO, __FILE__, __LINE__); 143 143 return false; 144 144 } -
trunk/lib/Upload.inc.php
r136 r141 132 132 // Ensure the file form element specified actually exists. 133 133 if (!isset($_FILES[$form_name])) { 134 $app->logMsg(sprintf( _("Form element %s does not exist."), $form_name), LOG_ERR, __FILE__, __LINE__);134 $app->logMsg(sprintf('Form element %s does not exist.', $form_name), LOG_ERR, __FILE__, __LINE__); 135 135 $this->_raiseMsg(_("There was a problem with the file upload. Please try again later."), MSG_ERR, __FILE__, __LINE__); 136 136 return false; … … 196 196 if (UPLOAD_ERR_INI_SIZE === $files['error'][$i]) { 197 197 $this->_raiseMsg(sprintf(_("The file %s failed uploading: it exceeds the maximum allowed upload file size of %s."), $file_name, ini_get('upload_max_filesize')), MSG_ERR, __FILE__, __LINE__); 198 $app->logMsg(sprintf( _("The file %s failed uploading with PHP error %s UPLOAD_ERR_INI_SIZE (currently %s)."), $files['error'][$i], $file_name, ini_get('upload_max_filesize')), LOG_ERR, __FILE__, __LINE__);198 $app->logMsg(sprintf('The file %s failed uploading with PHP error %s UPLOAD_ERR_INI_SIZE (currently %s).', $files['error'][$i], $file_name, ini_get('upload_max_filesize')), LOG_ERR, __FILE__, __LINE__); 199 199 $this->errors[] = array('filename' => $file_name, 'errortype' => UPLOAD_ERR_INI_SIZE); 200 200 continue; … … 202 202 if (UPLOAD_ERR_FORM_SIZE === $files['error'][$i]) { 203 203 $this->_raiseMsg(sprintf(_("The file %s failed uploading: it exceeds the maximum allowed upload file size of %s."), $file_name, $_POST['MAX_FILE_SIZE']), MSG_ERR, __FILE__, __LINE__); 204 $app->logMsg(sprintf( _("The file %s failed uploading with PHP error %s UPLOAD_ERR_FORM_SIZE (currently %s)."), $files['error'][$i], $file_name, $_POST['MAX_FILE_SIZE']), LOG_ERR, __FILE__, __LINE__);204 $app->logMsg(sprintf('The file %s failed uploading with PHP error %s UPLOAD_ERR_FORM_SIZE (currently %s).', $files['error'][$i], $file_name, $_POST['MAX_FILE_SIZE']), LOG_ERR, __FILE__, __LINE__); 205 205 $this->errors[] = array('filename' => $file_name, 'errortype' => UPLOAD_ERR_FORM_SIZE); 206 206 continue; … … 208 208 if (UPLOAD_ERR_PARTIAL === $files['error'][$i]) { 209 209 $this->_raiseMsg(sprintf(_("The file %s failed uploading: it was only partially uploaded."), $file_name), MSG_ERR, __FILE__, __LINE__); 210 $app->logMsg(sprintf( _("The file %s failed uploading with PHP error %s UPLOAD_ERR_PARTIAL."), $files['error'][$i], $file_name), LOG_ERR, __FILE__, __LINE__);210 $app->logMsg(sprintf('The file %s failed uploading with PHP error %s UPLOAD_ERR_PARTIAL.', $files['error'][$i], $file_name), LOG_ERR, __FILE__, __LINE__); 211 211 $this->errors[] = array('filename' => $file_name, 'errortype' => UPLOAD_ERR_PARTIAL); 212 212 continue; … … 214 214 if (UPLOAD_ERR_NO_FILE === $files['error'][$i]) { 215 215 $this->_raiseMsg(sprintf(_("The file %s failed uploading: no file was uploaded."), $file_name), MSG_ERR, __FILE__, __LINE__); 216 $app->logMsg(sprintf( _("The file %s failed uploading with PHP error %s UPLOAD_ERR_NO_FILE."), $files['error'][$i], $file_name), LOG_ERR, __FILE__, __LINE__);216 $app->logMsg(sprintf('The file %s failed uploading with PHP error %s UPLOAD_ERR_NO_FILE.', $files['error'][$i], $file_name), LOG_ERR, __FILE__, __LINE__); 217 217 $this->errors[] = array('filename' => $file_name, 'errortype' => UPLOAD_ERR_NO_FILE); 218 218 continue; … … 220 220 if (UPLOAD_ERR_NO_TMP_DIR === $files['error'][$i]) { 221 221 $this->_raiseMsg(sprintf(_("The file %s failed uploading: temporary upload directory missing."), $file_name), MSG_ERR, __FILE__, __LINE__); 222 $app->logMsg(sprintf( _("The file %s failed uploading with PHP error %s UPLOAD_ERR_NO_TMP_DIR."), $files['error'][$i], $file_name), LOG_ERR, __FILE__, __LINE__);222 $app->logMsg(sprintf('The file %s failed uploading with PHP error %s UPLOAD_ERR_NO_TMP_DIR.', $files['error'][$i], $file_name), LOG_ERR, __FILE__, __LINE__); 223 223 $this->errors[] = array('filename' => $file_name, 'errortype' => UPLOAD_ERR_NO_TMP_DIR); 224 224 continue; … … 228 228 if (!is_uploaded_file($files['tmp_name'][$i])) { 229 229 $this->_raiseMsg(sprintf(_("The file %s failed uploading."), $file_name), MSG_ERR, __FILE__, __LINE__); 230 $app->logMsg(sprintf( _("The file %s failed is_uploaded_file."), $file_name), LOG_ERR, __FILE__, __LINE__);230 $app->logMsg(sprintf('The file %s failed is_uploaded_file.', $file_name), LOG_ERR, __FILE__, __LINE__); 231 231 $this->errors[] = array('filename' => $file_name, 'errortype' => UPLOAD_USER_ERR_NOT_UPLOADED_FILE); 232 232 continue; … … 236 236 if ($files['size'][$i] <= 0) { 237 237 $this->_raiseMsg(sprintf(_("The file %s failed uploading: it contains zero bytes."), $file_name), MSG_ERR, __FILE__, __LINE__); 238 $app->logMsg(sprintf( _("The uploaded file %s contains zero bytes."), $file_name), LOG_ERR, __FILE__, __LINE__);238 $app->logMsg(sprintf('The uploaded file %s contains zero bytes.', $file_name), LOG_ERR, __FILE__, __LINE__); 239 239 $this->errors[] = array('filename' => $file_name, 'errortype' => UPLOAD_USER_ERR_EMPTY_FILE); 240 240 continue; … … 244 244 if (!in_array(strtolower($this->getFilenameExtension($file_name)), $this->getParam('valid_file_extensions'))) { 245 245 $this->_raiseMsg(sprintf(_("The file %s failed uploading: it is an unrecognized type. Files must have one of the following file name extensions: %s."), $file_name, join(', ', $this->getParam('valid_file_extensions'))), MSG_ERR, __FILE__, __LINE__); 246 $app->logMsg(sprintf( _("The uploaded file %s has an unrecognized file name extension."), $file_name), LOG_WARNING, __FILE__, __LINE__);246 $app->logMsg(sprintf('The uploaded file %s has an unrecognized file name extension.', $file_name), LOG_WARNING, __FILE__, __LINE__); 247 247 $this->errors[] = array('filename' => $file_name, 'errortype' => UPLOAD_USER_ERR_INVALID_EXTENSION); 248 248 continue; … … 252 252 if (!$this->getParam('allow_overwriting') && $this->exists($file_name)) { 253 253 $this->_raiseMsg(sprintf(_("The file %s failed uploading: a file with that name already exists."), $file_name), MSG_ERR, __FILE__, __LINE__); 254 $app->logMsg(sprintf( _("The uploaded file %s doesn't have a unique filename."), $file_name), LOG_WARNING, __FILE__, __LINE__);254 $app->logMsg(sprintf('The uploaded file %s doesn't have a unique filename.', $file_name), LOG_WARNING, __FILE__, __LINE__); 255 255 $this->errors[] = array('filename' => $file_name, 'errortype' => UPLOAD_USER_ERR_NOT_UNIQUE); 256 256 continue; … … 290 290 } else { 291 291 $this->_raiseMsg(sprintf(_("The file %s failed uploading."), $file_name), MSG_ERR, __FILE__, __LINE__); 292 $app->logMsg(sprintf( _("Moving file failed: %s -> %s"), $files['tmp_name'][$i], $file_path_name), LOG_ALERT, __FILE__, __LINE__);292 $app->logMsg(sprintf('Moving file failed: %s -> %s', $files['tmp_name'][$i], $file_path_name), LOG_ALERT, __FILE__, __LINE__); 293 293 $this->errors[] = array('filename' => $file_name, 'errortype' => UPLOAD_USER_ERR_MOVE_FAILED); 294 294 } … … 324 324 325 325 if (!is_file($file_path_name)) { 326 $app->logMsg(sprintf( _("Error deleting nonexistent file: %s"), $file_path_name), LOG_ERR, __FILE__, __LINE__);326 $app->logMsg(sprintf('Error deleting nonexistent file: %s', $file_path_name), LOG_ERR, __FILE__, __LINE__); 327 327 return false; 328 328 } else if (unlink($file_path_name)) { … … 330 330 } else { 331 331 $this->_raiseMsg(sprintf(_("The file %s could not be deleted."), $file_name), MSG_ERR, __FILE__, __LINE__); 332 $app->logMsg(sprintf( _("Failed deleting file: %s"), $file_path_name), LOG_ERR, __FILE__, __LINE__);332 $app->logMsg(sprintf('Failed deleting file: %s', $file_path_name), LOG_ERR, __FILE__, __LINE__); 333 333 return false; 334 334 } … … 361 361 } else { 362 362 $this->_raiseMsg(sprintf(_("Error renaming file to %s"), $new_file_path_name), MSG_WARNING, __FILE__, __LINE__); 363 $app->logMsg(sprintf( _("Error renaming file to %s"), $new_file_path_name), LOG_WARNING, __FILE__, __LINE__);363 $app->logMsg(sprintf('Error renaming file to %s', $new_file_path_name), LOG_WARNING, __FILE__, __LINE__); 364 364 return false; 365 365 } 366 366 } else { 367 367 $this->_raiseMsg(sprintf(_("Couldn't rename nonexistent file %s."), $old_name), MSG_WARNING, __FILE__, __LINE__); 368 $app->logMsg(sprintf( _("Error renaming nonexistent file: %s"), $old_file_path_name), LOG_WARNING, __FILE__, __LINE__);368 $app->logMsg(sprintf('Error renaming nonexistent file: %s', $old_file_path_name), LOG_WARNING, __FILE__, __LINE__); 369 369 return false; 370 370 } -
trunk/lib/Version.inc.php
r139 r141 229 229 if (!$record = mysql_fetch_assoc($qid)) { 230 230 $app->raiseMsg(sprintf(_("Version ID %s%s not found."), $version_id, (empty($record['version_title']) ? '' : ' (' . $record['version_title'] . ')')), MSG_WARNING, __FILE__, __LINE__); 231 $app->logMsg(sprintf( _("Version ID %s%s not found."), $version_id, (empty($record['version_title']) ? '' : ' (' . $record['version_title'] . ')')), LOG_WARNING, __FILE__, __LINE__);231 $app->logMsg(sprintf('Version ID %s%s not found.', $version_id, (empty($record['version_title']) ? '' : ' (' . $record['version_title'] . ')')), LOG_WARNING, __FILE__, __LINE__); 232 232 return false; 233 233 } … … 237 237 if (!$db->columnExists($record['record_table'], array_keys($data), $this->getParam('db_schema_strict'))) { 238 238 $app->raiseMsg(sprintf(_("Version ID %s%s is not compatible with the current database table."), $version_id, (empty($record['version_title']) ? '' : ' (' . $record['version_title'] . ')')), MSG_ERR, __FILE__, __LINE__); 239 $app->logMsg(sprintf( _("Version ID %s%s restoration failed, DB schema does not match for table %s."), $version_id, (empty($record['version_title']) ? '' : ' (' . $record['version_title'] . ')'), $record['record_table']), LOG_ALERT, __FILE__, __LINE__);239 $app->logMsg(sprintf('Version ID %s%s restoration failed, DB schema does not match for table %s.', $version_id, (empty($record['version_title']) ? '' : ' (' . $record['version_title'] . ')'), $record['record_table']), LOG_ALERT, __FILE__, __LINE__); 240 240 return false; 241 241 } -
trunk/services/admins.php
r137 r141 198 198 || 'insert' == getFormData('op')) { 199 199 if ($auth->usernameExists(getFormData('username'))) { 200 $fv->addError('username', sprintf(_("The username <strong>%s</strong>already exists. Please choose another."), getFormData('username')));200 $fv->addError('username', sprintf(_("The username %s already exists. Please choose another."), getFormData('username'))); 201 201 } 202 202 } … … 355 355 // Delete the record. 356 356 $db->query("DELETE FROM admin_tbl WHERE admin_id = '" . $db->escapeString($id) . "'"); 357 $app->raiseMsg(sprintf(_("The admin < strong>%s</strong> has been deleted."), $name), MSG_SUCCESS, __FILE__, __LINE__);357 $app->raiseMsg(sprintf(_("The admin <em>%s</em> has been deleted."), $name), MSG_SUCCESS, __FILE__, __LINE__); 358 358 } 359 359 … … 401 401 $version->create('admin_tbl', 'admin_id', $last_insert_id, $frm['username']); 402 402 403 $app->raiseMsg(sprintf(_("The Admin < strong>%s</strong> has been added."), $frm['username']), MSG_SUCCESS, __FILE__, __LINE__);403 $app->raiseMsg(sprintf(_("The Admin <em>%s</em> has been added."), $frm['username']), MSG_SUCCESS, __FILE__, __LINE__); 404 404 405 405 return $last_insert_id; … … 444 444 $version->create('admin_tbl', 'admin_id', $frm['admin_id'], $frm['username']); 445 445 446 $app->raiseMsg(sprintf(_("The Admin < strong>%s</strong> has been updated."), $frm['username']), MSG_SUCCESS, __FILE__, __LINE__);446 $app->raiseMsg(sprintf(_("The Admin <em>%s</em> has been updated."), $frm['username']), MSG_SUCCESS, __FILE__, __LINE__); 447 447 448 448 // Unlock record. -
trunk/services/lock.php
r137 r141 33 33 if (getFormData('unlock', false)) { 34 34 $lock->remove(); 35 $app->raiseMsg(sprintf(_("The record < strong>%s</strong> has been unlocked, and can now be modified."), $lock->getTitle('title')), MSG_NOTICE, __FILE__, __LINE__);35 $app->raiseMsg(sprintf(_("The record <em>%s</em> has been unlocked, and can now be modified."), $lock->getTitle('title')), MSG_NOTICE, __FILE__, __LINE__); 36 36 $app->dieBoomerangURL('lock'); 37 37 } else if (getFormData('cancel', false)) { -
trunk/services/password.php
r136 r141 50 50 if (!$fv->anyErrors() && false === $auth->authenticate($auth->getVal('username'), $frm['oldpassword'])) { 51 51 $fv->addError('oldpassword', _("Your <strong>Old password</strong> failed authentication.")); 52 $app->logMsg(sprintf( _("Password change failed for %s, using (md5ed) password: %s"), $auth->getVal('username'), md5($frm['oldpassword'])), LOG_NOTICE, __FILE__, __LINE__);52 $app->logMsg(sprintf('Password change failed for %s, using (md5ed) password: %s', $auth->getVal('username'), md5($frm['oldpassword'])), LOG_NOTICE, __FILE__, __LINE__); 53 53 } 54 54 55 55 if (!$fv->anyErrors()) { 56 56 $auth->setPassword(null, $frm['newpassword']); 57 $app->logMsg(sprintf( _("Password change successful for %s"), $auth->getVal('username')), LOG_INFO, __FILE__, __LINE__);57 $app->logMsg(sprintf('Password change successful for %s', $auth->getVal('username')), LOG_INFO, __FILE__, __LINE__); 58 58 $app->raiseMsg(sprintf(_("Password change successful for %s"), $auth->getVal('username')), MSG_SUCCESS, __FILE__, __LINE__); 59 59 $app->dieBoomerangURL('admin_password'); -
trunk/services/templates/lock.ihtml
r137 r141 9 9 10 10 <p><?php 11 printf(_("The record <strong>%s</strong> is currently being edited by <strong>%s</strong>(%d minutes elapsed). You cannot modify the record while it is locked by another user."),11 printf(_("The record %s is currently being edited by %s (%d minutes elapsed). You cannot modify the record while it is locked by another user."), 12 12 $lock->getTitle(), 13 13 $lock->getEditor(), -
trunk/services/versions.php
r137 r141 68 68 $current = $version->getCurrent($record_table, $record_key, $record_val); 69 69 if (serialize($data) == serialize($current)) { 70 $app->raiseMsg(sprintf(_("Version < strong>%s</strong> is identical to the current record"), $version_id), MSG_NOTICE, __FILE__, __LINE__);70 $app->raiseMsg(sprintf(_("Version <em>%s</em> is identical to the current record"), $version_id), MSG_NOTICE, __FILE__, __LINE__); 71 71 } 72 72 $nav->addPage(sprintf(_("Difference between version %s (%s) and current record."), $version_id, $versionrecord['version_datetime'])); … … 86 86 // Create version of this restored record as the "current" version. 87 87 $version->create($record_table, $record_key, $record_val, $v['version_title']); 88 $app->raiseMsg(sprintf(_("The record < strong>%s</strong> has been replaced with <strong>%s</strong> version <strong>%s</strong> from <strong>%s</strong>."), getFormData('version_title'), $v['version_title'], $version_id, $v['version_datetime']), MSG_SUCCESS, __FILE__, __LINE__);88 $app->raiseMsg(sprintf(_("The record <em>%s</em> has been replaced with <em>%s</em> version <em>%s</em> from <em>%s</em>."), getFormData('version_title'), $v['version_title'], $version_id, $v['version_datetime']), MSG_SUCCESS, __FILE__, __LINE__); 89 89 $app->dieBoomerangURL('versions', array('break_list_cache'=>'true', false)); 90 90 } else {
Note: See TracChangeset
for help on using the changeset viewer.