Skip to content

Commit 530fa27

Browse files
author
Philippe GODOT
committed
Add GPL V3 licence HEADER + tools
1 parent 1e7491f commit 530fa27

File tree

10 files changed

+873
-1
lines changed

10 files changed

+873
-1
lines changed

LICENSE.md

Lines changed: 675 additions & 0 deletions
Large diffs are not rendered by default.

ajax/get_user_categories.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,32 @@
11
<?php
2+
/**
3+
* ---------------------------------------------------------------------
4+
* groupcategory is a plugin to customizes the list of accessible
5+
* ticket categories for ticket requesters.
6+
* ---------------------------------------------------------------------
7+
* LICENSE
8+
*
9+
* This file is part of groupcategory.
10+
*
11+
* rgpdTools is free software; you can redistribute it and/or modify
12+
* it under the terms of the GNU General Public License as published by
13+
* the Free Software Foundation; either version 3 of the License, or
14+
* (at your option) any later version.
15+
*
16+
* rgpdTools is distributed in the hope that it will be useful,
17+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
* GNU General Public License for more details.
20+
*
21+
* You should have received a copy of the GNU General Public License
22+
* along with Formcreator. If not, see <http://www.gnu.org/licenses/>.
23+
* ---------------------------------------------------------------------
24+
* @copyright Copyright © 2022-2023 probeSys'
25+
* @license http://www.gnu.org/licenses/agpl.txt AGPLv3+
26+
* @link https://github.com/Probesys/glpi-plugins-groupcategory
27+
* @link https://plugins.glpi-project.org/#/plugin/groupcategory
28+
* ---------------------------------------------------------------------
29+
*/
230

331
if (defined('GLPI_USE_CSRF_CHECK')) {
432
$old_GLPI_USE_CSRF_CHECK = GLPI_USE_CSRF_CHECK;

groupcategory.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@
4646
<compatibility>~10.0</compatibility>
4747
<download_url>https://github.com/Probesys/glpi-plugins-groupcategory/releases/download/v1.5.0/groupcategory.tbz</download_url>
4848
</version>
49+
<version>
50+
<num>1.5.1</num>
51+
<compatibility>~10.0</compatibility>
52+
<download_url>https://github.com/Probesys/glpi-plugins-groupcategory/releases/download/v1.5.1/groupcategory-1.5.1.tbz</download_url>
53+
</version>
4954
</versions>
5055
<langs>
5156
<lang>en_GB</lang>

hook.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,32 @@
11
<?php
2+
/**
3+
* ---------------------------------------------------------------------
4+
* groupcategory is a plugin to customizes the list of accessible
5+
* ticket categories for ticket requesters.
6+
* ---------------------------------------------------------------------
7+
* LICENSE
8+
*
9+
* This file is part of groupcategory.
10+
*
11+
* rgpdTools is free software; you can redistribute it and/or modify
12+
* it under the terms of the GNU General Public License as published by
13+
* the Free Software Foundation; either version 3 of the License, or
14+
* (at your option) any later version.
15+
*
16+
* rgpdTools is distributed in the hope that it will be useful,
17+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
* GNU General Public License for more details.
20+
*
21+
* You should have received a copy of the GNU General Public License
22+
* along with Formcreator. If not, see <http://www.gnu.org/licenses/>.
23+
* ---------------------------------------------------------------------
24+
* @copyright Copyright © 2022-2023 probeSys'
25+
* @license http://www.gnu.org/licenses/agpl.txt AGPLv3+
26+
* @link https://github.com/Probesys/glpi-plugins-groupcategory
27+
* @link https://plugins.glpi-project.org/#/plugin/groupcategory
28+
* ---------------------------------------------------------------------
29+
*/
230

331
/**
432
* Install the plugin

inc/groupcategory.class.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,32 @@
11
<?php
2+
/**
3+
* ---------------------------------------------------------------------
4+
* groupcategory is a plugin to customizes the list of accessible
5+
* ticket categories for ticket requesters.
6+
* ---------------------------------------------------------------------
7+
* LICENSE
8+
*
9+
* This file is part of groupcategory.
10+
*
11+
* rgpdTools is free software; you can redistribute it and/or modify
12+
* it under the terms of the GNU General Public License as published by
13+
* the Free Software Foundation; either version 3 of the License, or
14+
* (at your option) any later version.
15+
*
16+
* rgpdTools is distributed in the hope that it will be useful,
17+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
* GNU General Public License for more details.
20+
*
21+
* You should have received a copy of the GNU General Public License
22+
* along with Formcreator. If not, see <http://www.gnu.org/licenses/>.
23+
* ---------------------------------------------------------------------
24+
* @copyright Copyright © 2022-2023 probeSys'
25+
* @license http://www.gnu.org/licenses/agpl.txt AGPLv3+
26+
* @link https://github.com/Probesys/glpi-plugins-groupcategory
27+
* @link https://plugins.glpi-project.org/#/plugin/groupcategory
28+
* ---------------------------------------------------------------------
29+
*/
230

331
class PluginGroupcategoryGroupcategory extends CommonDBTM {
432

setup.php

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,36 @@
11
<?php
2+
/**
3+
* ---------------------------------------------------------------------
4+
* groupcategory is a plugin to customizes the list of accessible
5+
* ticket categories for ticket requesters.
6+
* ---------------------------------------------------------------------
7+
* LICENSE
8+
*
9+
* This file is part of groupcategory.
10+
*
11+
* rgpdTools is free software; you can redistribute it and/or modify
12+
* it under the terms of the GNU General Public License as published by
13+
* the Free Software Foundation; either version 3 of the License, or
14+
* (at your option) any later version.
15+
*
16+
* rgpdTools is distributed in the hope that it will be useful,
17+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
* GNU General Public License for more details.
20+
*
21+
* You should have received a copy of the GNU General Public License
22+
* along with Formcreator. If not, see <http://www.gnu.org/licenses/>.
23+
* ---------------------------------------------------------------------
24+
* @copyright Copyright © 2022-2023 probeSys'
25+
* @license http://www.gnu.org/licenses/agpl.txt AGPLv3+
26+
* @link https://github.com/Probesys/glpi-plugins-groupcategory
27+
* @link https://plugins.glpi-project.org/#/plugin/groupcategory
28+
* ---------------------------------------------------------------------
29+
*/
230

331
// Version of the plugin
432

5-
define('PLUGIN_GROUPCATEGORY_VERSION', '1.5');
33+
define('PLUGIN_GROUPCATEGORY_VERSION', '1.5.1');
634
define('PLUGIN_GROUPCATEGORY_GLPI_MIN_VERSION', '9.4');
735
define('PLUGIN_GROUPCATEGORY_NAMESPACE', 'groupcategory');
836
// Maximum GLPI version, exclusive

tools/HEADER

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---------------------------------------------------------------------
2+
groupcategory is a plugin to customizes the list of accessible
3+
ticket categories for ticket requesters.
4+
---------------------------------------------------------------------
5+
LICENSE
6+
7+
This file is part of groupcategory.
8+
9+
rgpdTools is free software; you can redistribute it and/or modify
10+
it under the terms of the GNU General Public License as published by
11+
the Free Software Foundation; either version 3 of the License, or
12+
(at your option) any later version.
13+
14+
rgpdTools is distributed in the hope that it will be useful,
15+
but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
GNU General Public License for more details.
18+
19+
You should have received a copy of the GNU General Public License
20+
along with Formcreator. If not, see <http://www.gnu.org/licenses/>.
21+
---------------------------------------------------------------------
22+
@copyright Copyright © 2022-2023 probeSys'
23+
@license http://www.gnu.org/licenses/agpl.txt AGPLv3+
24+
@link https://github.com/Probesys/glpi-plugins-groupcategory
25+
@link https://plugins.glpi-project.org/#/plugin/groupcategory
26+
---------------------------------------------------------------------

tools/extract_template.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
soft='GroupCategory'
4+
version="$(grep PLUGIN_GROUPCATEGORY_VERSION setup.php |cut -f 4 -d\'|grep -v ^$)"
5+
6+
copyright='PROBESYS'
7+
8+
# All strings to create pot
9+
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
10+

tools/po_merge_with_new_pot.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
# -*- coding: UTF8 -*-
3+
4+
POTFILE="./projectbridge.pot"
5+
6+
if [ ! -f ${POTFILE} ]; then
7+
echo "Error !!"
8+
echo "POT file ${POTFILE} not found: exiting."
9+
exit 1
10+
fi
11+
12+
for file in $(ls -1 *po)
13+
do
14+
msgmerge -U --backup=none $file projectbridge.pot
15+
done

tools/update_mo.pl

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/perl
2+
#!/usr/bin/perl -w
3+
4+
if (@ARGV!=0){
5+
print "USAGE update_mo.pl\n\n";
6+
7+
exit();
8+
}
9+
10+
11+
opendir(DIRHANDLE,'locales')||die "ERROR: can not read current directory\n";
12+
foreach (readdir(DIRHANDLE)){
13+
if ($_ ne '..' && $_ ne '.'){
14+
15+
if(!(-l "$dir/$_")){
16+
if (index($_,".po",0)==length($_)-3) {
17+
$lang=$_;
18+
$lang=~s/\.po//;
19+
20+
`msgfmt locales/$_ -o locales/$lang.mo`;
21+
}
22+
}
23+
24+
}
25+
}
26+
closedir DIRHANDLE;
27+
28+
#
29+
#

0 commit comments

Comments
 (0)