Skip to content

Commit

Permalink
add informations for catalogue, fix #6
Browse files Browse the repository at this point in the history
  • Loading branch information
flegastelois committed Nov 18, 2016
1 parent 7093a4b commit ab88fac
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
*/
function plugin_useditemsexport_install() {

$migration = new Migration('1.0.0');
$migration = new Migration(PLUGIN_USEDITEMEXPORT_VERSION);

// Parse inc directory
foreach (glob(dirname(__FILE__).'/inc/*') as $filepath) {
Expand Down
Binary file added plugin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<root>
<name>Used items export</name>
<key>useditemsexport</key>
<state>stable</state>
<logo>https://raw.githubusercontent.com/pluginsGLPI/useditemsexport/master/plugin.png</logo>
<description>
<short>
<fr><![CDATA[Ce plugin permet d'exporter en PDF une liste des éléments utilisés par un utilisateur.]]></fr>
<en><![CDATA[This plugin allows you to export a PDF of the used items by a user.]]></en>
</short>
<long>
<fr><![CDATA[Ce plugin permet d'exporter en PDF une liste des éléments utilisés par un utilisateur.]]></fr>
<en><![CDATA[This plugin allows you to export a PDF of the used items by a user.]]></en>
</long>
</description>
<homepage>https://github.com/pluginsGLPI/useditemsexport</homepage>
<download>https://github.com/pluginsGLPI/useditemsexport/releases</download>
<issues>https://github.com/pluginsGLPI/useditemsexport/issues</issues>
<readme>https://raw.githubusercontent.com/pluginsGLPI/useditemsexport/master/README.md</readme>
<authors>
<author>TECLIB'</author>
</authors>
<versions>
<version>
<num>1.0.0</num>
<compatibility>0.90</compatibility>
<compatibility>9.1</compatibility>
</version>
</versions>
<langs>
<lang>fr_FR</lang>
<lang>en_GB</lang>
</langs>
<license>GPLv3</license>
<category></category>
<tags>
<fr>
<tag>parc</tag>
<tag>export</tag>
<tag>pdf</tag>
<tag>utilisateur</tag>
</fr>
<en>
<tag>asset</tag>
<tag>export</tag>
<tag>pdf</tag>
<tag>user</tag>
</en>
</tags>
<screenshots>
<screenshot>https://raw.githubusercontent.com/pluginsGLPI/useditemsexport/master/screenshots/fr_useditemsexport-tab.png</screenshot>
</screenshots>
</root>
Binary file added screenshots/fr_useditemsexport-tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 35 additions & 3 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,19 @@
--------------------------------------------------------------------------
*/

// Plugin version
define("PLUGIN_USEDITEMEXPORT_VERSION", "1.0.0");

// Minimal GLPI version, inclusive
define("PLUGIN_USEDITEMEXPORT_MIN_GLPI", "0.90");
// Maximum GLPI version, exclusive
define("PLUGIN_USEDITEMEXPORT_MAX_GLPI", "9.2");

/**
* Init hooks of the plugin.
* REQUIRED
*
* @return void
*/
function plugin_init_useditemsexport() {
global $PLUGIN_HOOKS, $CFG_GLPI;

Expand Down Expand Up @@ -72,6 +78,12 @@ function plugin_init_useditemsexport() {
}
}

/**
* Get the name and the version of the plugin
* REQUIRED
*
* @return array
*/
function plugin_version_useditemsexport() {

return array (
Expand All @@ -85,6 +97,12 @@ function plugin_version_useditemsexport() {
);
}

/**
* Check pre-requisites before install
* OPTIONNAL, but recommanded
*
* @return boolean
*/
function plugin_useditemsexport_check_prerequisites() {

if (version_compare(GLPI_VERSION, PLUGIN_USEDITEMEXPORT_MIN_GLPI,'lt')
Expand All @@ -106,7 +124,21 @@ function plugin_useditemsexport_check_prerequisites() {
return true;
}

function plugin_useditemsexport_check_config() {
/**
* Check configuration process
* OPTIONNAL, but recommanded
*
* @param boolean $verbose Whether to display message on failure. Defaults to false
*
* @return boolean
*/
function plugin_useditemsexport_check_config($verbose=false) {
if (true) { // Your configuration check
return true;
}

return true;
if ($verbose) {
_e('Installed / not configured', 'useditemsexport');
}
return false;
}

0 comments on commit ab88fac

Please sign in to comment.