Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

gettext

git-svn-id: https://forge.indepnet.net/svn/glpi/trunk@17570 35612d4c-9d10-0410-837c-bf9dd1be60d7
  • Loading branch information...
commit f679088107f43aec12e26d64096ba82bc6a519ae 1 parent 11b684b
yllen authored
Showing with 103 additions and 84 deletions.
  1. +14 −12 ajax/dropdownNetpoint.php
  2. +4 −3 ajax/dropdownRules.php
  3. +2 −1  ajax/dropdownSelectSoftware.php
  4. +2 −1  ajax/dropdownSelectSoftwareLicense.php
  5. +2 −2 ajax/dropdownSoftwareLicense.php
  6. +1 −0  ajax/dropdownTicketCategories.php
  7. +3 −2 ajax/dropdownTrackingDeviceType.php
  8. +3 −3 ajax/dropdownUsers.php
  9. +35 −28 ajax/dropdownValue.php
  10. +4 −2 ajax/dropdownValuesBlacklist.php
  11. +1 −1  ajax/entitytreesons.php
  12. +1 −1  ajax/genericdate.php
  13. +0 −2  ajax/index.php
  14. +4 −4 ajax/planning.php
  15. +1 −1  ajax/planningcheck.php
  16. +1 −1  ajax/planningend.php
  17. +4 −1 ajax/priority.php
  18. +2 −2 ajax/private_public.php
  19. +1 −1  ajax/rulecriteria.php
  20. +1 −1  ajax/rulecriteriavalue.php
  21. +4 −3 ajax/searchoption.php
  22. +2 −1  ajax/searchoptionvalue.php
  23. +1 −1  ajax/solution.php
  24. +1 −1  ajax/subvisibility.php
  25. +1 −1  ajax/ticketassigninformation.php
  26. +4 −4 ajax/ticketiteminformation.php
  27. +1 −1  ajax/ticketsatisfaction.php
  28. +1 −1  ajax/transfers.php
  29. +2 −2 ajax/uemailUpdate.php
View
26 ajax/dropdownNetpoint.php
@@ -52,7 +52,8 @@
$_POST["limit"] = $_SESSION["glpidropdown_chars_limit"];
}
-if (strlen($_POST['searchText'])>0 && $_POST['searchText']!=$CFG_GLPI["ajax_wildcard"]) {
+if ((strlen($_POST['searchText']) > 0)
+ && ($_POST['searchText'] != $CFG_GLPI["ajax_wildcard"])) {
$where = " WHERE (`glpi_netpoints`.`name` ".Search::makeTextSearch($_POST['searchText'])."
OR `glpi_locations`.`completename` ".Search::makeTextSearch($_POST['searchText']).")";
} else {
@@ -62,17 +63,17 @@
$NBMAX = $CFG_GLPI["dropdown_max"];
$LIMIT = "LIMIT 0,$NBMAX";
-if ($_POST['searchText']==$CFG_GLPI["ajax_wildcard"]) {
+if ($_POST['searchText'] == $CFG_GLPI["ajax_wildcard"]) {
$LIMIT = "";
}
$location_restrict = false;
if (!(isset($_POST["devtype"])
- && $_POST["devtype"] != 'NetworkEquipment'
+ && ($_POST["devtype"] != 'NetworkEquipment')
&& isset($_POST["locations_id"])
- && $_POST["locations_id"]>0)) {
+ && ($_POST["locations_id"] > 0))) {
- if (isset($_POST["entity_restrict"]) && $_POST["entity_restrict"]>=0) {
+ if (isset($_POST["entity_restrict"]) && ($_POST["entity_restrict"] >= 0)) {
$where .= " AND `glpi_netpoints`.`entities_id` = '".$_POST["entity_restrict"]."'";
} else {
$where .= getEntitiesRestrictRequest(" AND ", "glpi_locations");
@@ -99,14 +100,14 @@
} else {
$query .= " != 'NetworkEquipment' )";
- if (isset($_POST["locations_id"]) && $_POST["locations_id"]>=0) {
+ if (isset($_POST["locations_id"]) && ($_POST["locations_id"] >= 0)) {
$location_restrict = true;
$where .= " AND `glpi_netpoints`.`locations_id` = '".$_POST["locations_id"]."' ";
}
}
$where .= " AND `glpi_networkportethernets`.`netpoints_id` IS NULL ";
-} else if (isset($_POST["locations_id"]) && $_POST["locations_id"]>=0) {
+} else if (isset($_POST["locations_id"]) && ($_POST["locations_id"] >= 0)) {
$location_restrict = true;
$where .= " AND `glpi_netpoints`.`locations_id` = '".$_POST["locations_id"]."' ";
}
@@ -128,7 +129,7 @@
$output = Dropdown::getDropdownName('glpi_netpoints', $_POST['value']);
-if (!empty($output) && $output!=" ") {
+if (!empty($output) && ($output != " ")) {
echo "<option selected value='".$_POST['value']."'>".$output."</option>";
}
@@ -140,14 +141,15 @@
$addcomment = "";
if (isset($data["comment"])) {
- $addcomment = " - ".$loc." - ".$data["comment"];
+ //TRANS: %1$s is the location, %2$s is the comment
+ $addcomment = sprintf(__(' - %1$s - %2$s'), $loc, $data["comment"]);
}
if (!$location_restrict) {
- $output .= " ($loc)";
+ $output .= "&nbsp;".sprintf(__('(%s)'), $loc);
}
- echo "<option value='$ID' title=\"".Html::cleanInputText($output.$addcomment)."\"";
- echo ">".$output."</option>";
+ echo "<option value='$ID' title=\"".Html::cleanInputText($output.$addcomment)."\">".$output.
+ "</option>";
}
}
echo "</select>\n";
View
7 ajax/dropdownRules.php
@@ -58,13 +58,13 @@
FROM `glpi_rules`
WHERE `sub_type` = '".$_POST["type"]."'";
-if ($_POST['searchText']==$CFG_GLPI["ajax_wildcard"]) {
+if ($_POST['searchText'] == $CFG_GLPI["ajax_wildcard"]) {
$LIMIT = "";
} else {
$sql .= " AND `name` ".Search::makeTextSearch($_POST['searchText']);
}
-if (isset($_POST['entity_restrict']) && $_POST['entity_restrict']!='') {
+if (isset($_POST['entity_restrict']) && ($_POST['entity_restrict'] != '')) {
$sql .= " AND `glpi_rules`.`entities_id` = '".$_POST['entity_restrict']."'";
}
@@ -74,7 +74,8 @@
echo "<select id='dropdown_".$_POST["myname"].$_POST["rand"]."' name='".$_POST['myname']."' size='1'>";
-if ($_POST['searchText']!=$CFG_GLPI["ajax_wildcard"] && $DB->numrows($result)==$NBMAX) {
+if (($_POST['searchText'] != $CFG_GLPI["ajax_wildcard"])
+ && ($DB->numrows($result) == $NBMAX)) {
echo "<option value='0'>".__('--Limited view--')."</option>";
} else {
echo "<option value='0'>".Dropdown::EMPTY_VALUE."</option>";
View
3  ajax/dropdownSelectSoftware.php
@@ -46,7 +46,8 @@
$rand = mt_rand();
$where = "";
-if (strlen($_POST['searchText'])>0 && $_POST['searchText']!=$CFG_GLPI["ajax_wildcard"]) {
+if ((strlen($_POST['searchText']) > 0)
+ && ($_POST['searchText'] != $CFG_GLPI["ajax_wildcard"])) {
$where .=" AND `name` ".Search::makeTextSearch($_POST['searchText'])." ";
}
View
3  ajax/dropdownSelectSoftwareLicense.php
@@ -46,7 +46,8 @@
$rand = mt_rand();
$where = "";
-if (strlen($_POST['searchText'])>0 && $_POST['searchText']!=$CFG_GLPI["ajax_wildcard"]) {
+if ((strlen($_POST['searchText']) > 0)
+ && ($_POST['searchText'] != $CFG_GLPI["ajax_wildcard"])) {
$where .=" AND `glpi_softwares`.`name` ".Search::makeTextSearch($_POST['searchText'])." ";
}
View
4 ajax/dropdownSoftwareLicense.php
@@ -42,7 +42,7 @@
Session::checkRight("software", "w");
-if ($_POST['softwares_id']>0) {
+if ($_POST['softwares_id'] > 0) {
if (!isset($_POST['value'])) {
$_POST['value'] = 0;
}
@@ -70,7 +70,7 @@
$output = $data['name'];
if (empty($output) || $_SESSION['glpiis_ids_visible']) {
- $output .= " ($ID)";
+ $output .= "&nbsp;".sprintf(__('(%s)'), $ID);
}
echo "<option ".($ID==$_POST['value']?"selected":"")." value='$ID' title=\"".
Html::cleanInputText($output)."\">".$output."</option>";
View
1  ajax/dropdownTicketCategories.php
@@ -57,6 +57,7 @@
case Ticket::INCIDENT_TYPE :
$opt['condition'].= " `is_incident`='1'";
break;
+
case Ticket::DEMAND_TYPE:
$opt['condition'].= " `is_request`='1'";
break;
View
5 ajax/dropdownTrackingDeviceType.php
@@ -40,12 +40,13 @@
Session::checkLoginUser();
// Make a select box
-if (isset($_POST["itemtype"]) && CommonITILObject::isPossibleToAssignType($_POST["itemtype"])) {
+if (isset($_POST["itemtype"])
+ && CommonITILObject::isPossibleToAssignType($_POST["itemtype"])) {
$table = getTableForItemType($_POST["itemtype"]);
$rand = mt_rand();
// Message for post-only
- if (!isset($_POST["admin"]) || $_POST["admin"]==0) {
+ if (!isset($_POST["admin"]) || ($_POST["admin"] == 0)) {
echo "<br>".__('Enter the first letters (user, item name, serial or asset number)');
}
View
6 ajax/dropdownUsers.php
@@ -103,8 +103,8 @@ function dpuser_cmp($a, $b) {
echo ">";
-if ($_POST['searchText']!=$CFG_GLPI["ajax_wildcard"]
- && $DB->numrows($result)==$CFG_GLPI["dropdown_max"]) {
+if (($_POST['searchText'] != $CFG_GLPI["ajax_wildcard"])
+ && ($DB->numrows($result) == $CFG_GLPI["dropdown_max"])) {
echo "<option value='0'>".__('--Limited view--')."</option>";
}
@@ -118,7 +118,7 @@ function dpuser_cmp($a, $b) {
if (isset($_POST['value'])) {
$output = getUserName($_POST['value']);
- if (!empty($output) && $output!="&nbsp;") {
+ if (!empty($output) && ($output != "&nbsp;")) {
echo "<option selected value='".$_POST['value']."'>".$output."</option>";
}
}
View
63 ajax/dropdownValue.php
@@ -76,7 +76,7 @@
$_POST['condition'] = rawurldecode(stripslashes($_POST['condition']));
}
-if (!isset($_POST['emptylabel']) || $_POST['emptylabel'] == '') {
+if (!isset($_POST['emptylabel']) || ($_POST['emptylabel'] == '')) {
$_POST['emptylabel'] = Dropdown::EMPTY_VALUE;
}
@@ -179,7 +179,7 @@
}
// no multi view for entitites
- if ($_POST['itemtype']=="Entity") {
+ if ($_POST['itemtype'] == "Entity") {
$multi = false;
}
@@ -204,7 +204,8 @@
}
echo ">";
- if ($_POST['searchText']!=$CFG_GLPI["ajax_wildcard"] && $DB->numrows($result)==$NBMAX) {
+ if (($_POST['searchText'] != $CFG_GLPI["ajax_wildcard"])
+ && ($DB->numrows($result) == $NBMAX)) {
echo "<option class='tree' value='0'>".__('--Limited view--')."</option>";
}
@@ -222,13 +223,15 @@
$outputval = Dropdown::getDropdownName($table, $_POST['value']);
- if (Toolbox::strlen($outputval)!=0 && $outputval!="&nbsp;") {
+ if ((Toolbox::strlen($outputval) != 0)
+ && ($outputval != "&nbsp;")) {
- if (Toolbox::strlen($outputval)>$_POST["limit"]) {
+ if (Toolbox::strlen($outputval) > $_POST["limit"]) {
// Completename for tree dropdown : keep right
$outputval = "&hellip;".Toolbox::substr($outputval, -$_POST["limit"]);
}
- if ($_SESSION["glpiis_ids_visible"] || Toolbox::strlen($outputval)==0) {
+ if ($_SESSION["glpiis_ids_visible"]
+ || (Toolbox::strlen($outputval) == 0)) {
$outputval .= " (".$_POST['value'].")";
}
echo "<option class='tree' selected value='".$_POST['value']."'>".$outputval."</option>";
@@ -239,7 +242,7 @@
if ($DB->numrows($result)) {
$prev = -1;
- while ($data =$DB->fetch_assoc($result)) {
+ while ($data = $DB->fetch_assoc($result)) {
$ID = $data['id'];
$level = $data['level'];
$output = $data['name'];
@@ -247,13 +250,14 @@
if ($displaywith) {
foreach ($_POST['displaywith'] as $key) {
if (isset($data[$key]) && strlen($data[$key])!=0) {
- $output .= " - ".$data[$key];
+ $output .= sprintf(__(' - %s'), $data[$key]);
}
}
}
- if ($multi && $data["entities_id"]!=$prev) {
- if ($prev>=0) {
+ if ($multi
+ && ($data["entities_id"] != $prev)) {
+ if ($prev >= 0) {
echo "</optgroup>";
}
$prev = $data["entities_id"];
@@ -272,17 +276,17 @@
if ($_SESSION['glpiuse_flat_dropdowntree']) {
$output = $data['completename'];
- if ($level>1) {
+ if ($level > 1) {
$class = "";
$raquo = "";
$level = 0;
}
} else { // Need to check if parent is the good one
- if ($level>1) {
+ if ($level > 1) {
// Last parent is not the good one need to display arbo
if (!isset($last_level_displayed[$level-1])
- || $last_level_displayed[$level-1] != $data[$item->getForeignKeyField()]) {
+ || ($last_level_displayed[$level-1] != $data[$item->getForeignKeyField()])) {
$work_level = $level-1;
$work_parentID = $data[$item->getForeignKeyField()];
@@ -325,7 +329,7 @@
} while ($work_level > 1
&& (!isset($last_level_displayed[$work_level])
- || $last_level_displayed[$work_level] != $work_parentID));
+ || ($last_level_displayed[$work_level] != $work_parentID)));
echo $to_display;
}
@@ -333,7 +337,7 @@
$last_level_displayed[$level] = $data['id'];
}
- if (Toolbox::strlen($output)>$_POST["limit"]) {
+ if (Toolbox::strlen($output) > $_POST["limit"]) {
if ($_SESSION['glpiuse_flat_dropdowntree']) {
$output = "&hellip;".Toolbox::substr($output, -$_POST["limit"]);
@@ -343,12 +347,12 @@
}
if ($_SESSION["glpiis_ids_visible"] || Toolbox::strlen($output)==0) {
- $output .= " ($ID)";
+ $output .= "&nbsp;".sprintf(__('(%s)'), $ID);
}
$addcomment = "";
if (isset($data["comment"])) {
- $addcomment = " - ".$data["comment"];
+ $addcomment = sprintf(__(' - - %s'), $data["comment"]);
}
echo "<option value='$ID' $class title=\"".Html::cleanInputText($data['completename'].
$addcomment)."\">".str_repeat("&nbsp;&nbsp;&nbsp;", $level).$raquo.$output.
@@ -367,11 +371,11 @@
if ($item->isEntityAssign()) {
$multi = $item->maybeRecursive();
- if (isset($_POST["entity_restrict"]) && !($_POST["entity_restrict"]<0)) {
+ if (isset($_POST["entity_restrict"]) && !($_POST["entity_restrict"] < 0)) {
$where .= getEntitiesRestrictRequest("AND", $table, "entities_id",
$_POST["entity_restrict"], $multi);
- if (is_array($_POST["entity_restrict"]) && count($_POST["entity_restrict"])>1) {
+ if (is_array($_POST["entity_restrict"]) && (count($_POST["entity_restrict"]) > 1)) {
$multi = true;
}
@@ -442,7 +446,8 @@
echo ">";
- if ($_POST['searchText']!=$CFG_GLPI["ajax_wildcard"] && $DB->numrows($result)==$NBMAX) {
+ if (($_POST['searchText'] != $CFG_GLPI["ajax_wildcard"])
+ && ($DB->numrows($result) == $NBMAX)) {
echo "<option value='0'>".__('--Limited view--')."</option>";
} else if (!isset($_POST['display_emptychoice']) || $_POST['display_emptychoice']) {
@@ -459,9 +464,9 @@
$output = Dropdown::getDropdownName($table,$_POST['value']);
- if (strlen($output)!=0 && $output!="&nbsp;") {
+ if ((strlen($output) != 0) && ($output != "&nbsp;")) {
if ($_SESSION["glpiis_ids_visible"]) {
- $output .= " (".$_POST['value'].")";
+ $output .= "&nbsp;".sprintf(__('(%s)'), $_POST['value']);
}
echo "<option selected value='".$_POST['value']."'>".$output."</option>";
}
@@ -475,7 +480,7 @@
if ($displaywith) {
foreach ($_POST['displaywith'] as $key) {
if (isset($data[$key]) && strlen($data[$key])!=0) {
- $output .= " - ".$data[$key];
+ $output .= sprintf(__(' - %s'), $data[$key]);
}
}
}
@@ -483,14 +488,16 @@
$addcomment = "";
if (isset($data["comment"])) {
- $addcomment = " - ".$data["comment"];
+ $addcomment = sprintf(__(' - %s'), $data["comment"]);
}
- if ($_SESSION["glpiis_ids_visible"] || strlen($output)==0) {
- $output .= " ($ID)";
+ if ($_SESSION["glpiis_ids_visible"]
+ || (strlen($output) == 0)) {
+ $output .= "&nbsp;".sprintf(__('(%s)'), $ID);
}
- if ($multi && $data["entities_id"]!=$prev) {
- if ($prev>=0) {
+ if ($multi
+ && ($data["entities_id"] != $prev)) {
+ if ($prev >= 0) {
echo "</optgroup>";
}
$prev = $data["entities_id"];
View
6 ajax/dropdownValuesBlacklist.php
@@ -41,9 +41,11 @@
Session::checkRight("config", "w");
-if (isset($_POST['itemtype']) && isset($_POST['id_field'])) {
+if (isset($_POST['itemtype'])
+ && isset($_POST['id_field'])) {
+
$blacklist = new Fieldblacklist();
- if (isset($_POST['id']) && $_POST['id'] > 0) {
+ if (isset($_POST['id']) && ($_POST['id'] > 0)) {
$blacklist->getFromDB($_POST['id']);
} else {
$blacklist->getEmpty();
View
2  ajax/entitytreesons.php
@@ -56,7 +56,7 @@
$ancestors = getAncestorsOf('glpi_entities', $_SESSION['glpiactive_entity']);
// Root node
- if ($_REQUEST['node']== -1) {
+ if ($_REQUEST['node'] == -1) {
$pos = 0;
foreach ($_SESSION['glpiactiveprofile']['entities'] as $entity) {
View
2  ajax/genericdate.php
@@ -42,7 +42,7 @@
Session::checkLoginUser();
-if (isset($_POST['value']) && strcmp($_POST['value'],'0')==0) {
+if (isset($_POST['value']) && (strcmp($_POST['value'],'0') == 0)) {
if ($_POST['withtime']) {
Html::showDateTimeFormItem($_POST['name'], $_POST['specificvalue']);
View
2  ajax/index.php
@@ -31,6 +31,4 @@
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
-
-
?>
View
8 ajax/planning.php
@@ -40,7 +40,7 @@
Session::checkCentralAccess();
-if (isset($_POST["id"]) && $_POST["id"]>0) {
+if (isset($_POST["id"]) && ($_POST["id"] > 0)) {
echo "<input type='hidden' name='plan[id]' value='".$_POST["id"]."'>";
}
@@ -50,7 +50,7 @@
} else {
$minute = (floor(date('i')/10)*10);
- if ($minute<10) {
+ if ($minute < 10) {
$minute = '0'.$minute;
}
$begin = date("Y-m-d H").":$minute:00";
@@ -116,14 +116,14 @@
Ajax::updateItemOnSelectEvent("dropdown_plan[_duration]$rand", "date_end$rand",
$CFG_GLPI["root_doc"]."/ajax/planningend.php", $params);
-if ($default_delay==0) {
+if ($default_delay == 0) {
$params['duration'] = 0;
Ajax::updateItem("date_end$rand", $CFG_GLPI["root_doc"]."/ajax/planningend.php", $params);
}
echo "</td></tr>\n";
-if ((!isset($_POST["id"]) || $_POST["id"]==0)
+if ((!isset($_POST["id"]) || ($_POST["id"] == 0))
&& isset($_POST['itemtype'])
&& PlanningRecall::isAvailable()) {
echo "<tr class='tab_bg_2'><td>"._x('Planning','Reminder')."</td><td>";
View
2  ajax/planningcheck.php
@@ -42,7 +42,7 @@
Session::checkLoginUser();
-if (isset($_REQUEST['users_id']) && $_REQUEST['users_id'] > 0) {
+if (isset($_REQUEST['users_id']) && ($_REQUEST['users_id'] > 0)) {
echo "<span onClick=\"window.open('".$CFG_GLPI["root_doc"].
"/front/planning.php?checkavailability=checkavailability&amp;users_id=".
$_REQUEST['users_id']."','infocoms','location=infocoms,width=1000,height=600,scrollbars=no')\"
View
2  ajax/planningend.php
@@ -42,7 +42,7 @@
Session::checkLoginUser();
-if (isset($_POST['duration']) && $_POST['duration']==0) {
+if (isset($_POST['duration']) && ($_POST['duration'] == 0)) {
Html::showDateTimeFormItem("plan[end]", $_POST['end'], -1, false, true, '', '',
$_POST['global_begin'], $_POST['global_end']);
}
View
5 ajax/priority.php
@@ -41,7 +41,10 @@
Session::checkLoginUser();
-if (isset($_POST["urgency"]) && isset($_POST["impact"]) && isset($_POST["priority"])) {
+if (isset($_POST["urgency"])
+ && isset($_POST["impact"])
+ && isset($_POST["priority"])) {
+
$priority = Ticket::computePriority($_POST["urgency"], $_POST["impact"]);
if ($_POST["priority"]) {
View
4 ajax/private_public.php
@@ -67,8 +67,8 @@
Dropdown::show('Entity', array('value' => $val));
_e(' + Child entities: ');
Dropdown::showYesNo('is_recursive', $_POST["is_recursive"]);
- echo " - ";
- echo "<a onClick='setPrivate".$_POST['rand']."()'>".__('Set personal')."</a>";
+ $link = "<a onClick='setPrivate".$_POST['rand']."()'>".__('Set personal')."</a>";
+ printf(__(' - %s'), $link);
break;
}
}
View
2  ajax/rulecriteria.php
@@ -46,7 +46,7 @@
Session::checkLoginUser();
-if (isset($_POST["sub_type"]) && $rule = getItemForItemtype($_POST["sub_type"])) {
+if (isset($_POST["sub_type"]) && ($rule = getItemForItemtype($_POST["sub_type"]))) {
$criterias = $rule->getCriterias();
if (count($criterias)) {
View
2  ajax/rulecriteriavalue.php
@@ -47,7 +47,7 @@
Session::checkLoginUser();
// Non define case
-if (isset($_POST["sub_type"]) && $rule = getItemForItemtype($_POST["sub_type"])) {
+if (isset($_POST["sub_type"]) && ($rule = getItemForItemtype($_POST["sub_type"]))) {
$rule->displayCriteriaSelectPattern("pattern", $_POST["criteria"], $_POST['condition']);
}
?>
View
7 ajax/searchoption.php
@@ -49,7 +49,9 @@
$addmeta = "";
// Non define case
-if (isset($_POST["itemtype"]) && isset($_POST["field"]) ) {
+if (isset($_POST["itemtype"])
+ && isset($_POST["field"]) ) {
+
if (isset($_POST['meta']) && $_POST['meta']) {
$addmeta = '2';
} else {
@@ -61,7 +63,7 @@
// is it a valid action for type ?
if (count($actions)
&& (empty($_POST['searchtype']) || !isset($actions[$_POST['searchtype']]))) {
- $tmp = $actions;
+ $tmp = $actions;
unset($tmp['searchopt']);
$_POST['searchtype'] = key($tmp);
unset($tmp);
@@ -113,5 +115,4 @@
$CFG_GLPI["root_doc"]."/ajax/searchoptionvalue.php",
$paramsaction);
}
-
?>
View
3  ajax/searchoptionvalue.php
@@ -220,7 +220,8 @@
}
//Could display be handled by a plugin ?
- if (!$display && $plug = isPluginItemType(getItemTypeForTable($searchopt['table']))) {
+ if (!$display
+ && $plug = isPluginItemType(getItemTypeForTable($searchopt['table']))) {
$function = 'plugin_'.$plug['plugin'].'_searchOptionsValues';
if (function_exists($function)) {
$params = array('name' => $inputname,
View
2  ajax/solution.php
@@ -45,7 +45,7 @@
Html::initEditorSystem("solution$rand");
-if (isset($_POST['value']) && $_POST['value'] > 0) {
+if (isset($_POST['value']) && ($_POST['value'] > 0)) {
$template = new SolutionTemplate();
if ($template->getFromDB($_POST['value'])) {
View
2  ajax/subvisibility.php
@@ -44,7 +44,7 @@
Session::checkLoginUser();
if (isset($_REQUEST['type']) && !empty($_REQUEST['type'])
- && isset($_REQUEST['items_id']) && $_REQUEST['items_id'] > 0) {
+ && isset($_REQUEST['items_id']) && ($_REQUEST['items_id'] > 0)) {
switch ($_REQUEST['type']) {
case 'Group' :
View
2  ajax/ticketassigninformation.php
@@ -43,7 +43,7 @@
Session::checkLoginUser();
-if (isset($_REQUEST['users_id_assign']) && $_REQUEST['users_id_assign'] > 0) {
+if (isset($_REQUEST['users_id_assign']) && ($_REQUEST['users_id_assign'] > 0)) {
$ticket = new Ticket();
View
8 ajax/ticketiteminformation.php
@@ -52,7 +52,7 @@
}
if (isset($_REQUEST['itemtype'])
- && isset($_REQUEST['items_id']) && $_REQUEST['items_id'] > 0) {
+ && isset($_REQUEST['items_id']) && ($_REQUEST['items_id'] > 0)) {
// Security
if (!class_exists($_REQUEST['itemtype']) ) {
exit();
@@ -64,9 +64,9 @@
$_REQUEST['items_id'], $days);
$nb = count($data);
- echo sprintf(_n('%s ticket in progress or recently solved on this item.',
- '%s tickets in progress or recently solved on this item.', $nb),
- $nb);
+ printf(_n('%s ticket in progress or recently solved on this item.',
+ '%s tickets in progress or recently solved on this item.', $nb),
+ $nb);
if ($nb) {
$content = '';
View
2  ajax/ticketsatisfaction.php
@@ -79,7 +79,7 @@
echo "<td colspan='1'>" . Html::convDateTime($max_closedate)."</td></tr>";
}
- if ($_REQUEST['inquest_config']==2 ) {
+ if ($_REQUEST['inquest_config'] == 2) {
echo "<tr class='tab_bg_1'>";
echo "<td>".__('Valid tags')."</td><td>".
"[TICKET_ID] [TICKET_NAME] [TICKET_CREATEDATE] [TICKET_SOLVEDATE] ".
View
2  ajax/transfers.php
@@ -39,7 +39,7 @@
Session::checkRight("transfer", "r");
-if (isset($_POST["id"]) && $_POST["id"]>0) {
+if (isset($_POST["id"]) && ($_POST["id"] > 0)) {
$transfer = new Transfer();
$transfer->showForm($_POST["id"],
array('target' => $CFG_GLPI["root_doc"]."/front/transfer.action.php"));
View
4 ajax/uemailUpdate.php
@@ -42,7 +42,7 @@
Session::checkLoginUser();
-if ((isset($_REQUEST['field']) && $_REQUEST["value"]>0)
+if ((isset($_REQUEST['field']) && ($_REQUEST["value"] > 0))
|| (isset($_REQUEST['allow_email']) && $_REQUEST['allow_email'])) {
$user = new User();
$default_email = "";
@@ -68,7 +68,7 @@
$email_string = '';
// Only one email
- if (count($emails) == 1
+ if ((count($emails) == 1)
&& !empty($default_email)
&& NotificationMail::isUserAddressValid($default_email)) {
$email_string = $default_email;

0 comments on commit f679088

Please sign in to comment.
Something went wrong with that request. Please try again.