From 7e733f2322bce2b7505eba8dc114ef49c9eda107 Mon Sep 17 00:00:00 2001 From: moyooo Date: Tue, 24 Jan 2012 11:15:55 +0000 Subject: [PATCH] update headers git-svn-id: https://forge.glpi-project.org/svn/example/trunk@182 349b9182-4a13-0410-896f-e5e9767dd1b3 --- LISEZMOI.txt | 7 +- config.php | 7 +- front/dropdown.form.php | 7 +- front/dropdown.php | 7 +- front/example.php | 7 +- front/popup.php | 5 +- front/ruletest.form.php | 5 +- front/ruletest.php | 5 +- hook.php | 5 +- inc/dropdown.class.php | 7 +- inc/example.class.php | 7 +- inc/notificationtargetexample.class.php | 7 +- inc/ruletest.class.php | 5 +- inc/ruletestcollection.class.php | 5 +- locales/en_GB.php | 7 +- locales/fr_FR.php | 7 +- report.php | 7 +- setup.php | 7 +- stat.php | 7 +- tools/HEADER | 25 ++++++ tools/modify_headers.pl | 102 ++++++++++++++++++++++++ 21 files changed, 178 insertions(+), 70 deletions(-) create mode 100644 tools/HEADER create mode 100755 tools/modify_headers.pl diff --git a/LISEZMOI.txt b/LISEZMOI.txt index 1201d63..9e7824c 100755 --- a/LISEZMOI.txt +++ b/LISEZMOI.txt @@ -1,8 +1,8 @@ /* - * @version $Id: HEADER 10411 2010-02-09 07:58:26Z moyo $ + * @version $Id: HEADER 15930 2011-10-25 10:47:55Z jmd $ ------------------------------------------------------------------------- GLPI - Gestionnaire Libre de Parc Informatique - Copyright (C) 2003-2010 by the INDEPNET Development Team. + Copyright (C) 2003-2011 by the INDEPNET Development Team. http://indepnet.net/ http://glpi-project.org ------------------------------------------------------------------------- @@ -22,8 +22,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with GLPI; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + along with GLPI. If not, see . -------------------------------------------------------------------------- */ diff --git a/config.php b/config.php index a6a1360..fdec6c2 100755 --- a/config.php +++ b/config.php @@ -1,9 +1,9 @@ . -------------------------------------------------------------------------- */ diff --git a/front/dropdown.form.php b/front/dropdown.form.php index a44a13e..2fe80de 100644 --- a/front/dropdown.form.php +++ b/front/dropdown.form.php @@ -1,9 +1,9 @@ . -------------------------------------------------------------------------- */ diff --git a/front/dropdown.php b/front/dropdown.php index 63dc77a..12b10fb 100644 --- a/front/dropdown.php +++ b/front/dropdown.php @@ -1,9 +1,9 @@ . -------------------------------------------------------------------------- */ diff --git a/front/example.php b/front/example.php index 09b7aa9..e6163c0 100755 --- a/front/example.php +++ b/front/example.php @@ -1,9 +1,9 @@ . -------------------------------------------------------------------------- */ diff --git a/front/popup.php b/front/popup.php index a7b4179..3dedd86 100644 --- a/front/popup.php +++ b/front/popup.php @@ -3,7 +3,7 @@ * @version $Id$ ------------------------------------------------------------------------- GLPI - Gestionnaire Libre de Parc Informatique - Copyright (C) 2003-2010 by the INDEPNET Development Team. + Copyright (C) 2003-2011 by the INDEPNET Development Team. http://indepnet.net/ http://glpi-project.org ------------------------------------------------------------------------- @@ -23,8 +23,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with GLPI; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + along with GLPI. If not, see . -------------------------------------------------------------------------- */ diff --git a/front/ruletest.form.php b/front/ruletest.form.php index ee5b32d..3b7ee41 100644 --- a/front/ruletest.form.php +++ b/front/ruletest.form.php @@ -3,7 +3,7 @@ * @version $Id$ ------------------------------------------------------------------------- GLPI - Gestionnaire Libre de Parc Informatique - Copyright (C) 2003-2010 by the INDEPNET Development Team. + Copyright (C) 2003-2011 by the INDEPNET Development Team. http://indepnet.net/ http://glpi-project.org ------------------------------------------------------------------------- @@ -23,8 +23,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with GLPI; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + along with GLPI. If not, see . -------------------------------------------------------------------------- */ diff --git a/front/ruletest.php b/front/ruletest.php index 4032722..d8733e9 100644 --- a/front/ruletest.php +++ b/front/ruletest.php @@ -3,7 +3,7 @@ * @version $Id$ ------------------------------------------------------------------------- GLPI - Gestionnaire Libre de Parc Informatique - Copyright (C) 2003-2010 by the INDEPNET Development Team. + Copyright (C) 2003-2011 by the INDEPNET Development Team. http://indepnet.net/ http://glpi-project.org ------------------------------------------------------------------------- @@ -23,8 +23,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with GLPI; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + along with GLPI. If not, see . -------------------------------------------------------------------------- */ diff --git a/hook.php b/hook.php index 3cbd899..9092fde 100644 --- a/hook.php +++ b/hook.php @@ -3,7 +3,7 @@ * @version $Id$ ------------------------------------------------------------------------- GLPI - Gestionnaire Libre de Parc Informatique - Copyright (C) 2003-2010 by the INDEPNET Development Team. + Copyright (C) 2003-2011 by the INDEPNET Development Team. http://indepnet.net/ http://glpi-project.org ------------------------------------------------------------------------- @@ -23,8 +23,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with GLPI; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + along with GLPI. If not, see . -------------------------------------------------------------------------- */ diff --git a/inc/dropdown.class.php b/inc/dropdown.class.php index 739f7b3..e8370ac 100644 --- a/inc/dropdown.class.php +++ b/inc/dropdown.class.php @@ -1,9 +1,9 @@ . -------------------------------------------------------------------------- */ diff --git a/inc/example.class.php b/inc/example.class.php index d6a7255..a146366 100644 --- a/inc/example.class.php +++ b/inc/example.class.php @@ -1,9 +1,9 @@ . -------------------------------------------------------------------------- */ diff --git a/inc/notificationtargetexample.class.php b/inc/notificationtargetexample.class.php index deb21ac..56a3897 100644 --- a/inc/notificationtargetexample.class.php +++ b/inc/notificationtargetexample.class.php @@ -1,9 +1,9 @@ . -------------------------------------------------------------------------- */ diff --git a/inc/ruletest.class.php b/inc/ruletest.class.php index 84c1e40..dd66898 100644 --- a/inc/ruletest.class.php +++ b/inc/ruletest.class.php @@ -3,7 +3,7 @@ * @version $Id$ ------------------------------------------------------------------------- GLPI - Gestionnaire Libre de Parc Informatique - Copyright (C) 2003-2010 by the INDEPNET Development Team. + Copyright (C) 2003-2011 by the INDEPNET Development Team. http://indepnet.net/ http://glpi-project.org ------------------------------------------------------------------------- @@ -23,8 +23,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with GLPI; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + along with GLPI. If not, see . -------------------------------------------------------------------------- */ diff --git a/inc/ruletestcollection.class.php b/inc/ruletestcollection.class.php index ac4ef6d..b5718cc 100644 --- a/inc/ruletestcollection.class.php +++ b/inc/ruletestcollection.class.php @@ -3,7 +3,7 @@ * @version $Id$ ------------------------------------------------------------------------- GLPI - Gestionnaire Libre de Parc Informatique - Copyright (C) 2003-2010 by the INDEPNET Development Team. + Copyright (C) 2003-2011 by the INDEPNET Development Team. http://indepnet.net/ http://glpi-project.org ------------------------------------------------------------------------- @@ -23,8 +23,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with GLPI; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + along with GLPI. If not, see . -------------------------------------------------------------------------- */ diff --git a/locales/en_GB.php b/locales/en_GB.php index f1c841f..6c1875e 100644 --- a/locales/en_GB.php +++ b/locales/en_GB.php @@ -1,9 +1,9 @@ . -------------------------------------------------------------------------- */ diff --git a/locales/fr_FR.php b/locales/fr_FR.php index 21d70ea..49accf6 100644 --- a/locales/fr_FR.php +++ b/locales/fr_FR.php @@ -1,9 +1,9 @@ . -------------------------------------------------------------------------- */ diff --git a/report.php b/report.php index 8bef9a2..c9732e4 100644 --- a/report.php +++ b/report.php @@ -1,9 +1,9 @@ . -------------------------------------------------------------------------- */ diff --git a/setup.php b/setup.php index 7e3fd15..a1e0dc3 100755 --- a/setup.php +++ b/setup.php @@ -1,9 +1,9 @@ . -------------------------------------------------------------------------- */ diff --git a/stat.php b/stat.php index 0ccf52d..6c3a7cf 100644 --- a/stat.php +++ b/stat.php @@ -1,9 +1,9 @@ . -------------------------------------------------------------------------- */ diff --git a/tools/HEADER b/tools/HEADER new file mode 100644 index 0000000..409553f --- /dev/null +++ b/tools/HEADER @@ -0,0 +1,25 @@ + * @version $Id: HEADER 15930 2011-10-25 10:47:55Z jmd $ + ------------------------------------------------------------------------- + GLPI - Gestionnaire Libre de Parc Informatique + Copyright (C) 2003-2011 by the INDEPNET Development Team. + + http://indepnet.net/ http://glpi-project.org + ------------------------------------------------------------------------- + + LICENSE + + This file is part of GLPI. + + GLPI 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 2 of the License, or + (at your option) any later version. + + 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GLPI. If not, see . + -------------------------------------------------------------------------- diff --git a/tools/modify_headers.pl b/tools/modify_headers.pl new file mode 100755 index 0000000..71719e2 --- /dev/null +++ b/tools/modify_headers.pl @@ -0,0 +1,102 @@ +#!/usr/bin/perl +#!/usr/bin/perl -w + +# ---------------------------------------------------------------------- +# GLPI - Gestionnaire Libre de Parc Informatique +# Copyright (C) 2003-2006 by the INDEPNET Development Team. +# +# http://indepnet.net/ http://glpi-project.org +# ---------------------------------------------------------------------- +# +# LICENSE +# +# This file is part of GLPI. +# +# GLPI 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 2 of the License, or +# (at your option) any later version. +# +# 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GLPI; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# ------------------------------------------------------------------------ + + +do_dir(".."); + + +sub do_dir{ +local ($dir)=@_; +print "Entering $dir\n"; + +opendir(DIRHANDLE,$dir)||die "ERROR: can not read current directory\n"; +foreach (readdir(DIRHANDLE)){ + if ($_ ne '..' && $_ ne '.'){ + if (-d "$dir/$_"){ + if ($_ !~ m/.svn/i && $_ !~ m/CVS/i && $_ !~ m/lib/i){ + + do_dir("$dir/$_"); + } + } else { + if(!(-l "$dir/$_")){ + if ((index($_,".php",0)!=-1)||(index($_,".txt",0)!=-1)||(index($_,".css",0)!=-1)){ + do_file("$dir/$_"); + } + } + } + } +} +closedir DIRHANDLE; + +} + +sub do_file{ + local ($file)=@_; + print $file."\n"; + ### DELETE HEADERS + open(INIT_FILE,$file); + @lines=; + close(INIT_FILE); + + open(TMP_FILE,">/tmp/tmp_glpi.txt"); + + $status=''; + foreach (@lines){ + if ($_ =~ m/\*\//){ + $status="END"; + } + + if ($status =~ m/END/||$status !~ m/BEGIN/){ + print TMP_FILE $_; + } + + if ($status !~ m/END/){ + if ($_ =~ m/\/\*/){ + $status="BEGIN"; + ##### ADD NEW HEADERS + open(HEADER_FILE,"HEADER"); + @headers=; + foreach (@headers){ + print TMP_FILE $_; + } + close(HEADER_FILE) ; + + } + } + } + close(TMP_FILE); + + system("cp -f /tmp/tmp_glpi.txt $file"); + + + +} + + +