From 9da87247145f90e76e020ccfe275b8a2b2dd2cac Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Feb 2010 15:13:27 +0000 Subject: [PATCH] Qual: Clean a lot of code to prepare remove of pre.inc.php --- dev/skeletons/pre.inc.php | 58 --------------------------------- dev/skeletons/skeleton_page.php | 9 +++-- 2 files changed, 6 insertions(+), 61 deletions(-) delete mode 100644 dev/skeletons/pre.inc.php diff --git a/dev/skeletons/pre.inc.php b/dev/skeletons/pre.inc.php deleted file mode 100644 index fe85b7c8f79..00000000000 --- a/dev/skeletons/pre.inc.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * 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. - */ - -/** - * \file htdocs/dev/skeletons/pre.inc.php - * \brief File to manage left menu by default - * \version $Id$ - */ - -// Include environment and check authentification -require ("../../main.inc.php"); // This include must use a relative link to the main.inc.php file - - -/** - * \brief Function called by page to show menus (top and left) - * \param head Text to show as head line - * \param title Not used - * \param helppagename Name of a help page ('' by default). - * Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage - * For other external page: http://server/url - */ -function llxHeader($head = '', $title='', $help_url='') -{ - global $user, $conf, $langs; - - top_menu($head, $title); - - $menu = new Menu(); - - // Create default menu. - - // No code here is required if you already added menu entries in - // the module descriptor (recommanded). - // If not you must manually add menu entries here (not recommanded). - /* - $langs->load("mylangfile"); - $menu->add(DOL_URL_ROOT."/mylink.php", $langs->trans("MyMenuLabel")); - } - */ - - left_menu($menu->liste, $help_url); -} -?> diff --git a/dev/skeletons/skeleton_page.php b/dev/skeletons/skeleton_page.php index 7e2317627eb..1805aa2f3d7 100644 --- a/dev/skeletons/skeleton_page.php +++ b/dev/skeletons/skeleton_page.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2007-2010 Laurent Destailleur * Copyright (C) ---Put here your own copyright and developer email--- * * This program is free software; you can redistribute it and/or modify @@ -25,8 +25,11 @@ * \author Put author name here * \remarks Put here some comments */ -require("./pre.inc.php"); -require_once(DOL_DOCUMENT_ROOT."/../dev/skeletons/skeleton_class.class.php"); + +// Change this following line to use the correct relative path (../, ../../, etc) +require("../main.inc.php"); +// Change this following line to use the correct relative path from htdocs (do not remove DOL_DOCUMENT_ROOT) +require_once(DOL_DOCUMENT_ROOT."/skeleton/skeleton_class.class.php"); // Load traductions files requiredby by page $langs->load("companies");