diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php index bbee20cd750..8c83c52a4bb 100644 --- a/htdocs/fourn/index.php +++ b/htdocs/fourn/index.php @@ -40,7 +40,7 @@ $result = restrictedArea($user, 'societe',$socid,''); /* - * Affichage page + * View */ $commandestatic=new CommandeFournisseur($db); @@ -54,10 +54,7 @@ print_fiche_titre($langs->trans("SuppliersArea")); print ''; print '
'; - -/* - * - */ +// Orders $commande = new CommandeFournisseur($db); $sql = "SELECT count(cf.rowid), fk_statut"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s,"; @@ -71,7 +68,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - print ''; + print '
'; print ''; print "\n"; $var=True; @@ -246,7 +243,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - print '
'.$langs->trans("Orders").''.$langs->trans("Nb").' 
'; + print '
'; print ''; print '\n"; print '\n"; diff --git a/htdocs/lib/databases/pgsql.lib.php b/htdocs/lib/databases/pgsql.lib.php index 0ca6eded899..aa5cc6dcfdc 100644 --- a/htdocs/lib/databases/pgsql.lib.php +++ b/htdocs/lib/databases/pgsql.lib.php @@ -244,7 +244,11 @@ class DoliDb } } - // Remove () in the tables in FROM + // Remove () in the tables in FROM if one table + $line=preg_replace('/FROM\s*\((([a-z_]+)\s+as\s+([a-z_]+)\s*)\)/i','FROM \\1',$line); + //print $line; + + // Remove () in the tables in FROM if two table //$line=preg_replace('/FROM\s*\((([a-z_]+)\s+as\s+([a-z_]+)\s*,\s*([a-z_]+)\s+as\s+([a-z_]+)\s*)\)/i','FROM \\1',$line); //print $line; diff --git a/htdocs/lib/usergroups.lib.php b/htdocs/lib/usergroups.lib.php index 061c40fa044..86666306f7d 100644 --- a/htdocs/lib/usergroups.lib.php +++ b/htdocs/lib/usergroups.lib.php @@ -156,7 +156,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) $var=!$var; print '
'.$langs->trans("BoxTitleLastSuppliers",min($max,$num))."'.$langs->trans("DateModification")."
'; - print ''; + print '
'; $handle=opendir($dirtheme); $i=0; while (($subdir = readdir($handle))!==false) diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index 13500b60180..3f1d410d35c 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -66,7 +66,7 @@ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t ON p.rowid = t.fk_projet"; $sql.= " WHERE p.entity = ".$conf->entity; if ($_REQUEST["mode"]=='mine') $sql.=' AND p.fk_user_resp='.$user->id; if ($socid) $sql.= " AND p.fk_soc = ".$socid; -$sql.= " GROUP BY p.rowid"; +$sql.= " GROUP BY p.title, p.rowid"; $var=true; $resql = $db->query($sql); @@ -111,7 +111,7 @@ if (!$user->rights->societe->client->voir && !$socid) $sql.= " LEFT JOIN ".MAIN_ $sql.= " WHERE p.entity = ".$conf->entity; if ($_REQUEST["mode"]=='mine') $sql.=' AND p.fk_user_resp='.$user->id; if ($socid) $sql.= " AND s.rowid = ".$socid; -$sql.= " GROUP BY s.nom"; +$sql.= " GROUP BY s.nom, s.rowid"; //$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset); $var=true; diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 514b3553a1a..16356550da2 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2009 Laurent Destailleur * * 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