aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Include
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application/Include')
-rw-r--r--h-source/Application/Include/languages.php10
-rw-r--r--h-source/Application/Include/myFunctions.php33
2 files changed, 31 insertions, 12 deletions
diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php
index d8e6502..ee4fdcc 100644
--- a/h-source/Application/Include/languages.php
+++ b/h-source/Application/Include/languages.php
@@ -127,8 +127,7 @@ class Lang
"confirm the password" => "conferma la password",
"write the code above" => "scrivi il codice mostrato sopra",
"write your username" => "scrivi il tuo username",
- "watch all the" => "guarda tutte le",
- "actions carried out by moderators" => "azioni compiute dai moderatori",
+ "Watch all the actions carried out by moderators" => "Guarda tutte le azioni compiute dai moderatori",
"meet" => "conosci",
"Public profile of" => "Profilo pubblico di",
"See all the contributions of" => "Guarda tutti i contributi di ",
@@ -212,6 +211,7 @@ class Lang
"delete the wiki page" => "cancella la pagina",
"list of blocked pages" => "lista delle pagine bloccate",
"special pages" => "pagine speciali",
+ "Watch all the actions carried out by administrators" => "Guarda tutte le azioni compiute dagli amministratori"
),
'es' => array
(
@@ -307,8 +307,7 @@ class Lang
"confirm the password" => "confirme la contraseña",
"write the code above" => "escriba el código mostrado superior",
"write your username" => "escriba su nombre de usuario",
- "watch all the" => "ver todas las",
- "actions carried out by moderators" => "acciones efectuadas por los moderadores",
+ "Watch all the actions carried out by moderators" => "Ver todas las acciones efectuadas por los moderadores",
"meet" => "conoce",
"Public profile of" => "Perfil público de",
"See all the contributions of" => "Ver todas las contribuciones de",
@@ -489,8 +488,7 @@ class Lang
"confirm the password" => "confirmez le mot de passe",
"write the code above" => "écrivez le code si-dessous",
"write your username" => "écrivez votre nom d'utilisateur",
- "watch all the" => "regardez toutes les",
- "actions carried out by moderators" => "actions prises par les modérateurs",
+ "Watch all the actions carried out by moderators" => "Regardez toutes les actions prises par les modérateurs",
"meet" => "rencontrer",
"Public profile of" => "Profil public de",
"See all the contributions of" => "Voir toute les distributions de",
diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php
index 9e05ed2..ddbc16f 100644
--- a/h-source/Application/Include/myFunctions.php
+++ b/h-source/Application/Include/myFunctions.php
@@ -484,7 +484,7 @@ function getHardwareInfoFromTalkId($id = 0)
$clean['id'] = (int)$id;
$talk = new TalkModel();
$res = $talk->select('hardware.type,hardware.id_hard')->from('hardware inner join talk')->using('id_hard')->where(array('id_talk'=>$clean['id']))->send();
- return $res[0]['hardware'];
+ return count($res) > 0 ? $res[0]['hardware'] : null;
}
//get the wiki page info from the talk id
@@ -493,7 +493,7 @@ 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'];
+ return count($res) > 0 ? $res[0]['wiki']['id_wiki'] : '';
}
//get the issue info from the message id
@@ -502,7 +502,16 @@ function getIssueNumberFromMessageId($id = 0)
$clean['id'] = (int)$id;
$mess = new MessagesModel();
$res = $mess->select('issues.id_issue')->from('issues inner join messages')->using('id_issue')->where(array('id_mes'=>$clean['id']))->toList('issues.id_issue')->send();
- return $res[0];
+ return count($res) > 0 ? $res[0] : '';
+}
+
+//get thw wiki name from the id
+function getWikiNameFromId($id = 0)
+{
+ $clean['id'] = (int)$id;
+ $wiki = new WikiModel();
+ $name = $wiki->getTheModelName($clean['id']);
+ return $name;
}
//return the URL to the moderated object page
@@ -517,8 +526,15 @@ function goToModeratedItem( $row = array() )
break;
case 'talk':
$hardInfo = getHardwareInfoFromTalkId($row['id']);
- $controller = Hardware::$typeToController[$hardInfo['type']];
- $url = $controller.'/talk/'.Lang::$current.'/'.$hardInfo['id_hard'].'#talk-'.$row['id'];
+ if (isset($hardInfo))
+ {
+ $controller = Hardware::$typeToController[$hardInfo['type']];
+ $url = $controller.'/talk/'.Lang::$current.'/'.$hardInfo['id_hard'].'#talk-'.$row['id'];
+ }
+ else
+ {
+ $url = 'last/modactions/'.Lang::$current;
+ }
break;
case 'user':
$url = 'meet/user/'.Lang::$current.'/'.getUserName($row['id']);
@@ -529,7 +545,12 @@ function goToModeratedItem( $row = array() )
case 'wiki_talk':
$url = 'wiki/talk/'.Lang::$current.'/'.getWikiPageInfoFromTalkId($row['id']).'#wiki-talk-'.$row['id'];
break;
-
+ case 'page':
+ $url = 'wiki/page/'.Lang::$current.'/'.encodeUrl(getWikiNameFromId($row['id']));
+ break;
+ case 'page_del':
+ $url = 'wiki/page/'.Lang::$current.'/'.encodeUrl(getWikiNameFromId($row['id']));
+ break;
}
return 'http://'.DOMAIN_NAME.'/'.$url;
}