Skip to content

Commit

Permalink
Merge branch 'release/2.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Walid committed Jan 31, 2018
2 parents aa6424d + 00bca2b commit f6b5dd7
Show file tree
Hide file tree
Showing 150 changed files with 5,697 additions and 4,537 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
8 changes: 8 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[main]
host = https://www.transifex.com

[glpi-plugins-datainjection.datainjection-243pot]
file_filter = locales/<lang>.po
source_file = locales/datainjection.pot
source_lang = en
minimum_perc: 100
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ Data to be imported using the plugins are:
- management data (contract, contact, supplier),
- configuration data (user, group, entity).

### 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)
* Refer to [GitFlow](http://git-flow.readthedocs.io/) process for branching
* Work on a new branch on your own fork
* Open a PR that will be reviewed by a developer

## Français

Cette extension permet l'injection de données dans [GLPI](http://glpi-project.org) à l'aide de fichiers CSV
Expand All @@ -27,3 +35,11 @@ Les données pouvant-être injectées sont :
- données d'inventaires (sauf logiciels et licences),
- données de gestion (contrat, contact, fournisseur),
- données de configuration (utilisateur, groupe, entité).

### Contribuer

* Ouvrez un ticket pour chaque bogue/fonctionnalité que cela puisse être discuté
* Suivez [les règles de développement](http://glpi-developer-documentation.readthedocs.io/en/latest/plugins/index.html)
* Référez-vous au processus [GitFlow](http://git-flow.readthedocs.io/) pour gérer les branches
* Travaillez sur une nouvelle branche sur votre fork
* Ouvrez une PR qui sera revue par un développeur
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
}
16 changes: 7 additions & 9 deletions ajax/dropdownChooseField.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* @version $Id$
* @version $Id: HEADER 14684 2011-06-11 06:32:40Z remi $
LICENSE
This file is part of the datainjection plugin.
Expand All @@ -20,22 +20,20 @@
--------------------------------------------------------------------------
@package datainjection
@author the datainjection plugin team
@copyright Copyright (c) 2010-2013 Datainjection plugin team
@copyright Copyright (c) 2010-2017 Datainjection plugin team
@license GPLv2+
http://www.gnu.org/licenses/gpl.txt
@link https://forge.indepnet.net/projects/datainjection
@link https://github.com/pluginsGLPI/datainjection
@link http://www.glpi-project.org/
@since 2009
---------------------------------------------------------------------- */

// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"dropdownChooseField.php")) {
include ('../../../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
if (strpos($_SERVER['PHP_SELF'], "dropdownChooseField.php")) {
include '../../../inc/includes.php';
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}

Session::checkCentralAccess();
PluginDatainjectionInjectionType::dropdownFields($_POST);

?>
15 changes: 7 additions & 8 deletions ajax/dropdownMandatory.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* @version $Id$
* @version $Id: HEADER 14684 2011-06-11 06:32:40Z remi $
LICENSE
This file is part of the datainjection plugin.
Expand All @@ -20,21 +20,20 @@
--------------------------------------------------------------------------
@package datainjection
@author the datainjection plugin team
@copyright Copyright (c) 2010-2013 Datainjection plugin team
@copyright Copyright (c) 2010-2017 Datainjection plugin team
@license GPLv2+
http://www.gnu.org/licenses/gpl.txt
@link https://forge.indepnet.net/projects/datainjection
@link https://github.com/pluginsGLPI/datainjection
@link http://www.glpi-project.org/
@since 2009
---------------------------------------------------------------------- */

// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"dropdownMandatory.php")) {
include ('../../../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
if (strpos($_SERVER['PHP_SELF'], "dropdownMandatory.php")) {
include '../../../inc/includes.php';
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}

Session::checkCentralAccess();
PluginDatainjectionInjectionType::showMandatoryCheckBox($_POST);
?>
26 changes: 13 additions & 13 deletions ajax/dropdownSelectModel.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* @version $Id$
* @version $Id: HEADER 14684 2011-06-11 06:32:40Z remi $
LICENSE
This file is part of the datainjection plugin.
Expand All @@ -20,34 +20,34 @@
--------------------------------------------------------------------------
@package datainjection
@author the datainjection plugin team
@copyright Copyright (c) 2010-2013 Datainjection plugin team
@copyright Copyright (c) 2010-2017 Datainjection plugin team
@license GPLv2+
http://www.gnu.org/licenses/gpl.txt
@link https://forge.indepnet.net/projects/datainjection
@link https://github.com/pluginsGLPI/datainjection
@link http://www.glpi-project.org/
@since 2009
---------------------------------------------------------------------- */

// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"dropdownSelectModel.php")) {
include ('../../../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
if (strpos($_SERVER['PHP_SELF'], "dropdownSelectModel.php")) {
include '../../../inc/includes.php';
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}

Session::checkCentralAccess();

if (isset($_SESSION['datainjection']['models_id'])
&& $_SESSION['datainjection']['models_id']!=$_POST['models_id']) {
PluginDatainjectionModel::cleanSessionVariables();
&& $_SESSION['datainjection']['models_id']!=$_POST['models_id']
) {
PluginDatainjectionModel::cleanSessionVariables();
}

$_SESSION['datainjection']['step'] = PluginDatainjectionClientInjection::STEP_UPLOAD;
$model = new PluginDatainjectionModel();

if (($_POST['models_id'] > 0)
&& $model->can($_POST['models_id'], READ)) {
PluginDatainjectionInfo::showAdditionalInformationsForm($model);
&& $model->can($_POST['models_id'], READ)
) {
PluginDatainjectionInfo::showAdditionalInformationsForm($model);
}

?>
15 changes: 7 additions & 8 deletions ajax/injection.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* @version $Id$
* @version $Id: HEADER 14684 2011-06-11 06:32:40Z remi $
LICENSE
This file is part of the datainjection plugin.
Expand All @@ -20,22 +20,21 @@
--------------------------------------------------------------------------
@package datainjection
@author the datainjection plugin team
@copyright Copyright (c) 2010-2013 Datainjection plugin team
@copyright Copyright (c) 2010-2017 Datainjection plugin team
@license GPLv2+
http://www.gnu.org/licenses/gpl.txt
@link https://forge.indepnet.net/projects/datainjection
@link https://github.com/pluginsGLPI/datainjection
@link http://www.glpi-project.org/
@since 2009
---------------------------------------------------------------------- */

// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"injection.php")) {
include ('../../../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
if (strpos($_SERVER['PHP_SELF'], "injection.php")) {
include '../../../inc/includes.php';
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}

Session::checkCentralAccess();
$model = unserialize($_SESSION['datainjection']['currentmodel']);
PluginDatainjectionClientInjection::showInjectionForm($model, $_SESSION['glpiactive_entity']);
?>
15 changes: 7 additions & 8 deletions ajax/results.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* @version $Id$
* @version $Id: HEADER 14684 2011-06-11 06:32:40Z remi $
LICENSE
This file is part of the datainjection plugin.
Expand All @@ -20,22 +20,21 @@
--------------------------------------------------------------------------
@package datainjection
@author the datainjection plugin team
@copyright Copyright (c) 2010-2013 Datainjection plugin team
@copyright Copyright (c) 2010-2017 Datainjection plugin team
@license GPLv2+
http://www.gnu.org/licenses/gpl.txt
@link https://forge.indepnet.net/projects/datainjection
@link https://github.com/pluginsGLPI/datainjection
@link http://www.glpi-project.org/
@since 2009
---------------------------------------------------------------------- */

// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"results.php")) {
include ('../../../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
if (strpos($_SERVER['PHP_SELF'], "results.php")) {
include '../../../inc/includes.php';
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}

Session::checkCentralAccess();
$model = unserialize($_SESSION['datainjection']['currentmodel']);
PluginDatainjectionClientInjection::showResultsForm($model);
?>
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 f6b5dd7

Please sign in to comment.