Skip to content

Commit

Permalink
Add GPL V3 licence HEADER + tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe GODOT committed Nov 29, 2023
1 parent 1e7491f commit 530fa27
Show file tree
Hide file tree
Showing 10 changed files with 873 additions and 1 deletion.
675 changes: 675 additions & 0 deletions LICENSE.md

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions ajax/get_user_categories.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
<?php
/**
* ---------------------------------------------------------------------
* groupcategory is a plugin to customizes the list of accessible
* ticket categories for ticket requesters.
* ---------------------------------------------------------------------
* LICENSE
*
* This file is part of groupcategory.
*
* rgpdTools is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* rgpdTools 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Formcreator. If not, see <http://www.gnu.org/licenses/>.
* ---------------------------------------------------------------------
* @copyright Copyright © 2022-2023 probeSys'
* @license http://www.gnu.org/licenses/agpl.txt AGPLv3+
* @link https://github.com/Probesys/glpi-plugins-groupcategory
* @link https://plugins.glpi-project.org/#/plugin/groupcategory
* ---------------------------------------------------------------------
*/

if (defined('GLPI_USE_CSRF_CHECK')) {
$old_GLPI_USE_CSRF_CHECK = GLPI_USE_CSRF_CHECK;
Expand Down
5 changes: 5 additions & 0 deletions groupcategory.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
<compatibility>~10.0</compatibility>
<download_url>https://github.com/Probesys/glpi-plugins-groupcategory/releases/download/v1.5.0/groupcategory.tbz</download_url>
</version>
<version>
<num>1.5.1</num>
<compatibility>~10.0</compatibility>
<download_url>https://github.com/Probesys/glpi-plugins-groupcategory/releases/download/v1.5.1/groupcategory-1.5.1.tbz</download_url>
</version>
</versions>
<langs>
<lang>en_GB</lang>
Expand Down
28 changes: 28 additions & 0 deletions hook.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
<?php
/**
* ---------------------------------------------------------------------
* groupcategory is a plugin to customizes the list of accessible
* ticket categories for ticket requesters.
* ---------------------------------------------------------------------
* LICENSE
*
* This file is part of groupcategory.
*
* rgpdTools is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* rgpdTools 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Formcreator. If not, see <http://www.gnu.org/licenses/>.
* ---------------------------------------------------------------------
* @copyright Copyright © 2022-2023 probeSys'
* @license http://www.gnu.org/licenses/agpl.txt AGPLv3+
* @link https://github.com/Probesys/glpi-plugins-groupcategory
* @link https://plugins.glpi-project.org/#/plugin/groupcategory
* ---------------------------------------------------------------------
*/

/**
* Install the plugin
Expand Down
28 changes: 28 additions & 0 deletions inc/groupcategory.class.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
<?php
/**
* ---------------------------------------------------------------------
* groupcategory is a plugin to customizes the list of accessible
* ticket categories for ticket requesters.
* ---------------------------------------------------------------------
* LICENSE
*
* This file is part of groupcategory.
*
* rgpdTools is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* rgpdTools 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Formcreator. If not, see <http://www.gnu.org/licenses/>.
* ---------------------------------------------------------------------
* @copyright Copyright © 2022-2023 probeSys'
* @license http://www.gnu.org/licenses/agpl.txt AGPLv3+
* @link https://github.com/Probesys/glpi-plugins-groupcategory
* @link https://plugins.glpi-project.org/#/plugin/groupcategory
* ---------------------------------------------------------------------
*/

class PluginGroupcategoryGroupcategory extends CommonDBTM {

Expand Down
30 changes: 29 additions & 1 deletion setup.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,36 @@
<?php
/**
* ---------------------------------------------------------------------
* groupcategory is a plugin to customizes the list of accessible
* ticket categories for ticket requesters.
* ---------------------------------------------------------------------
* LICENSE
*
* This file is part of groupcategory.
*
* rgpdTools is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* rgpdTools 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Formcreator. If not, see <http://www.gnu.org/licenses/>.
* ---------------------------------------------------------------------
* @copyright Copyright © 2022-2023 probeSys'
* @license http://www.gnu.org/licenses/agpl.txt AGPLv3+
* @link https://github.com/Probesys/glpi-plugins-groupcategory
* @link https://plugins.glpi-project.org/#/plugin/groupcategory
* ---------------------------------------------------------------------
*/

// Version of the plugin

define('PLUGIN_GROUPCATEGORY_VERSION', '1.5');
define('PLUGIN_GROUPCATEGORY_VERSION', '1.5.1');
define('PLUGIN_GROUPCATEGORY_GLPI_MIN_VERSION', '9.4');
define('PLUGIN_GROUPCATEGORY_NAMESPACE', 'groupcategory');
// Maximum GLPI version, exclusive
Expand Down
26 changes: 26 additions & 0 deletions tools/HEADER
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---------------------------------------------------------------------
groupcategory is a plugin to customizes the list of accessible
ticket categories for ticket requesters.
---------------------------------------------------------------------
LICENSE

This file is part of groupcategory.

rgpdTools is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

rgpdTools 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 General Public License for more details.

You should have received a copy of the GNU General Public License
along with Formcreator. If not, see <http://www.gnu.org/licenses/>.
---------------------------------------------------------------------
@copyright Copyright © 2022-2023 probeSys'
@license http://www.gnu.org/licenses/agpl.txt AGPLv3+
@link https://github.com/Probesys/glpi-plugins-groupcategory
@link https://plugins.glpi-project.org/#/plugin/groupcategory
---------------------------------------------------------------------
10 changes: 10 additions & 0 deletions tools/extract_template.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

soft='GroupCategory'
version="$(grep PLUGIN_GROUPCATEGORY_VERSION setup.php |cut -f 4 -d\'|grep -v ^$)"
email=contact@probesys.com
copyright='PROBESYS'

# All strings to create pot
xgettext *.php */*.php -copyright-holder="$copyright" --package-name="$soft" --package-version="$version" --msgid-bugs-address="$email" -o locales/groupcategory.pot -L PHP --from-code=UTF-8 --force-po -i --keyword=_n:1,2 --keyword=__:1,2c --keyword=_e

15 changes: 15 additions & 0 deletions tools/po_merge_with_new_pot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
# -*- coding: UTF8 -*-

POTFILE="./projectbridge.pot"

if [ ! -f ${POTFILE} ]; then
echo "Error !!"
echo "POT file ${POTFILE} not found: exiting."
exit 1
fi

for file in $(ls -1 *po)
do
msgmerge -U --backup=none $file projectbridge.pot
done
29 changes: 29 additions & 0 deletions tools/update_mo.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/perl
#!/usr/bin/perl -w

if (@ARGV!=0){
print "USAGE update_mo.pl\n\n";

exit();
}


opendir(DIRHANDLE,'locales')||die "ERROR: can not read current directory\n";
foreach (readdir(DIRHANDLE)){
if ($_ ne '..' && $_ ne '.'){

if(!(-l "$dir/$_")){
if (index($_,".po",0)==length($_)-3) {
$lang=$_;
$lang=~s/\.po//;

`msgfmt locales/$_ -o locales/$lang.mo`;
}
}

}
}
closedir DIRHANDLE;

#
#

0 comments on commit 530fa27

Please sign in to comment.