Skip to content

Commit

Permalink
Merge branch 'release/2.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-anne committed Jul 7, 2020
2 parents 37bb88a + ff49f31 commit f97ee34
Show file tree
Hide file tree
Showing 59 changed files with 10,764 additions and 9,678 deletions.
42 changes: 3 additions & 39 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,15 @@
language: php
php:
- 5.6
- 7.0
- 7.1
- 7.2
- nightly

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

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

- composer install --optimize-autoloader --prefer-dist --no-interaction --no-progress --no-suggest

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
- vendor/bin/robo --no-interaction code:cs --strict

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: 4 additions & 2 deletions ajax/detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@
"validate",
];

$order_url = Plugin::getWebDir('order');

foreach ($fields as $field) {
$paramsaction['update'] = $field;
Ajax::updateItem("show_$field",
$CFG_GLPI["root_doc"] . "/plugins/order/ajax/referencedetail.php",
"$order_url/ajax/referencedetail.php",
$paramsaction, "dropdown_reference$rand");
Ajax::updateItemOnSelectEvent("dropdown_reference$rand",
"show_$field",
$CFG_GLPI["root_doc"]."/plugins/order/ajax/referencedetail.php",
"$order_url/ajax/referencedetail.php",
$paramsaction);
}
2 changes: 1 addition & 1 deletion ajax/dropdownContact.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

if ($DB->numrows($result)) {
$prev = -1;
while ($data = $DB->fetch_array($result)) {
while ($data = $DB->fetchArray($result)) {
if ($data["entities_id"] != $prev) {
if ($prev > 0) {
echo "</optgroup>";
Expand Down
2 changes: 1 addition & 1 deletion ajax/dropdownReference.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
$number = $DB->numrows($result);
$values = [0 => Dropdown::EMPTY_VALUE];
if ($number) {
while ($data = $DB->fetch_assoc($result)) {
while ($data = $DB->fetchAssoc($result)) {
$values[$data['id']] = $data['name']." - ".$data['reference_code'];
}
}
Expand Down
2 changes: 1 addition & 1 deletion ajax/dropdownSupplier.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

$values = [0 => Dropdown::EMPTY_VALUE];
if ($number) {
while ($data = $DB->fetch_assoc($result)) {
while ($data = $DB->fetchAssoc($result)) {
$values[$data['id']] = formatUserName('', '', $data['name'], $data['firstname']);
}
}
Expand Down
2 changes: 1 addition & 1 deletion ajax/referencetree.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
Session::checkLoginUser();

if (!isset($_GET['target'])) {
$_GET['target'] = $CFG_GLPI['root_doc']."/plugins/order/front/reference.php";
$_GET['target'] = Plugin::getWebDir('order')."/front/reference.php";
}

PluginOrderReference::showSelector($_GET['target']);
Expand Down
6 changes: 3 additions & 3 deletions ajax/referencetreetypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
if ($DB->numrows($result)) {
$pos = 0;

while ($row = $DB->fetch_array($result)) {
while ($row = $DB->fetchArray($result)) {
$class = $row['itemtype'];
$item = new $class();
$path['text'] = $item->getTypeName();
Expand All @@ -73,8 +73,8 @@
Dropdown::getDropdownName("glpi_entities", $entity)."&field[1]=80";
}

$path['href'] = $CFG_GLPI["root_doc"].
"/plugins/order/front/$target?is_deleted=0&field[0]=3&searchtype[0]=equals&contains[0]=".
$path['href'] = Plugin::getWebDir('order').
"/front/$target?is_deleted=0&field[0]=3&searchtype[0]=equals&contains[0]=".
rawurlencode($class)."&$link&itemtype=PluginOrderReference&start=0";

// Check if node is a leaf or a folder.
Expand Down
13 changes: 8 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"require-dev": {
"glpi-project/tools": "^0.1"
},
"require": {
"php": "^7.2",
"masnathan/odtphp": "dev-teclib"
},
"require-dev": {
"glpi-project/tools": "^0.1"
},
"config": {
"optimize-autoloader": true,
"platform": {
"php": "5.6"
}
"php": "7.2.0"
},
"sort-packages": true
},
"repositories": [
{
Expand Down
Loading

0 comments on commit f97ee34

Please sign in to comment.