diff options
author | Andreas Gohr <andi@splitbrain.org> | 2008-12-01 22:55:39 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2008-12-01 22:55:39 +0100 |
commit | 4ceab83fd024405dfa43e10241bb9a9f7fee5bf5 (patch) | |
tree | ae76ea4ea79982aaed8e2dc251d8fd917e523b39 /inc/actions.php | |
parent | 137ce95a340b36e962f90c44c9f6414dc2e0d1e4 (diff) | |
download | rpg-4ceab83fd024405dfa43e10241bb9a9f7fee5bf5.tar.gz rpg-4ceab83fd024405dfa43e10241bb9a9f7fee5bf5.tar.bz2 |
Better creation of section IDs FS#1536
This patch enhances the creation of section IDs for number only headlines. It
also moves section ID creation to a function in pageutils.php removing some
duplicate functionality in inc/action.php
darcs-hash:20081201215539-7ad00-48f3c153a2c126d9fb06aa90e4f1b857f76ebec7.gz
Diffstat (limited to 'inc/actions.php')
-rw-r--r-- | inc/actions.php | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/inc/actions.php b/inc/actions.php index 8da6c47cc..62b39efc2 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -340,11 +340,7 @@ function act_redirect($id,$preact){ //get section name when coming from section edit if($PRE && preg_match('/^\s*==+([^=\n]+)/',$TEXT,$match)){ - #FIXME duplicates code from xhtml renderer - $title = $match[0]; - $title = str_replace(':','',cleanID($title)); - $title = ltrim($title,'0123456789._-'); - if(empty($title)) $title='section'; + $title = sectionID($match[0]); } $opts = array( |