diff --git a/build/phpstan/bootstrap.php b/build/phpstan/bootstrap.php new file mode 100644 index 00000000000..7f232860a2b --- /dev/null +++ b/build/phpstan/bootstrap.php @@ -0,0 +1,15 @@ +file->dol_document_root as $key => $dirroot) // ex: array("main"=>"/home/main/htdocs", "alt0"=>"/home/dirmod/htdocs", ...) + if (is_array($conf->file->dol_document_root)) { - if ($key == 'main') + foreach ($conf->file->dol_document_root as $key => $dirroot) // ex: array("main"=>"/home/main/htdocs", "alt0"=>"/home/dirmod/htdocs", ...) { - continue; - } - if (file_exists($dirroot.'/'.$path)) - { - $res=$dirroot.'/'.$path; - return $res; + if ($key == 'main') + { + continue; + } + if (file_exists($dirroot.'/'.$path)) + { + $res=$dirroot.'/'.$path; + return $res; + } } } if ($returnemptyifnotfound) // Not found into alternate dir diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index f195d5f945e..4f7776a3150 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1152,7 +1152,7 @@ function top_httphead($contenttype = 'text/html', $forcenocache = 0) $contentsecuritypolicy = $conf->global->MAIN_HTTP_CONTENT_SECURITY_POLICY; if (! is_object($hookmanager)) $hookmanager = new HookManager($db); - $hookmanager->initHooks("main"); + $hookmanager->initHooks(array("main")); $parameters=array('contentsecuritypolicy'=>$contentsecuritypolicy); $result=$hookmanager->executeHooks('setContentSecurityPolicy', $parameters); // Note that $action and $object may have been modified by some hooks @@ -1212,7 +1212,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr if (empty($disablehead)) { if (! is_object($hookmanager)) $hookmanager = new HookManager($db); - $hookmanager->initHooks("main"); + $hookmanager->initHooks(array("main")); $ext='layout='.$conf->browser->layout.'&version='.urlencode(DOL_VERSION); diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index 14b567a62e6..6f24471a295 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -20,7 +20,7 @@ */ /** - * \file class/societeaccount.class.php + * \file societe/class/societeaccount.class.php * \ingroup societe * \brief This file is a CRUD class file for SocieteAccount (Create/Read/Update/Delete) */ diff --git a/htdocs/societe/website.php b/htdocs/societe/website.php index 0a5c62b9afb..8f7c83dcef5 100644 --- a/htdocs/societe/website.php +++ b/htdocs/societe/website.php @@ -37,6 +37,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; $langs->loadLangs(array("companies","website")); +$action = GETPOST('action', 'aZ09')?GETPOST('action', 'aZ09'):'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... +$show_files = GETPOST('show_files', 'int'); +$contextpage= GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'myobjectlist'; // To manage different context of search +$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') + $search_status=GETPOST('search_status'); // Security check @@ -340,14 +346,14 @@ $objecttmp=new SocieteAccount($db); $trackid='thi'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; -if ($sall) +/*if ($sall) { foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); print '