Skip to content
Snippets Groups Projects
Commit b0e6e37d authored by Jared Hancock's avatar Jared Hancock
Browse files

Merge pull request #2735 from flotwig/develop


Patch so that topicId can be specified in $_GET

Reviewed-By: default avatarJared Hancock <jared@osticket.com>
parents bdd6789d d602477c
No related branches found
No related tags found
No related merge requests found
......@@ -10,8 +10,12 @@ if($thisclient && $thisclient->isValid()) {
$info=($_POST && $errors)?Format::htmlchars($_POST):$info;
$form = null;
if (!$info['topicId'])
$info['topicId'] = $cfg->getDefaultTopicId();
if (!$info['topicId']) {
if (array_key_exists('topicId',$_GET) && preg_match('/^\d+$/',$_GET['topicId']) && Topic::lookup($_GET['topicId']))
$info['topicId'] = intval($_GET['topicId']);
else
$info['topicId'] = $cfg->getDefaultTopicId();
}
if ($info['topicId'] && ($topic=Topic::lookup($info['topicId']))) {
$form = $topic->getForm();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment