Adds cidReq in links.

1.9.x
Julio Montoya 10 years ago
parent 448c456cca
commit 9788fba0e2
  1. 12
      main/wiki/wiki.inc.php

@ -46,7 +46,6 @@ class Wiki
$this->course_id = api_get_course_int_id();
$this->group_id = api_get_group_id();
if (!empty($this->group_id)) {
$this->groupfilter = ' group_id="'.$this->group_id.'"';
}
@ -186,8 +185,10 @@ class Wiki
$irclink='href="irc';
$irclinkStyle='class="wiki_irc_link" href="irc';
$output=str_replace($irclink, $irclinkStyle, $input);
return $output;
}
/**
* This function allows users to have [link to a title]-style links like in most regular wikis.
* It is true that the adding of links is probably the most anoying part of Wiki for the people
@ -704,7 +705,7 @@ class Wiki
}
$wikiData = self::getWikiData();
$redirectUrl = $this->url.'&action=showpage&title='.$wikiData['reflink'];
$redirectUrl = $this->url.'&action=showpage&title='.$wikiData['reflink'].'&'.api_get_cidreq();
header('Location: '.$redirectUrl);
exit;
}
@ -4652,7 +4653,7 @@ class Wiki
}
// Form.
$url = api_get_self().'?action=edit&title='.urlencode($page).'&session_id='.api_get_session_id().'&group_id='.api_get_group_id();
$url = api_get_self().'?action=edit&title='.urlencode($page).'&session_id='.api_get_session_id().'&group_id='.api_get_group_id().'&'.api_get_cidreq();
$form = new FormValidator('wiki', 'post', $url);
$form->addElement('header', $icon_assignment.str_repeat(' ',3).api_htmlentities($title));
self::setForm($form, $row);
@ -4682,7 +4683,7 @@ class Wiki
self::setMessage(Display::display_confirmation_message($return_message, false, true));
}
$wikiData = self::getWikiData();
$redirectUrl = $this->url.'&action=showpage&title='.$wikiData['reflink'];
$redirectUrl = $this->url.'&action=showpage&title='.$wikiData['reflink'].'&'.api_get_cidreq();
header('Location: '.$redirectUrl);
exit;
}
@ -5131,7 +5132,7 @@ class Wiki
public function redirectHome()
{
$redirectUrl = $this->url.'&action=showpage&title=index';
header('Location: '.$redirectUrl);
header('Location: '.$redirectUrl.'&'.api_get_cidreq());
exit;
}
@ -5155,4 +5156,3 @@ class Wiki
return false;
}
}

Loading…
Cancel
Save