"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/handler/page/new.php" between
wacko.6.1.18.zip and wacko.6.1.19.zip

About: WackoWiki is a multilingual Wiki-engine that supports WYTIWYG-editing, page rights (ACLs), design themes (skins), file upload, email notification and much more.

new.php  (wacko.6.1.18):new.php  (wacko.6.1.19)
skipping to change at line 32 skipping to change at line 32
$title = $new_tag; $title = $new_tag;
// uppercase the first character of each word only when there are multipl e words seperate by spaces // uppercase the first character of each word only when there are multipl e words seperate by spaces
if (preg_match('/^\w+( +\w+)*$/u', $new_tag)) if (preg_match('/^\w+( +\w+)*$/u', $new_tag))
{ {
$new_tag = utf8_ucwords($new_tag); $new_tag = utf8_ucwords($new_tag);
} }
$this->sanitize_page_tag($new_tag); $this->sanitize_page_tag($new_tag);
if (!preg_match('/^([' . $this->lang['TAG_P'] . ']+)$/u', $new_tag)) if (!preg_match('/^([' . self::PATTERN['TAG_P'] . ']+)$/u', $new_tag))
{ {
$this->set_message($this->_t('InvalidWikiName')); $this->set_message($this->_t('InvalidWikiName'));
} }
// check reserved word // check reserved word
else if ($result = $this->validate_reserved_words($new_tag)) else if ($result = $this->validate_reserved_words($new_tag))
{ {
$this->set_message(Ut::perc_replace($this->_t('PageReservedWord') , '<code>' . $result . '</code>')); $this->set_message(Ut::perc_replace($this->_t('PageReservedWord') , '<code>' . $result . '</code>'));
} }
// check target page existence // check target page existence
else if ($page = $this->load_page($prefix . $new_tag, 0, null, LOAD_CACHE , LOAD_META)) else if ($page = $this->load_page($prefix . $new_tag, 0, null, LOAD_CACHE , LOAD_META))
skipping to change at line 85 skipping to change at line 85
} }
} }
// create a sub-page // create a sub-page
if ($this->has_access('create', $this->get_page_id($this->tag))) if ($this->has_access('create', $this->get_page_id($this->tag)))
{ {
if ($this->tag != $this->db->root_page) if ($this->tag != $this->db->root_page)
{ {
$tpl->p_f_base = (mb_strlen($this->tag) > 50 ? '...' . m b_substr($this->tag, -50) : $this->tag); $tpl->p_f_base = (mb_strlen($this->tag) > 50 ? '...' . m b_substr($this->tag, -50) : $this->tag);
$tpl->p_f_tag = ($option === 1 ? $new_tag : ''); $tpl->p_f_tag = ($option === 1 ? $new_tag : '');
#$tpl->p_f_pattern = $this->lang['TAG'] . '+'; #$tpl->p_f_pattern = self::PATTERN['TAG'] . '+';
} }
else else
{ {
$tpl->p = true; // Why does it fail without it? $tpl->p = true; // Why does it fail without it?
// TODO: show message // TODO: show message
// users adding sub pages to HomePage/subpage, possible but proba bly misguided and on the wrong path // users adding sub pages to HomePage/subpage, possible but proba bly misguided and on the wrong path
} }
} }
else else
{ {
skipping to change at line 112 skipping to change at line 112
{ {
$parent = mb_substr($this->tag, 0, mb_strrpos($th is->tag, '/')); $parent = mb_substr($this->tag, 0, mb_strrpos($th is->tag, '/'));
if ($this->has_access('create', $this->get_page_id($parent))) if ($this->has_access('create', $this->get_page_id($parent)))
{ {
// hide users cluster // hide users cluster
if ($parent != $this->db->users_page) if ($parent != $this->db->users_page)
{ {
$tpl->c_f_base = (mb_strlen($parent) > 50 ? '... ' . mb_substr($parent, -50) : $parent); $tpl->c_f_base = (mb_strlen($parent) > 50 ? '... ' . mb_substr($parent, -50) : $parent);
$tpl->c_f_tag = ($option === 2 ? $new_tag : '') ; $tpl->c_f_tag = ($option === 2 ? $new_tag : '') ;
#$tpl->c_f_pattern = $this->lang['TAG'] . '+'; #$tpl->c_f_pattern = self::PATTERN['TAG'] . '+';
} }
} }
else else
{ {
$message = $this->_t('CreatePageDenied'); $message = $this->_t('CreatePageDenied');
$tpl->c_d_message = $this->show_message($message, 'note', f alse); $tpl->c_d_message = $this->show_message($message, 'note', f alse);
} }
} }
// create a random page // create a random page
$tpl->tag = ($option === 3 ? $new_tag : ''); $tpl->tag = ($option === 3 ? $new_tag : '');
#$tpl->pattern = $this->lang['TAG'] . '+'; #$tpl->pattern = self::PATTERN['TAG'] . '+';
 End of changes. 4 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)