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

WIP F-Droid market #698

Open
wants to merge 45 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
5154542
feat(market): fdroid market
btry Apr 14, 2018
3f4c50b
fix(install): move upgrade file
btry Sep 4, 2018
a943750
fix(fdroidmarket): accessibility of method for import
btry Sep 4, 2018
45d151b
feat(fdroidapplication): upgradable flag
btry Sep 4, 2018
916454b
refactor: code cleanup
btry Sep 4, 2018
7f66bf0
fix(agent): fix notepad property
btry Sep 5, 2018
e46b7c1
refactor(fdroidapplication): split method
btry Sep 5, 2018
e281d3e
fix(fdroidapplication): fix relation update upon package deletion
btry Sep 5, 2018
de0b982
feat(fdroidapplication): automatic update of packages
btry Sep 6, 2018
de6afcf
fix(install): remove tables when removing the plugin
btry Sep 6, 2018
c064be1
test(fdroidapplication): add fixtures
btry Sep 6, 2018
6c3503e
test: add tests
btry Sep 6, 2018
1a743fc
fix(install): fix install of rights
btry Sep 6, 2018
fa06b86
fix(fdroidapplication): warning when downloading an app
btry Sep 6, 2018
79dfca7
style(fdroidapplication): fix indentation
btry Sep 7, 2018
0f671e4
test: add tests
btry Sep 7, 2018
92273ac
fix: search options update
btry Sep 7, 2018
1f6bc32
fix(fdroidmarket): ignore update of markets wihout any URL
btry Sep 7, 2018
b73b049
test(fdroidmarket): give debug info if test fails
btry Sep 7, 2018
9e87d6a
test(fdroidmarket): fix deletion of apps on update
btry Sep 7, 2018
840ea50
feat(market): fdroid market
btry Apr 14, 2018
290a823
fix(fdroidmarket): accessibility of method for import
btry Sep 4, 2018
a96d564
feat(fdroidapplication): upgradable flag
btry Sep 4, 2018
706bfb4
refactor: code cleanup
btry Sep 4, 2018
8bc2bf5
fix(agent): fix notepad property
btry Sep 5, 2018
98a4760
refactor(fdroidapplication): split method
btry Sep 5, 2018
c7bc1b1
fix(fdroidapplication): fix relation update upon package deletion
btry Sep 5, 2018
0702473
feat(fdroidapplication): automatic update of packages
btry Sep 6, 2018
3b690b9
fix(install): remove tables when removing the plugin
btry Sep 6, 2018
776245d
test(fdroidapplication): add fixtures
btry Sep 6, 2018
cdb0e25
test: add tests
btry Sep 6, 2018
e148692
fix(install): fix install of rights
btry Sep 6, 2018
527f13f
fix(fdroidapplication): warning when downloading an app
btry Sep 6, 2018
10b91b8
style(fdroidapplication): fix indentation
btry Sep 7, 2018
e233bf1
test: add tests
btry Sep 7, 2018
f468eea
fix: search options update
btry Sep 7, 2018
0492d7c
fix(fdroidmarket): ignore update of markets wihout any URL
btry Sep 7, 2018
dd4cc9a
test(fdroidmarket): give debug info if test fails
btry Sep 7, 2018
886c9a0
test(fdroidmarket): fix deletion of apps on update
btry Sep 7, 2018
6682ed0
build(composer): add SimpleXML extension as required vendors
DIOHz0r Sep 10, 2018
e20cb6e
docs(tests): add missing tags for tests
DIOHz0r Sep 10, 2018
983a211
test(fdroid): add asserts for returned value on repository update
DIOHz0r Sep 10, 2018
4cf0db4
test(fdroid): fix test for market on Windows
DIOHz0r Sep 11, 2018
2b5f9a7
Merge branch 'feature/fdroid_2' of github.com-btry:btry/glpi-plugin i…
btry Sep 27, 2018
d9f7d59
Merge remote-tracking branch 'origin/develop' into feature/fdroid_2
btry Oct 4, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"ext-zip": "*",
"ext-openssl": "*",
"ext-sockets": "*",
"ext-simplexml": "*",
"sskaje/mqtt": "dev-master",
"tufanbarisyildirim/php-apk-parser": "dev-master",
"docopt/docopt": "^1.0",
Expand Down
68 changes: 38 additions & 30 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

81 changes: 81 additions & 0 deletions front/fdroidapplication.form.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?php
/**
* LICENSE
*
* Copyright © 2016-2018 Teclib'
* Copyright © 2010-2018 by the FusionInventory Development Team.
*
* This file is part of Flyve MDM Plugin for GLPI.
*
* Flyve MDM Plugin for GLPI is a subproject of Flyve MDM. Flyve MDM is a mobile
* device management software.
*
* Flyve MDM Plugin for GLPI is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* Flyve MDM Plugin for GLPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public License
* along with Flyve MDM Plugin for GLPI. If not, see http://www.gnu.org/licenses/.
* ------------------------------------------------------------------------------
* @author Thierry Bugier
* @copyright Copyright © 2018 Teclib
* @license AGPLv3+ http://www.gnu.org/licenses/agpl.txt
* @link https://github.com/flyve-mdm/glpi-plugin
* @link https://flyve-mdm.com/
* ------------------------------------------------------------------------------
*/

include ('../../../inc/includes.php');
$plugin = new Plugin();
if (!$plugin->isActivated('flyvemdm')) {
Html::displayNotFoundError();
}

Session::checkRight('flyvemdm:flyvemdm', PluginFlyvemdmProfile::RIGHT_FLYVEMDM_USE);

if (!isset($_GET['id'])) {
$_GET['id'] = '';
}

if (!isset($_GET['withtemplate'])) {
$_GET['withtemplate'] = '';
}

$fdroidApplication = new PluginFlyvemdmFDroidApplication();
if (isset($_POST['import'])) {
unset($_POST['_skip_checks']);
$fdroidApplication->update(['id' => $_POST['id'], 'import_status' => 'to_import']);
Html::back();
} else if (isset($_POST['update'])) {
$fdroidApplication->check($_POST['id'], UPDATE);
$fdroidApplication->update(['id' => $_POST['id'], 'is_auto_upgradable' => $_POST['is_auto_upgradable']]);
Html::back();
} else {
$fdroidApplication->check($_GET['id'], READ);
Html::header(
PluginFlyvemdmFDroidApplication::getTypeName(Session::getPluralNumber()),
'',
'admin',
PluginFlyvemdmMenu::class,
'fdroid application'
);

$menu = new PluginFlyvemdmMenu();
$menu->displayMenu('mini');

$fdroidApplication->display([
'id' => $_GET['id'],
'withtemplate' => $_GET['withtemplate']
]);

// Footer
if (strstr($_SERVER['PHP_SELF'], 'popup')) {
Html::popFooter();
} else {
Html::footer();
}
}
54 changes: 54 additions & 0 deletions front/fdroidapplication.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php
/**
* LICENSE
*
* Copyright © 2016-2018 Teclib'
* Copyright © 2010-2018 by the FusionInventory Development Team.
*
* This file is part of Flyve MDM Plugin for GLPI.
*
* Flyve MDM Plugin for GLPI is a subproject of Flyve MDM. Flyve MDM is a mobile
* device management software.
*
* Flyve MDM Plugin for GLPI is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* Flyve MDM Plugin for GLPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public License
* along with Flyve MDM Plugin for GLPI. If not, see http://www.gnu.org/licenses/.
* ------------------------------------------------------------------------------
* @author Thierry Bugier
* @copyright Copyright © 2018 Teclib
* @license AGPLv3+ http://www.gnu.org/licenses/agpl.txt
* @link https://github.com/flyve-mdm/glpi-plugin
* @link https://flyve-mdm.com/
* ------------------------------------------------------------------------------
*/

include ('../../../inc/includes.php');
$plugin = new Plugin();
if (!$plugin->isActivated('flyvemdm')) {
Html::displayNotFoundError();
}

Session::checkRight("flyvemdm:flyvemdm", PluginFlyvemdmProfile::RIGHT_FLYVEMDM_USE);
Session::checkRight("flyvemdm:fdroidapplication", READ);

Html::header(
PluginFlyvemdmFDroidApplication::getTypeName(Session::getPluralNumber()),
'',
'admin',
PluginFlyvemdmMenu::class,
'fdroid application'
);

$menu = new PluginFlyvemdmMenu();
$menu->displayMenu('mini');

Search::show(PluginFlyvemdmFDroidApplication::class);

Html::footer();
Loading