Minor fix

This commit is contained in:
Laurent Destailleur 2009-01-12 15:35:06 +00:00
parent 0977e479cc
commit 4e01c23974
7 changed files with 20 additions and 11 deletions

View File

@ -1,7 +1,7 @@
<?php <?php
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org> /* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
* Copyright (C) 2005 Éric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2005 Éric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2006-2008 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com> * Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
* Copyright (C) 2005-2008 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2008 Regis Houssin <regis@dolibarr.fr>
* *
@ -29,20 +29,21 @@
require("./pre.inc.php"); require("./pre.inc.php");
$type=$_GET['type']; $type=isset($_GET['type'])?$_GET['type']:$_POST['type'];
if (!$user->rights->categorie->lire) accessforbidden(); if (!$user->rights->categorie->lire) accessforbidden();
/**
* Affichage page accueil /*
* View
*/ */
$c = new Categorie($db); $c = new Categorie($db);
$html = new Form($db); $html = new Form($db);
if (! $type) $title=$langs->trans("ProductsCategoriesArea"); if ($type == 0) $title=$langs->trans("ProductsCategoriesArea");
if ($type == 1) $title=$langs->trans("SuppliersCategoriesArea"); if ($type == 1) $title=$langs->trans("SuppliersCategoriesArea");
if ($type == 2) $title=$langs->trans("CustomersCategoriesArea"); if ($type == 2) $title=$langs->trans("CustomersCategoriesArea");
@ -59,8 +60,8 @@ print '<tr><td valign="top" width="30%" class="notopnoleft">';
/* /*
* Zone recherche produit/service * Zone recherche produit/service
*/ */
print '<form method="post" action="index.php?type='.$_GET['type'].'">'; print '<form method="post" action="index.php?type='.$type.'">';
print '<input type="hidden" name="type" value="'.$_GET['type'].'">'; print '<input type="hidden" name="type" value="'.$type.'">';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="3">'.$langs->trans("Search").'</td>'; print '<td colspan="3">'.$langs->trans("Search").'</td>';
@ -118,7 +119,6 @@ $cate_arbo = $c->get_full_arbo($_GET['type']);
* Catégories en javascript * Catégories en javascript
*/ */
if ($conf->use_javascript_ajax) if ($conf->use_javascript_ajax)
{ {
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
@ -127,12 +127,12 @@ if ($conf->use_javascript_ajax)
if ($_GET["expand"] != 'all') if ($_GET["expand"] != 'all')
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?expand=all&type='.$_GET['type'].'">'.$langs->trans("ExpandAll").'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?expand=all&type='.$_GET['type'].'">'.$langs->trans("ExpandAll").'</a>';
print '</td><td width="18"><img border="0" src="'.DOL_URL_ROOT.'/includes/treemenu/images/folder-expanded.gif">'; print '</td><td width="18"><img border="0" src="'.DOL_URL_ROOT.'/theme/common/treemenu/folder-expanded.gif">';
} }
if ($_GET["expand"] && $_GET["expand"] != 'none') if ($_GET["expand"] && $_GET["expand"] != 'none')
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?expand=none&type='.$_GET['type'].'">'.$langs->trans("UndoExpandAll").'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?expand=none&type='.$_GET['type'].'">'.$langs->trans("UndoExpandAll").'</a>';
print '</td><td width="18"><img border="0" src="'.DOL_URL_ROOT.'/includes/treemenu/images/folder.gif">'; print '</td><td width="18"><img border="0" src="'.DOL_URL_ROOT.'/theme/common/treemenu/folder.gif">';
} }
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';

View File

@ -109,6 +109,7 @@ print '<table border="0" width="100%" class="border">';
print '<tr><td width="20%" class="notopnoleft">'; print '<tr><td width="20%" class="notopnoleft">';
$ways = $c->print_all_ways (); $ways = $c->print_all_ways ();
print $langs->trans("Ref").'</td><td>'; print $langs->trans("Ref").'</td><td>';
print '<a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("Root").'</a> >> ';
foreach ($ways as $way) foreach ($ways as $way)
{ {
print $way."<br />\n"; print $way."<br />\n";

View File

@ -47,7 +47,9 @@ class Conf
var $monnaie; // Used to store current currency var $monnaie; // Used to store current currency
var $css; // Used to store current css (from theme) var $css; // Used to store current css (from theme)
var $top_menu;
var $left_menu;
var $css_modules=array(); var $css_modules=array();
var $tabs_modules=array(); var $tabs_modules=array();

View File

@ -464,6 +464,7 @@ ForCustomer=For customer
Signature=Signature Signature=Signature
HidePassword=Show command with password hidden HidePassword=Show command with password hidden
UnHidePassword=Show real command with clear password UnHidePassword=Show real command with clear password
Root=Root
# Week day # Week day
Monday=Monday Monday=Monday
Tuesday=Tuesday Tuesday=Tuesday

View File

@ -465,6 +465,7 @@ ForCustomer=Pour le client
Signature=Sign Signature=Sign
HidePassword=Afficher commande avec mot de passe masqué HidePassword=Afficher commande avec mot de passe masqué
UnHidePassword=Afficher commande réelle avec mot de passe en clair UnHidePassword=Afficher commande réelle avec mot de passe en clair
Root=Racine
# Week day # Week day
Monday=Lundi Monday=Lundi
Tuesday=Mardi Tuesday=Mardi

View File

@ -1572,6 +1572,7 @@ function dol_print_error($db='',$error='')
print "<b>".$langs->trans("Server").":</b> ".$_SERVER["SERVER_SOFTWARE"]."<br>\n";; print "<b>".$langs->trans("Server").":</b> ".$_SERVER["SERVER_SOFTWARE"]."<br>\n";;
print "<b>".$langs->trans("RequestedUrl").":</b> ".$_SERVER["REQUEST_URI"]."<br>\n";; print "<b>".$langs->trans("RequestedUrl").":</b> ".$_SERVER["REQUEST_URI"]."<br>\n";;
print "<b>".$langs->trans("Referer").":</b> ".$_SERVER["HTTP_REFERER"]."<br>\n";; print "<b>".$langs->trans("Referer").":</b> ".$_SERVER["HTTP_REFERER"]."<br>\n";;
print "<b>".$langs->trans("MenuManager").":</b> ".$conf->left_menu.'/'.$conf->top_menu."<br>\n";
$syslog.="url=".$_SERVER["REQUEST_URI"]; $syslog.="url=".$_SERVER["REQUEST_URI"];
$syslog.=", query_string=".$_SERVER["QUERY_STRING"]; $syslog.=", query_string=".$_SERVER["QUERY_STRING"];
} }

View File

@ -309,6 +309,9 @@ class Task // extends CommonObject
global $conf, $langs; global $conf, $langs;
$error=0; $error=0;
// TODO. Refused if there is some child.
$sql = "DELETE FROM ".MAIN_DB_PREFIX."projet_task"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."projet_task";
$sql.= " WHERE rowid=".$this->id; $sql.= " WHERE rowid=".$this->id;