- Timestamp:
- Nov 17, 2005 3:00:00 AM (19 years ago)
- Location:
- trunk/bin/module_maker
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/module_maker/form_template.cli.php
r19 r20 65 65 <td class="right"><label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label></td> 66 66 <td valign="top"> 67 <select name="$field" class=" formselect">67 <select name="$field" class="small"> 68 68 <\x3fphp printSelectForm('<##>_tbl', "CONCAT(<##>_id, '—', <##>)", '$field', \$frm['$field'], true, 'ORDER BY $field DESC'); \x3f> 69 69 </select> … … 75 75 76 76 // File upload. 77 if (preg_match('/file /i', $field)) {78 $output[$field] = <<<E_O_F 79 <tr> 80 <td class="right"><label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label></td> 81 <td valign="top"> 82 <input type="file" name="$field" value="<\x3fphp echo \$_FILES['$field']['name']; \x3f>"/>83 <\x3fphp if ( getFormData('op') == 'edit' || getFormData('op') == 'update') { \x3f>84 <div class="help"><\x3fphp printf(_("The current file < strong>%s</strong> will be overwritten if a new file is selected for upload."), \$frm['$field']) \x3f></div>77 if (preg_match('/file|image/i', $field)) { 78 $output[$field] = <<<E_O_F 79 <tr> 80 <td class="right"><label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label></td> 81 <td valign="top"> 82 <input type="file" name="$field" /> 83 <\x3fphp if ('' != \$upload->getFilenameGlob(getFormData('$primary_key_field') . '_*') && getFormData('op') == 'edit' || getFormData('op') == 'update') { \x3f> 84 <div class="help"><\x3fphp printf(_("The current file <a href=\"%s/%2\$s\"><strong>%2\$s</strong></a> will be deleted if a new file is selected for upload."), '/_db_files/<##>', \$upload->getFilenameGlob(getFormData('$primary_key_field') . '_*')) \x3f></div> 85 85 <\x3fphp } \x3f> 86 <div class="help"><\x3fphp printf(_("File to upload must have one of the following file-name extensions: %s."), join(', ', \$upload-> valid_file_extensions)) \x3f></div>86 <div class="help"><\x3fphp printf(_("File to upload must have one of the following file-name extensions: %s."), join(', ', \$upload->getParam('valid_file_extensions'))) \x3f></div> 87 87 </td> 88 88 </tr> … … 97 97 <td class="right"><label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label></td> 98 98 <td valign="top"> 99 <input type="password" class=" forminputtext" size="50" name="$field" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>">99 <input type="password" class="medium" size="50" name="$field" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>" /> 100 100 </td> 101 101 </tr> … … 138 138 <td> </td> 139 139 <td> 140 <input type="checkbox" name="$field" <\x3fphp frmChecked(!empty(\$frm['$field'])) \x3f> ><label><\x3fphp echo _("$title"); \x3f></label>140 <input type="checkbox" name="$field" <\x3fphp frmChecked(!empty(\$frm['$field'])) \x3f> /><label><\x3fphp echo _("$title"); \x3f></label> 141 141 </td> 142 142 </tr> … … 157 157 <td class="right"><label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label></td> 158 158 <td valign="top"> 159 <textarea class=" text" cols="75" rows="4" name="$field"><\x3fphp echo oTxt(\$frm['$field']); \x3f></textarea>159 <textarea class="large" cols="75" rows="4" name="$field"><\x3fphp echo oTxt(\$frm['$field']); \x3f></textarea> 160 160 </td> 161 161 </tr> … … 196 196 <td class="right"><label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label></td> 197 197 <td valign="top"> 198 <input type="text" class=" text" size="50" name="$field" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>">198 <input type="text" class="medium" size="50" name="$field" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>" /> 199 199 </td> 200 200 </tr> -
trunk/bin/module_maker/list_template.cli.php
r19 r20 112 112 <br /> 113 113 114 <input type="text" class=" forminputtext" size="20" name="search_query" value="<\x3fphp echo getFormData('search_query'); \x3f>" title="<\x3fphp echo oTxt(_("Fields searched: <##>.")); \x3f>" />114 <input type="text" class="small" size="20" name="search_query" value="<\x3fphp echo getFormData('search_query'); \x3f>" title="<\x3fphp echo oTxt(_("Fields searched: <##>.")); \x3f>" /> 115 115 <select name="filter_<##>"> 116 116 <\x3fphp // printSelectForm('<##>_tbl', "CONCAT(<##>_id, '—', city, '—', title)", '<##>_id', getFormData('filter_<##>'), array('Any <##>'), 'ORDER BY <##> ASC'); \x3f> -
trunk/bin/module_maker/module.cli.php
r19 r20 56 56 57 57 // Names 58 $module_title = ucwords( $module_name_plural);59 $item_title = ucwords( $module_name_singular);60 $module_name_upper = strtoupper( $module_name_plural);58 $module_title = ucwords(str_replace('_', ' ', $module_name_plural)); 59 $item_title = ucwords(str_replace('_', ' ', $module_name_singular)); 60 $module_name_upper = strtoupper(str_replace('_', ' ', $module_name_plural)); 61 61 62 62 // Admin files … … 76 76 // Only after we've defined essential files can we clean. 77 77 if ('clean' == $op) { 78 cleanFiles(); 78 echo "Beginning file cleanup\n"; 79 trashFile("$admin_dir/$admin_script"); 80 trashFile("$admin_tpl_dir/$admin_list_template"); 81 trashFile("$admin_tpl_dir/$admin_form_template"); 82 trashFile("$public_dir/$public_script"); 83 trashFile("$public_tpl_dir/$public_list_template"); 84 trashFile("$public_tpl_dir/$public_detail_template"); 85 echo "End file cleanup\n"; 79 86 die; 80 87 } … … 140 147 141 148 // Loop through columns 142 $ multipart_form_required= false;149 $upload_file_capability = false; 143 150 $headers = array(); 144 151 $public_list_page_vars = array(); … … 160 167 161 168 // Our form will require type="multipart/form-data". 162 if (preg_match('/file /i', $field)) {163 $ multipart_form_required= true;169 if (preg_match('/file|image/i', $field)) { 170 $upload_file_capability = true; 164 171 } 165 172 … … 184 191 185 192 186 // -------------VARS------------- 193 // Search-replace variables ---------------------------------- 194 195 // Admin script file upload replacement routines... 196 197 $search['admin_form_tag_init'] = '/%ADMIN_FORM_TAG_INIT%/'; 198 $replace['admin_form_tag_init'] = "<form method=\"post\" action=\"<\x3fphp echo \$_SERVER['PHP_SELF']; \x3f>\">"; 199 $search['admin_upload_include'] = '/%ADMIN_UPLOAD_INCLUDE%/'; 200 $replace['admin_upload_include'] = ''; 201 $search['admin_upload_config'] = '/%ADMIN_UPLOAD_CONFIG%/'; 202 $replace['admin_upload_config'] = ''; 203 $search['admin_upload_init'] = '/%ADMIN_UPLOAD_INIT%/'; 204 $replace['admin_upload_init'] = ''; 205 $search['admin_upload_del'] = '/%ADMIN_UPLOAD_DEL%/'; 206 $replace['admin_upload_del'] = ''; 207 $search['admin_upload_insert'] = '/%ADMIN_UPLOAD_INSERT%/'; 208 $replace['admin_upload_insert'] = ''; 209 $search['admin_upload_insert2'] = '/%ADMIN_UPLOAD_INSERT2%/'; 210 $replace['admin_upload_insert2'] = ''; 211 $search['admin_upload_update'] = '/%ADMIN_UPLOAD_UPDATE%/'; 212 $replace['admin_upload_update'] = ''; 213 214 if ($upload_file_capability) { 215 $replace['admin_form_tag_init'] = "<form enctype=\"multipart/form-data\" method=\"post\" action=\"<\x3fphp echo \$_SERVER['PHP_SELF']; \x3f>\">\n<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"<##>\" />"; 216 217 $replace['admin_upload_include'] = "require_once 'codebase/lib/Upload.inc.php';\n"; 218 219 $replace['admin_upload_config'] = <<<E_O_F 220 221 // This module has file upload capability. 222 \$upload = new Upload(); 223 \$upload->setParam(array( 224 'upload_path' => COMMON_BASE . '/html/_db_files/<##>', 225 'dest_file_perms' => 0666, 226 'allow_overwriting' => false, 227 'valid_file_extensions' => array('jpg', 'gif', 'png', 'jpeg'), 228 )); 229 230 E_O_F; 231 232 $replace['admin_upload_init'] = <<<E_O_F 233 234 // Copy uploaded image name into form data. 235 \$_POST['<##>'] = isset(\$_FILES['<##>']) ? \$_FILES['<##>']['name'] : ''; 236 237 238 E_O_F; 239 240 $replace['admin_upload_del'] = <<<E_O_F 241 242 // Delete file. 243 if ('' != \$upload->getFilenameGlob(getFormData('%PRIMARY_KEY%') . '_*')) { 244 \$upload->deleteFile(\$upload->getFilenameGlob(getFormData('%PRIMARY_KEY%') . '_*')); 245 } 246 E_O_F; 247 248 $replace['admin_upload_insert'] = <<<E_O_F 249 250 // Upload file. 251 if (!\$new_files = \$upload->process('<##>')) { 252 // Upload failed. Reload form, displaying errors. 253 \$frm =& addRecordForm(); 254 \$frm = array_merge(\$frm, getFormData()); 255 \$nav->addPage(_("Add %ITEM_TITLE%")); 256 \$main_template = '%ADMIN_FORM_TEMPLATE%'; 257 break; 258 } 259 E_O_F; 260 261 $replace['admin_upload_insert2'] = <<<E_O_F 262 263 // Record inserted successfuly. Now we know the primary key, prepend to filename. 264 \$upload->moveFile(\$new_files[0]['name'], \$%PRIMARY_KEY% . '_' . \$new_files[0]['name']); 265 E_O_F; 266 267 $replace['admin_upload_update'] = <<<E_O_F 268 269 // Upload new file. 270 if (getFormData('<##>')) { 271 if (\$upload->process('<##>', getFormData('%PRIMARY_KEY%') . '_' . getFormData('<##>'))) { 272 // Upload success. Delete old file. 273 if ('' != \$upload->getFilenameGlob(getFormData('%PRIMARY_KEY%') . '_*')) { 274 \$upload->deleteFile(\$upload->getFilenameGlob(getFormData('%PRIMARY_KEY%') . '_*')); 275 } 276 } else { 277 // Upload failed. Reload form, displaying errors. 278 \$frm =& editRecordForm(getFormData('%PRIMARY_KEY%')); 279 \$frm = array_merge(\$frm, getFormData()); 280 \$nav->addPage(_("Edit %ITEM_TITLE%")); 281 \$main_template = '%ADMIN_FORM_TEMPLATE%'; 282 break; 283 } 284 } 285 E_O_F; 286 } // End if. 287 187 288 188 289 // Simple... … … 242 343 $replace['search_fields'] = join(", ", $headers); 243 344 244 $search['admin_form_tag_init'] = '/%ADMIN_FORM_TAG_INIT%/';245 if ($multipart_form_required) {246 $replace['admin_form_tag_init'] = "<form enctype=\"multipart/form-data\" method=\"post\" action=\"<\x3fphp echo \$_SERVER['PHP_SELF']; \x3f>\">\n<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"12000000\">";247 } else {248 $replace['admin_form_tag_init'] = "<form method=\"post\" action=\"<\x3fphp echo \$_SERVER['PHP_SELF']; \x3f>\">";249 }250 345 251 346 … … 419 514 *****************************************************************************/ 420 515 421 /** 422 * Removes existing modules files. Danger! 423 */ 424 function cleanFiles() 516 function trashFile($file_path_name) 425 517 { 426 518 global $user_trash_folder; 427 global $admin_dir; 428 global $admin_script; 429 global $admin_tpl_dir; 430 global $admin_list_template; 431 global $admin_form_template; 432 global $public_dir; 433 global $public_script; 434 global $public_tpl_dir; 435 global $public_detail_template; 436 global $public_list_template; 519 static $file_prefix; 437 520 438 echo "Beginning file cleanup\n"; 439 521 if (!isset($file_prefix)) { 522 $file_prefix = time(); 523 } else { 524 $file_prefix++; 525 } 526 527 // Make user trash folder. 440 528 if (!dir($user_trash_folder)) { 441 529 mkdir($user_trash_folder); … … 447 535 } 448 536 449 if (file_exists("$admin_dir/$admin_script")) { 450 rename("$admin_dir/$admin_script", "$user_trash_folder/$admin_script" . '_' . md5(microtime())); 451 printf("Moved to trash: %s\n", "$admin_dir/$admin_script"); 537 // Move file to trash. 538 if (file_exists($file_path_name)) { 539 rename($file_path_name, sprintf('%s/%s_%s', $user_trash_folder, $file_prefix, basename($file_path_name))); 540 printf("Moved to trash: %s -> %s\n", $file_path_name, sprintf('%s/%s_%s', $user_trash_folder, $file_prefix, basename($file_path_name))); 452 541 } else { 453 printf("File not found: %s\n", "$admin_dir/$admin_script"); 454 } 455 456 if (file_exists("$admin_tpl_dir/$admin_list_template")) { 457 rename("$admin_tpl_dir/$admin_list_template", "$user_trash_folder/$admin_list_template" . '_' . md5(microtime())); 458 printf("Moved to trash: %s\n", "$admin_tpl_dir/$admin_list_template"); 459 } else { 460 printf("File not found: %s\n", "$admin_tpl_dir/$admin_list_template"); 461 } 462 463 if (file_exists("$admin_tpl_dir/$admin_form_template")) { 464 rename("$admin_tpl_dir/$admin_form_template", "$user_trash_folder/$admin_form_template" . '_' . md5(microtime())); 465 printf("Moved to trash: %s\n", "$admin_tpl_dir/$admin_form_template"); 466 } else { 467 printf("File not found: %s\n", "$admin_tpl_dir/$admin_form_template"); 468 } 469 470 if (file_exists("$public_dir/$public_script")) { 471 rename("$public_dir/$public_script", "$user_trash_folder/$public_script" . '_' . md5(microtime())); 472 printf("Moved to trash: %s\n", "$public_dir/$public_script"); 473 } else { 474 printf("File not found: %s\n", "$public_dir/$public_script"); 475 } 476 477 if (file_exists("$public_tpl_dir/$public_list_template")) { 478 rename("$public_tpl_dir/$public_list_template", "$user_trash_folder/$public_list_template" . '_' . md5(microtime())); 479 printf("Moved to trash: %s\n", "$public_tpl_dir/$public_list_template"); 480 } else { 481 printf("File not found: %s\n", "$public_tpl_dir/$public_list_template"); 482 } 483 484 if (file_exists("$public_tpl_dir/$public_detail_template")) { 485 rename("$public_tpl_dir/$public_detail_template", "$user_trash_folder/$public_detail_template" . '_' . md5(microtime())); 486 printf("Moved to trash: %s\n", "$public_tpl_dir/$public_detail_template"); 487 } else { 488 printf("File not found: %s\n", "$public_tpl_dir/$public_detail_template"); 489 } 490 491 echo "End file cleanup\n"; 542 printf("File not found: %s\n", $file_path_name); 543 } 492 544 } 493 545 -
trunk/bin/module_maker/skel/adm_form.ihtml
r19 r20 3 3 %ADMIN_FORM_TAG_INIT% 4 4 <?php App::printHiddenSession(); ?> 5 <input type="hidden" name="op" value="<?php echo $frm['new_op']; ?>" >6 <input type="hidden" name="%PRIMARY_KEY%" value="<?php echo $frm['%PRIMARY_KEY%']; ?>" >5 <input type="hidden" name="op" value="<?php echo $frm['new_op']; ?>" /> 6 <input type="hidden" name="%PRIMARY_KEY%" value="<?php echo $frm['%PRIMARY_KEY%']; ?>" /> 7 7 8 8 <table> -
trunk/bin/module_maker/skel/adm_list.ihtml
r19 r20 1 1 2 2 <?php $fv->printErrorMessages(); ?> 3 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method=" post">3 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get"> 4 4 <?php App::printHiddenSession(false); ?> 5 5 … … 8 8 <br /> 9 9 10 <input type="text" class=" forminputtext" size="20" name="search_query" value="<?php echo getFormData('search_query'); ?>" title="<?php echo oTxt(_("Fields searched:%SEARCH_FIELDS%.")); ?>" />10 <input type="text" class="small" size="20" name="search_query" value="<?php echo getFormData('search_query'); ?>" title="<?php echo oTxt(_("Fields searched: <##> %SEARCH_FIELDS%.")); ?>" /> 11 11 <select name="filter_<##>"> 12 12 <?php // printSelectForm('<##>_tbl', "CONCAT(<##>_id, '—', city, '—', title)", '<##>_id', getFormData('filter_<##>'), array('Any <##>'), 'ORDER BY <##> ASC'); ?> … … 14 14 <input type="submit" name="list" value="<?php echo _("Search"); ?>" /> 15 15 </div> 16 </form> 16 17 18 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> 19 <?php App::printHiddenSession(); ?> 17 20 <?php include 'list_info.ihtml'; ?> 18 19 21 <table class="list"> 20 22 <tr> … … 26 28 <?php for ($i = 0; $i <= $page->last_item - $page->first_item && $page->total_items > 0; $i++) { ?> 27 29 <tr> 28 <td class="padleft nowrap"><a title="<?php printf(_("Edit %s"), oTxt($list[$i][' ______RECORD_NAME______'])) ?>" href="<?php echo App::oHREF($_SERVER['PHP_SELF'] . '?op=edit&%PRIMARY_KEY%=' . $list[$i]['%PRIMARY_KEY%']); ?>"><img src="/admin/_widgets/edit.gif" alt="Edit" width="14" height="18" border="0"></a> </td>29 <td class="padleft nowrap"><a title="<?php printf(_("Versions of %s"), oTxt($list[$i][' ______RECORD_NAME______'])) ?>" href="<?php echo App::oHREF('/admin/versions.php?record_table=%DB_TBL%&record_key=%PRIMARY_KEY%&boomerang=true&record_val=' . $list[$i]['%PRIMARY_KEY%']); ?>"><img src="/admin/_widgets/subcategory.gif" alt="" width="18" height="14" border="0" /></a> </td>30 <td class="padleft nowrap"><a title="<?php printf(_("Edit %s"), oTxt($list[$i]['<##>'])) ?>" href="<?php echo App::oHREF($_SERVER['PHP_SELF'] . '?op=edit&%PRIMARY_KEY%=' . $list[$i]['%PRIMARY_KEY%']); ?>"><img src="/admin/_widgets/edit.gif" alt="Edit" width="14" height="18" border="0"></a> </td> 31 <td class="padleft nowrap"><a title="<?php printf(_("Versions of %s"), oTxt($list[$i]['<##>'])) ?>" href="<?php echo App::oHREF('/admin/versions.php?record_table=%DB_TBL%&record_key=%PRIMARY_KEY%&boomerang=true&record_val=' . $list[$i]['%PRIMARY_KEY%']); ?>"><img src="/admin/_widgets/subcategory.gif" alt="" width="18" height="14" border="0" /></a> </td> 30 32 %ADM_LIST_ROWS% 31 <td class="padleft nowrap" align="right"><a title="<?php printf(_("Delete %s"), oTxt($list[$i][' ______RECORD_NAME______'])) ?>" href="<?php echo App::oHREF($_SERVER['PHP_SELF'] . "?op=del&%PRIMARY_KEY%=" . $list[$i]['%PRIMARY_KEY%']); ?>" onClick="javascript:return confirm('<?php printf(_("Are you sure you want to delete the record %s? This action is permanent and cannot be undone."), oTxt($list[$i]['______RECORD_NAME______'])) ?>')"><img src="/admin/_widgets/delete.gif" alt="Delete" width="16" height="17" border="0"></a> </td>33 <td class="padleft nowrap" align="right"><a title="<?php printf(_("Delete %s"), oTxt($list[$i]['<##>'])) ?>" href="<?php echo App::oHREF($_SERVER['PHP_SELF'] . "?op=del&%PRIMARY_KEY%=" . $list[$i]['%PRIMARY_KEY%']); ?>" onClick="javascript:return confirm('<?php printf(_("Are you sure you want to delete the record %s? This action is permanent and cannot be undone."), oTxt($list[$i]['<##>'])) ?>')"><img src="/admin/_widgets/delete.gif" alt="Delete" width="16" height="17" border="0"></a> </td> 32 34 </tr> 33 35 <?php } ?> -
trunk/bin/module_maker/skel/admin.php
r19 r20 21 21 require_once 'codebase/lib/RecordLock.inc.php'; 22 22 require_once 'codebase/lib/RecordVersion.inc.php'; 23 23 %ADMIN_UPLOAD_INCLUDE% 24 24 25 25 /****************************************************************************** … … 40 40 $page->setPageNumber(getFormData('page_number')); 41 41 42 // Search limiters retain their values between page requests. 43 App::carryQuery('search_query'); 44 App::carryQuery('filter_<##>'); 45 %ADMIN_UPLOAD_CONFIG% 42 46 /****************************************************************************** 43 47 * MAIN 44 48 *****************************************************************************/ 45 49 %ADMIN_UPLOAD_INIT% 46 50 // We may want to use the add/edit interface from another script, so this 47 51 // allows us to remember which page we came from so we can go back there. 48 if (getFormData('boomerang', false) ) {52 if (getFormData('boomerang', false) && isset($_SERVER['HTTP_REFERER'])) { 49 53 App::setBoomerangURL($_SERVER['HTTP_REFERER'], '%NAME_PLURAL%'); 50 54 } … … 76 80 case 'del' : 77 81 // $auth->requireAccessClearance(ZONE_ADMIN_%NAME_UPPER%_FUNC_DELETE); 78 deleteRecord(getFormData('%PRIMARY_KEY%')); 82 deleteRecord(getFormData('%PRIMARY_KEY%'));%ADMIN_UPLOAD_DEL% 79 83 if (App::validBoomerangURL('%NAME_PLURAL%')) { 80 84 // Display boomerang page. … … 96 100 $nav->addPage(_("Add %ITEM_TITLE%")); 97 101 $main_template = '%ADMIN_FORM_TEMPLATE%'; 98 } else { 99 $%PRIMARY_KEY% = insertRecord(getFormData()); 102 } else {%ADMIN_UPLOAD_INSERT% 103 $%PRIMARY_KEY% = insertRecord(getFormData());%ADMIN_UPLOAD_INSERT2% 100 104 if (getFormdata('repeat', false)) { 101 105 // Display function again. … … 134 138 $nav->addPage(_("Edit %ITEM_TITLE%")); 135 139 $main_template = '%ADMIN_FORM_TEMPLATE%'; 136 } else { 140 } else {%ADMIN_UPLOAD_UPDATE% 137 141 updateRecord(getFormData()); 138 142 if (getFormdata('repeat', false)) { … … 277 281 278 282 // Create version. 279 $version = new RecordVersion($GLOBALS['auth']);283 $version = RecordVersion::getInstance($GLOBALS['auth']); 280 284 $version->create('%DB_TBL%', '%PRIMARY_KEY%', $last_insert_id, $frm['<##>']); 281 285 … … 300 304 301 305 // Create version. 302 $version = new RecordVersion($GLOBALS['auth']);306 $version = RecordVersion::getInstance($GLOBALS['auth']); 303 307 $version->create('%DB_TBL%', '%PRIMARY_KEY%', $frm['%PRIMARY_KEY%'], $frm['<##>']); 304 308 … … 403 407 foreach ($ranks as $id => $new_rank) { 404 408 if ('' == trim($new_rank) || !is_numeric($new_rank) || $new_rank > 2147483646) { 405 // Unspecified entries rec ieve a sort order of 1000.406 $new_rank = 1000 ;409 // Unspecified entries receive a sort order of 10000. 410 $new_rank = 10000; 407 411 $unspecified_counter++; 408 412 } … … 416 420 App::raiseMsg(_("Records have been reordered with the new rank."), MSG_SUCCESS, __FILE__, __LINE__); 417 421 if ($unspecified_counter > 0) { 418 App::raiseMsg(sprintf(_("%s items with unspecified ranks were automatically assigned a rank of 1000 ."), $unspecified_counter), MSG_NOTICE, __FILE__, __LINE__);422 App::raiseMsg(sprintf(_("%s items with unspecified ranks were automatically assigned a rank of 10000."), $unspecified_counter), MSG_NOTICE, __FILE__, __LINE__); 419 423 } 420 424 }
Note: See TracChangeset
for help on using the changeset viewer.