'."\n";
$parameters = array();
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
if (empty($reshook))
{
- print '
'."\n";
}
- if (! empty($debuginfo))
+ if (!empty($debuginfo))
{
print info_admin($debuginfo);
}
diff --git a/htdocs/admin/system/xcache.php b/htdocs/admin/system/xcache.php
index 0cca1b94fc4..5061305f2e2 100644
--- a/htdocs/admin/system/xcache.php
+++ b/htdocs/admin/system/xcache.php
@@ -41,7 +41,7 @@ print " \n";
if (!function_exists('xcache_info'))
{
- print 'XCache seems to be not installed. Function xcache_info not found.';
+ print 'XCache seems to be not installed. Function xcache_info not found.';
llxFooter();
exit;
}
diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php
index ddde75ee463..1f6966fcd15 100644
--- a/htdocs/asset/card.php
+++ b/htdocs/asset/card.php
@@ -39,25 +39,25 @@ $cancel = GETPOST('cancel', 'aZ09');
$backtopage = GETPOST('backtopage', 'alpha');
// Initialize technical objects
-$object=new Asset($db);
+$object = new Asset($db);
$extrafields = new ExtraFields($db);
-$diroutputmassaction=$conf->asset->dir_output . '/temp/massgeneration/'.$user->id;
-$hookmanager->initHooks(array('assetcard')); // Note that conf->hooks_modules contains array
+$diroutputmassaction = $conf->asset->dir_output.'/temp/massgeneration/'.$user->id;
+$hookmanager->initHooks(array('assetcard')); // Note that conf->hooks_modules contains array
// Fetch optionals attributes and labels
$extrafields->fetch_name_optionals_label($object->table_element);
-$search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
+$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
// Initialize array of search criterias
-$search_all=trim(GETPOST("search_all", 'alpha'));
-$search=array();
-foreach($object->fields as $key => $val)
+$search_all = trim(GETPOST("search_all", 'alpha'));
+$search = array();
+foreach ($object->fields as $key => $val)
{
- if (GETPOST('search_'.$key, 'alpha')) $search[$key]=GETPOST('search_'.$key, 'alpha');
+ if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha');
}
-if (empty($action) && empty($id) && empty($ref)) $action='view';
+if (empty($action) && empty($id) && empty($ref)) $action = 'view';
// Security check - Protection if external user
//if ($user->socid > 0) access_forbidden();
@@ -65,11 +65,11 @@ if (empty($action) && empty($id) && empty($ref)) $action='view';
//$result = restrictedArea($user, 'asset', $id);
// Load object
-include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
-$permissionnote=$user->rights->asset->write; // Used by the include of actions_setnotes.inc.php
-$permissiondellink=$user->rights->asset->write; // Used by the include of actions_dellink.inc.php
-$permissiontoadd=$user->rights->asset->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
+$permissionnote = $user->rights->asset->write; // Used by the include of actions_setnotes.inc.php
+$permissiondellink = $user->rights->asset->write; // Used by the include of actions_dellink.inc.php
+$permissiontoadd = $user->rights->asset->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
/*
@@ -78,13 +78,13 @@ $permissiontoadd=$user->rights->asset->write; // Used by the include of actions
* Put here all code to do according to value of "action" parameter
*/
-$parameters=array();
-$reshook=$hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
+$parameters = array();
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
if (empty($reshook))
{
- $error=0;
+ $error = 0;
$permissiontoadd = $user->rights->asset->create;
$permissiontodelete = $user->rights->asset->delete;
@@ -97,9 +97,9 @@ if (empty($reshook))
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
// Actions to send emails
- $trigger_name='ASSET_SENTBYMAIL';
- $autocopy='MAIN_MAIL_AUTOCOPY_ASSET_TO';
- $trackid='asset'.$object->id;
+ $trigger_name = 'ASSET_SENTBYMAIL';
+ $autocopy = 'MAIN_MAIL_AUTOCOPY_ASSET_TO';
+ $trackid = 'asset'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
}
@@ -112,11 +112,11 @@ if (empty($reshook))
* Put here all code to build page
*/
-$form=new Form($db);
-$formfile=new FormFile($db);
+$form = new Form($db);
+$formfile = new FormFile($db);
-$title=$langs->trans("Assets").' - '.$langs->trans("Card");
-$help_url='';
+$title = $langs->trans("Assets").' - '.$langs->trans("Card");
+$help_url = '';
llxHeader('', $title, $help_url);
// Example : Adding jquery code
@@ -150,10 +150,10 @@ if ($action == 'create')
print '
'."\n";
// Common attributes
- include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_add.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php';
// Other attributes
- include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_add.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
print '
';
print '';
print ' ';
- print ''; // Cancel for create does not post form if we don't know the backtopage
+ print ''; // Cancel for create does not post form if we don't know the backtopage
print '
'."\n";
// Common attributes
- include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_edit.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php';
// Other attributes
- include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_edit.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
print '