From 43ed69ea8d3cb19bfa13d68c02efdedabfac9691 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@users.sourceforge.net> Date: Mon, 15 Jun 2009 17:20:19 +0000 Subject: [PATCH] Qual: Move deprecated module postnuke to the secondary non official module repository. --- doc/dev/dolibarr-doxygen.conf | 2 +- htdocs/includes/modules/modPostnuke.class.php | 99 ------------- htdocs/postnuke/articles/fiche.php | 133 ------------------ htdocs/postnuke/articles/index.php | 83 ----------- htdocs/postnuke/articles/pnarticle.class.php | 106 -------------- htdocs/postnuke/articles/pre.inc.php | 52 ------- htdocs/postnuke/index.php | 0 htdocs/pre.inc.php | 5 - 8 files changed, 1 insertion(+), 479 deletions(-) delete mode 100644 htdocs/includes/modules/modPostnuke.class.php delete mode 100644 htdocs/postnuke/articles/fiche.php delete mode 100644 htdocs/postnuke/articles/index.php delete mode 100644 htdocs/postnuke/articles/pnarticle.class.php delete mode 100644 htdocs/postnuke/articles/pre.inc.php delete mode 100644 htdocs/postnuke/index.php diff --git a/doc/dev/dolibarr-doxygen.conf b/doc/dev/dolibarr-doxygen.conf index 28e4b66755a..d0c613fe690 100644 --- a/doc/dev/dolibarr-doxygen.conf +++ b/doc/dev/dolibarr-doxygen.conf @@ -31,7 +31,7 @@ PROJECT_NAME = dolibarr # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.4.0 +PROJECT_NUMBER = 2.7.0 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/htdocs/includes/modules/modPostnuke.class.php b/htdocs/includes/modules/modPostnuke.class.php deleted file mode 100644 index 1222fc4a3ed..00000000000 --- a/htdocs/includes/modules/modPostnuke.class.php +++ /dev/null @@ -1,99 +0,0 @@ -<?php -/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net> - * - * This program 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. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/** \defgroup postnuke Module postnuke - \brief Module d'interfacage avec Postnuke - */ - -/** - \file htdocs/includes/modules/modPostnuke.class.php - \ingroup postnuke - \brief Fichier de description et activation du module Postnuke - \version $Id$ - */ - -include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); - - -/** - \class modPostnuke - \brief Classe de description et activation du module Postnuke - */ - -class modPostnuke extends DolibarrModules -{ - - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acces base - */ - function modPostnuke($DB) - { - $this->db = $DB ; - $this->numero = 210; - - $this->family = "technic"; - // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) - $this->name = eregi_replace('^mod','',get_class($this)); - $this->description = "Gestion de l'outil PostNuke"; - $this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version - $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); - $this->special = 1; - - // Data directories to create when module is enabled - $this->dirs = array(); - - // D�pendances - $this->depends = array(); - $this->requiredby = array(); - - // Constantes - $this->const = array(); - - // Boxes - $this->boxes = array(); - - // Permissions - $this->rights = array(); - $this->rights_class = 'postnuke'; - } - - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - $sql = array(); - - return $this->_init($sql); - } - - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); - - return $this->_remove($sql); - } -} -?> diff --git a/htdocs/postnuke/articles/fiche.php b/htdocs/postnuke/articles/fiche.php deleted file mode 100644 index 2bb6fd7ce72..00000000000 --- a/htdocs/postnuke/articles/fiche.php +++ /dev/null @@ -1,133 +0,0 @@ -<?php -/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> - * - * This program 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. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ - * - */ - -require("./pre.inc.php"); -require("./pnarticle.class.php"); - - -if ($action == 'update' && !$cancel) -{ - $article = new pnArticle($db); - - $article->titre = $_POST["titre"]; - $article->body = $_POST["body"]; - if ($article->update($id, $user)) - { - - } - else - { - $action = 'edit'; - } -} - -/* - * - * - */ - -llxHeader(); - -if ($id) -{ - $article = new pnArticle($db); - - if ($id) - { - $result = $article->fetch($id, 0); - } - - if ( $result ) - { - $htmls = new Form($db); - - - - if ($action == 'edit') - { - print_titre ("Edition de la fiche article"); - - print "<form action=\"$fiche.php?id=$id\" method=\"post\">\n"; - print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; - print "<input type=\"hidden\" name=\"action\" value=\"update\">"; - - print '<table border="1" width="100%" cellspacing="0" cellpadding="4">'; - print "<tr><td>Titre</td><td>$article->titre</td></tr>\n"; - print "<tr>"; - print '<td valign="top">'.$langs->trans("Description").'</td>'; - - print '<td valign="top" width="80%"><textarea name="body" rows="14" cols="60">'; - print str_replace("<br />","",$article->body); - print "</textarea></td></tr>"; - - print '<tr><td align="center" colspan="2"><input type="submit" value="'.$langs->trans("Save").'"> <input type="submit" value="'.$langs->trans("Cancel").'" name="cancel"></td></tr>'; - print "</form>"; - - - print '</table><hr>'; - - } - - /* - * Affichage - */ - print_fiche_titre('Fiche Article : '.$article->titre); - - print '<table class="border" width="100%">'; - - print "<tr><td>Titre</td><td>$article->titre</td></tr>\n"; - print "<tr><td>Titre</td><td>$article->body</td></tr>\n"; - - - print "</table>"; - } - else - { - print "Fetch failed"; - } - - - } - else - { - print "Error"; - } - - -/* ************************************************************************** */ -/* */ -/* Barre d'action */ -/* */ -/* ************************************************************************** */ - -print '<div class="tabsAction">'; -if ($action != 'create') -{ - print '<a class="butAction" href="fiche.php?action=edit&id='.$id.'">'.$langs->trans('Modify').'</a>'; -} -print '</div>'; - -$db->close(); - -llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>"); -?> diff --git a/htdocs/postnuke/articles/index.php b/htdocs/postnuke/articles/index.php deleted file mode 100644 index 35576a223d3..00000000000 --- a/htdocs/postnuke/articles/index.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php -/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> - * - * This program 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. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ - * - */ - -require("./pre.inc.php"); - -llxHeader(); - -if ($sortfield == "") -{ - $sortfield="lower(p.pn_title)"; -} -if ($sortorder == "") -{ - $sortorder="ASC"; -} - -if ($page == -1) { $page = 0 ; } -$limit = $conf->liste_limit; -$offset = $limit * $page ; - -print_barre_liste("Liste des articles", $page, "index.php", "", $sortfield, $sortorder, $form); - -$sql = "SELECT p.pn_sid, p.pn_title FROM " . PN_DB_NAME . "." . PN_TABLE_STORIES_NAME . " as p"; - -$sql .= " ORDER BY $sortfield $sortorder "; -$sql .= $db->plimit( $limit ,$offset); - -if ( $db->query($sql) ) -{ - $num = $db->num_rows(); - $i = 0; - print "<table class=\"noborder\" width=\"100%\">"; - print "<tr class=\"liste_titre\">"; - print_liste_field_titre($langs->trans("Ref"),"index.php", "p.pn_title"); - print '<td colspan="3"> </td>'; - print "</tr>\n"; - $var=True; - while ($i < $num) - { - $objp = $db->fetch_object(); - $var=!$var; - print "<tr $bc[$var]>"; - - print '<td><a href="fiche.php?id='.$objp->pn_sid.'"><img src="/theme/'.$conf->theme.'/img/filenew.png" border="0" alt="Fiche livre"></a> '; - - print "<a href=\"fiche.php?id=$objp->pn_sid\">$objp->pn_title</a></td>\n"; - print "<td width='70%'><a href=\"fiche.php?id=$objp->pn_sid\">$objp->title</a></td>\n"; - - print "</tr>\n"; - $i++; - } - print "</table>"; - $db->free(); -} -else -{ - dol_print_error($db); -} - -$db->close(); - -llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>"); -?> diff --git a/htdocs/postnuke/articles/pnarticle.class.php b/htdocs/postnuke/articles/pnarticle.class.php deleted file mode 100644 index 9afcddcbdd2..00000000000 --- a/htdocs/postnuke/articles/pnarticle.class.php +++ /dev/null @@ -1,106 +0,0 @@ -<?php -/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * - * This program 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. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ - * - */ - -class pnArticle { - var $db ; - - var $id ; - - var $titre; - var $body; - - function pnArticle($DB, $id=0) { - $this->db = $DB; - $this->id = $id ; - } - - /* - * - * - */ - function update($id, $user) - { - - if (strlen($this->annee)==0) - { - $this->annee = 0; - } - - $sql = "UPDATE ". PN_DB_NAME . "." . PN_TABLE_STORIES_NAME; - $sql .= " SET pn_hometext = '" . nl2br(trim($this->body)) ."'"; - //$sql .= ", pn_title = '" . trim($this->titre) ."'"; - - - $sql .= " WHERE pn_sid = " . $id; - - if ( $this->db->query($sql) ) - { - return 1; - } - else - { - print $this->db->error() . ' in ' . $sql; - } - } - /* - * - * - * - */ - function fetch ($id) { - - $sql = "SELECT p.pn_sid, p.pn_title, p.pn_hometext FROM " . PN_DB_NAME . "." . PN_TABLE_STORIES_NAME . " as p"; - - if ($id) - { - $sql .= " WHERE p.pn_sid = $id"; - } - - $result = $this->db->query($sql) ; - - if ( $result ) - { - $result = $this->db->fetch_array(); - - $this->id = $result["pn_id"]; - $this->titre = $result["pn_title"]; - $this->body = $result["pn_hometext"]; - - $this->db->free(); - } - else - { - print $this->db->error(); - } - - return $result; - } - - - /* - * - * - */ - - -} -?> diff --git a/htdocs/postnuke/articles/pre.inc.php b/htdocs/postnuke/articles/pre.inc.php deleted file mode 100644 index e0a4a0f5a0b..00000000000 --- a/htdocs/postnuke/articles/pre.inc.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * - * This program 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. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ - * - */ -require("../../main.inc.php"); - -function llxHeader($head = "", $urlp = "") { - global $user, $conf; - - /* - * - * - */ - top_menu($head); - - $menu = new Menu(); - - $menu->add(DOL_URL_ROOT."/boutique/livre/", "Livres"); - - $menu->add(DOL_URL_ROOT."/boutique/auteur/", "Auteurs"); - - $menu->add(DOL_URL_ROOT."/boutique/editeur/", "Editeurs"); - - $menu->add(DOL_URL_ROOT."/product/categorie/", "Cat�gories"); - - $menu->add(DOL_URL_ROOT."/product/promotion/", "Promotions"); - - if (defined("MAIN_MODULE_POSTNUKE") && MAIN_MODULE_POSTNUKE) - { - $menu->add(DOL_URL_ROOT."/postnuke/", "Editorial"); - } - - left_menu($menu->liste); -} -?> diff --git a/htdocs/postnuke/index.php b/htdocs/postnuke/index.php deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/pre.inc.php b/htdocs/pre.inc.php index 449b709b02f..ed9609a6aa8 100644 --- a/htdocs/pre.inc.php +++ b/htdocs/pre.inc.php @@ -138,11 +138,6 @@ function llxHeader($head = '', $title='', $help_url='') $menu->add(DOL_URL_ROOT."/domain/index.php", "Domaines"); } - if (! empty($conf->postnuke->enabled)) - { - $menu->add(DOL_URL_ROOT."/postnuke/articles/index.php", "Editorial"); - } - if (! empty($conf->export->enabled)) { $langs->load("exports"); -- GitLab