aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Include/myFunctions.php
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application/Include/myFunctions.php')
-rw-r--r--h-source/Application/Include/myFunctions.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php
index 0f87893..d494eb6 100644
--- a/h-source/Application/Include/myFunctions.php
+++ b/h-source/Application/Include/myFunctions.php
@@ -444,6 +444,15 @@ function getHardwareInfoFromTalkId($id = 0)
return $res[0]['hardware'];
}
+//get the wiki page info from the talk id
+function getWikiPageInfoFromTalkId($id = 0)
+{
+ $clean['id'] = (int)$id;
+ $talk = new WikitalkModel();
+ $res = $talk->select('wiki.id_wiki')->from('wiki inner join wiki_talk')->using('id_wiki')->where(array('id_talk'=>$clean['id']))->send();
+ return $res[0]['wiki']['id_wiki'];
+}
+
//get the issue info from the message id
function getIssueNumberFromMessageId($id = 0)
{
@@ -465,7 +474,7 @@ function goToModeratedItem( $row = array() )
break;
case 'talk':
$hardInfo = getHardwareInfoFromTalkId($row['id']);
- $controller = MyStrings::$reverse[$hardInfo['type']];
+ $controller = Hardware::$typeToController[$hardInfo['type']];
$url = $controller.'/talk/'.Lang::$current.'/'.$hardInfo['id_hard'].'#talk-'.$row['id'];
break;
case 'user':
@@ -474,6 +483,10 @@ function goToModeratedItem( $row = array() )
case 'issue':
$url = 'issues/view/'.Lang::$current.'/'.$row['id'];
break;
+ case 'wiki_talk':
+ $url = 'wiki/talk/'.Lang::$current.'/'.getWikiPageInfoFromTalkId($row['id']).'#wiki-talk-'.$row['id'];
+ break;
+
}
return 'http://'.DOMAIN_NAME.'/'.$url;
}