Skip to content

Commit

Permalink
Merge branch 'release/1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
orthagh committed Sep 21, 2017
2 parents e392018 + 2f1c908 commit 73eeb6c
Show file tree
Hide file tree
Showing 8 changed files with 235 additions and 278 deletions.
4 changes: 1 addition & 3 deletions front/entity.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,17 @@

Session::haveRight("entity", UPDATE);

$Entity = new Entity();
$Entity = new Entity();
$PluginCreditEntity = new PluginCreditEntity();
$PluginCreditType = new PluginCreditType();

if (isset($_POST["add"])) {

$PluginCreditEntity->check(-1, CREATE, $_POST);
if ($PluginCreditEntity->add($_POST)) {
Event::log($_POST["plugin_credit_types_id"], "entity", 4, "setup",
sprintf(__('%s adds a vouchers to an entity'), $_SESSION["glpiname"]));
}
Html::back();

}

Html::displayErrorAndDie("lost");
3 changes: 1 addition & 2 deletions front/ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@
if (!isset($_GET["plugcreditentity"])) {
throw new \RuntimeException('Invalid params provided!', 'credit');
} else {
$_GET['plugcreditentity'] = intval($_GET['plugcreditentity']);
$_GET['plugcreditentity'] = (int) $_GET['plugcreditentity'];
}

Session::checkLoginUser();

Session::checkRightsOr('ticket', [Ticket::STEAL, Ticket::OWN]);

PluginCreditTicket::displayConsumed($_GET['plugcreditentity']);
Expand Down
9 changes: 3 additions & 6 deletions hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ function plugin_credit_uninstall() {
* Define Dropdown tables to be manage in GLPI :
*/
function plugin_credit_getDropdown() {

$pluginDropdowns = array('PluginCreditType' => _n('Credit voucher type',
'Credit vouchers types',
Session::getPluralNumber(),
'credit'));
return $pluginDropdowns;
return ['PluginCreditType' => _n('Credit voucher type', 'Credit vouchers types',
Session::getPluralNumber(),
'credit')];
}
Loading

0 comments on commit 73eeb6c

Please sign in to comment.