Changeset 1588
- Timestamp:
- 05/13/08 09:07:28 (2 months ago)
- Files:
-
- devel/mod/pages/lib/pages.inc.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/mod/pages/lib/pages.inc.php
r1539 r1588 52 52 } else { 53 53 // update current record uri 54 $page->uri = pages_build_uri($page->name); 54 if (empty($page->uri)) { 55 $page->uri = pages_build_uri($page->name); 56 } 55 57 56 58 if (empty($page->uri)) { … … 64 66 } else { 65 67 // new uri 66 $page->uri = pages_build_uri($page->name); 68 if (empty($page->uri)) { 69 $page->uri = pages_build_uri($page->name); 70 } 67 71 68 72 if (empty($page->uri)) { … … 168 172 $parent = optional_param('menu-parent', 0, PARAM_INT); 169 173 $weight = optional_param('menu-weight', 0, PARAM_INT); 174 $uri = str_replace(' ', '', trim(optional_param('page-uri'))); 170 175 $access = optional_param('page-access'); 171 176 … … 222 227 $page->weight = !isset($page->weight) ? $weight : $page->weight; 223 228 $page->access = !isset($page->access) ? $CFG->default_access : $page->access; 229 230 if (!empty($uri)) { 231 $page->uri = $uri; 232 } 224 233 225 234 //workaround … … 529 538 } 530 539 540 $input_uri = pages_html_wrap('label', __gettext('URI:'), array('for' => 'page-uri')); 541 $input_uri .= pages_html_input('text', array('name' => 'page-uri', 'value' => $page->uri)); 542 $input_uri .= pages_html_wrap('span', __gettext('Optional')); 543 531 544 // help 532 545 $form_help = __gettext('You can use {{page}} keyword to link to others pages.'); … … 583 596 $content .= pages_html_wrap('div', $input_parent . $input_weight, array('class' => 'form-item')); 584 597 $content .= pages_html_wrap('div', $input_access, array('class' => 'form-item')); 598 $content .= pages_html_wrap('div', $input_uri, array('class' => 'form-item')); 585 599 $content .= pages_html_wrap('div', $input_buttons, array('class' => 'form-item form-button')); 586 600
