diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index 52f2040caff..01b39fadfb0 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -42,6 +42,8 @@ class modProjet extends DolibarrModules */ function __construct($db) { + global $conf; + $this->db = $db; $this->numero = 400; diff --git a/htdocs/webservices/admin/webservices.php b/htdocs/webservices/admin/webservices.php index 85fc5023455..dccfce8ed82 100644 --- a/htdocs/webservices/admin/webservices.php +++ b/htdocs/webservices/admin/webservices.php @@ -1,7 +1,8 @@ - * Copyright (C) 2005-2010 Laurent Destailleur - * Copyright (C) 2011 Juanjo Menent +/* Copyright (C) 2004 Rodolphe Quiedeville + * Copyright (C) 2005-2010 Laurent Destailleur + * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2012 Regis Houssin * * 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 @@ -28,10 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; $langs->load("admin"); -if (! $user->admin) accessforbidden(); +if (! $user->admin) + accessforbidden(); $actionsave=GETPOST("save"); -$mesg=''; // Sauvegardes parametres if ($actionsave) @@ -45,12 +46,12 @@ if ($actionsave) if ($i >= 1) { $db->commit(); - $mesg = "".$langs->trans("SetupSaved").""; + setEventMessage($langs->trans("SetupSaved")); } else { $db->rollback(); - $mesg = "".$langs->trans("Error").""; + setEventMessage($langs->trans("Error"), 'errors'); } } @@ -80,7 +81,10 @@ print ""; print ''; print ''.$langs->trans("KeyForWebServicesAccess").''; -print ''; +print ''; +if (! empty($conf->use_javascript_ajax)) + print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"'); +print ''; print ' '; print ''; @@ -92,8 +96,6 @@ print ''; print ''; -dol_htmloutput_mesg($mesg); - print '

'; @@ -154,7 +156,24 @@ print '
'; print '
'; print $langs->trans("OnlyActiveElementsAreShown", DOL_URL_ROOT.'/admin/modules.php'); -$db->close(); +if (! empty($conf->use_javascript_ajax)) +{ + print "\n".''; +} + llxFooter(); +$db->close(); ?>