Qual: Move deprecated module postnuke to the secondary non official module repository.
This commit is contained in:
parent
80e2827db1
commit
43ed69ea8d
@ -31,7 +31,7 @@ PROJECT_NAME = dolibarr
|
|||||||
# This could be handy for archiving the generated documentation or
|
# This could be handy for archiving the generated documentation or
|
||||||
# if some version control system is used.
|
# 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)
|
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||||
# base path where the generated documentation will be put.
|
# base path where the generated documentation will be put.
|
||||||
|
|||||||
@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
@ -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>");
|
|
||||||
?>
|
|
||||||
@ -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>");
|
|
||||||
?>
|
|
||||||
@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
@ -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);
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
@ -138,11 +138,6 @@ function llxHeader($head = '', $title='', $help_url='')
|
|||||||
$menu->add(DOL_URL_ROOT."/domain/index.php", "Domaines");
|
$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))
|
if (! empty($conf->export->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("exports");
|
$langs->load("exports");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user