Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
feat(demo): remove demo features
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Feb 8, 2017
1 parent 437adf1 commit 1160b07
Show file tree
Hide file tree
Showing 46 changed files with 979 additions and 3,388 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
.buildpath
.idea/*
*.iml
tests/logs/*
vendor
node_modules/
npm-debug.log
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ env:
global:
- FUSION_SOURCE="https://github.com/fusioninventory/fusioninventory-for-glpi -b glpi9.1+1.1"
matrix:
- GLPI_SOURCE="https://github.com/flyve-mdm/glpi -b 9.1.1-backport"
- GLPI_SOURCE="https://github.com/flyve-mdm/glpi -b 9.1.2-backport"
- GLPI_SOURCE="https://github.com/glpi-project/glpi -b 9.1/bugfixes"
- GLPI_SOURCE="https://github.com/glpi-project/glpi -b master"

before_script:
- git clone --depth=50 $GLPI_SOURCE ../glpi && cd ../glpi
- composer install
- composer install --no-dev
- php tools/cliinstall.php --db=glpi-test --user=travis --tests
- mkdir plugins/fusioninventory && git clone --depth=50 $FUSION_SOURCE plugins/fusioninventory
- mv ../flyve-mdm-glpi plugins/flyvemdm
Expand All @@ -28,7 +28,7 @@ before_script:
script:
- cd plugins/flyvemdm
- php -S localhost:8088 -t ../.. ../../tests/router.php &>/dev/null &
- phpunit --verbose
- vendor/bin/phpunit --verbose
- vendor/bin/phpcs -p --standard=vendor/glpi-project/coding-standard/GlpiStandard/ *.php install/ inc/ front/ ajax/ tests/

notifications:
Expand Down
15 changes: 13 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,24 @@
"licence": "AGPLv3+",
"keywords": ["glpi", "flyve", "mdm"],
"require": {
"ext-gd": "*",
"ext-zip": "*",
"ext-openssl": "*",
"ext-sockets": "*",
"sskaje/mqtt": "dev-master",
"spomky-labs/otphp": "^8.2",
"tufanbarisyildirim/php-apk-parser": "dev-master"
},
"require-dev": {
"guzzlehttp/guzzle": "~5",
"squizlabs/php_codesniffer": "^2.7",
"glpi-project/coding-standard": "^0.5.0"
"glpi-project/coding-standard": "^0.5.0",
"phpunit/phpunit": "^4.8 || ^5.7",
"flyve-mdm/test": "dev-master"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/flyve-mdm/flyve-mdm-glpi-test"
}
]
}
33 changes: 33 additions & 0 deletions hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,36 @@ function plugin_flyvemdm_getDatabaseRelations() {
return [
];
}

function plugin_flyvemdm_hook_entity_add(CommonDBTM $item) {
if ($item instanceof Entity) {
$entityConfig = new PluginFlyvemdmEntityconfig();
$entityConfig->hook_entity_add($item);

$fleet = new PluginFlyvemdmFleet();
$fleet->hook_entity_add($item);
}
}

function plugin_flyvemdm_hook_entity_purge(CommonDBTM $item) {
if ($item instanceof Entity) {
$itemtypes = array(
'PluginFlyvemdmEntityconfig',
'PluginFlyvemdmInvitation',
'PluginFlyvemdmAgent',
'PluginFlyvemdmFleet',
'PluginFlyvemdmPackage',
'PluginFlyvemdmFile',
);

foreach ($itemtypes as $itemtype) {
$itemToPurge = new $itemtype();
$itemToPurge->hook_entity_purge($item);
}
}
}

function plugin_flyvemdm_computer_purge(CommonDBTM $item) {
$geolocation = new PluginFlyvemdmGeolocation();
$geolocation->hook_computer_purge($item);
}
Loading

0 comments on commit 1160b07

Please sign in to comment.