Skip to content

Commit

Permalink
Merge branch 'release/2.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
orthagh committed Sep 21, 2017
2 parents 36a0684 + 5256505 commit 1779af0
Show file tree
Hide file tree
Showing 58 changed files with 3,885 additions and 1,180 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dist/
vendor/
.gh_token
*.min.*

51 changes: 51 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
language: php
php:
- 5.5
- 5.6
- 7.0
- 7.1
- nightly

#env:
# global:
# - DB=mysql
# matrix:
# - GLPIVER=9.1/bugfixes
# - GLPIVER=master

before_script:
- composer self-update
# - git clone --depth=1 https://github.com/glpi-project/glpi -b $GLPIVER ../glpi && cd ../glpi
# - composer install --no-dev
# - mysql -u root -e 'create database glpitest;'
# - php tools/cliinstall.php --db=glpi-test --user=travis --tests
# - mv ../{LNAME} plugins/{LNAME}
# - cd plugins/{LNAME}
- composer install -o


script:
- vendor/bin/robo --no-interaction code:cs
# - mysql -u root -e 'select version();'
# - ./vendor/bin/atoum -bf tests/bootstrap.php -d tests/units/


matrix:
# exclude:
# - php: 5.4
# env: GLPIVER=master
allow_failures:
- php: nightly

cache:
directories:
- $HOME/.composer/cache

#notifications:
# irc:
# channels:
# - "irc.freenode.org#channel"
# on_success: change
# on_failure: always
# use_notice: true
# skip_join: true
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# escalade
# Escalade GLPI plugin

[![Join the chat at https://gitter.im/TECLIB/escalade](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/TECLIB/escalade?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Expand All @@ -10,11 +10,9 @@ It also adds a graphical historical for assigned groups.
A new dashboard on the user's home page is added, and a new criteria in ticket's search engine.
To finish, there's also a clone ticket feature, accessible through an icon on the ticket form.


* Download : https://github.com/PluginsGLPI/escalade/releases

Contributing
------------
## Contributing

* Open a ticket for each bug/feature so it can be discussed
* Follow [development guidelines](http://glpi-developer-documentation.readthedocs.io/en/latest/plugins/index.html)
Expand Down
13 changes: 13 additions & 0 deletions RoboFile.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
/**
* This is project's console commands configuration for Robo task runner.
*
* @see http://robo.li/
*/

require_once 'vendor/autoload.php';

class RoboFile extends Glpi\Tools\RoboFile
{
//Own plugin's robo stuff
}
2 changes: 1 addition & 1 deletion ajax/assign_me.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
Html::displayErrorAndDie(__("missing parameters", "escalade"));
}

PluginEscaladeTicket::assign_me(intval($_REQUEST['tickets_id']));
PluginEscaladeTicket::assign_me((int) $_REQUEST['tickets_id']);
4 changes: 3 additions & 1 deletion ajax/cloneandlink_ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

Session::checkLoginUser();

if (!isset($_REQUEST['tickets_id'])) exit;
if (!isset($_REQUEST['tickets_id'])) {
exit;
}

PluginEscaladeTicket::cloneAndLink($_REQUEST['tickets_id']);
10 changes: 5 additions & 5 deletions ajax/group_values.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php
$AJAX_INCLUDE = 1;
include ("../../../inc/includes.php");
header("Content-Type: text/html; charset=UTF-8");
Expand All @@ -12,13 +12,13 @@
$groups_id_filtred = $PluginEscaladeGroup_Group->getGroups($ticket_id);

if (count($groups_id_filtred) > 0) {
$myarray = array();
$myarray = [];
foreach ($groups_id_filtred as $groups_id => $groups_name) {
$myarray[] = $groups_id;
}
$newarray = implode(", ", $myarray);
$condition = " id IN ($newarray)";

} else {
$condition = "1=0";
}
Expand All @@ -28,8 +28,8 @@

$_POST["condition"] = $rand;

if(!isset($_POST["entity_restrict"]) && $ticket_id){
$ticket = new Ticket();
if (!isset($_POST["entity_restrict"]) && $ticket_id) {
$ticket = new Ticket();
$ticket->getFromDB($ticket_id);
$_POST["entity_restrict"] = $ticket->fields['entities_id'];
}
Expand Down
4 changes: 3 additions & 1 deletion ajax/history.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

Session::checkLoginUser();

if (!isset($_REQUEST['tickets_id'])) exit;
if (!isset($_REQUEST['tickets_id'])) {
exit;
}

PluginEscaladeHistory::getHistory($_REQUEST['tickets_id']);
2 changes: 1 addition & 1 deletion ajax/user_values.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
$PluginEscaladeGroup_Group = new PluginEscaladeGroup_Group();
$groups_id_filtred = $PluginEscaladeGroup_Group->getGroups($ticket_id, false);

$groups = array();
$groups = [];
if (count($groups_id_filtred) > 0) {
foreach ($groups_id_filtred as $groups_id => $groups_name) {
$groups[] = $groups_id;
Expand Down
7 changes: 7 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"minimum-stability": "dev",
"prefer-stable": true,
"require-dev": {
"glpi-project/tools": "^0.1.0"
}
}
Loading

0 comments on commit 1779af0

Please sign in to comment.