diff --git a/out/out.CategoryChooser.php b/out/out.CategoryChooser.php index b690ffa78..9e77d3dd1 100644 --- a/out/out.CategoryChooser.php +++ b/out/out.CategoryChooser.php @@ -18,7 +18,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -if(!isset($settings)) +if (!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.Utils.php"); require_once("inc/inc.LogInit.php"); @@ -35,7 +35,7 @@ $categories = $dms->getDocumentCategories(); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); -if($view) { +if ($view) { $view->setParam('categories', $categories); $view->setParam('form', $form); $view->setParam('selcats', $selcats); diff --git a/out/out.Charts.php b/out/out.Charts.php index 7f7ae116f..6988c4fab 100644 --- a/out/out.Charts.php +++ b/out/out.Charts.php @@ -17,7 +17,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -if(!isset($settings)) +if (!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.Utils.php"); require_once("inc/inc.LogInit.php"); @@ -32,24 +32,24 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); $accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings); if (!$user->isAdmin()) { - UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); + UI::exitError(getMLText("admin_tools"), getMLText("access_denied")); } $type = 'docsperuser'; -if(!empty($_GET['type'])) { +if (!empty($_GET['type'])) { $type = $_GET['type']; } -if($data = $dms->getStatisticalData($type)) { - switch($type) { - case 'docsperstatus': - foreach($data as &$rec) { - $rec['key'] = getOverallStatusText((int) $rec['key']); - } - break; +if ($data = $dms->getStatisticalData($type)) { + switch ($type) { + case 'docsperstatus': + foreach ($data as &$rec) { + $rec['key'] = getOverallStatusText((int) $rec['key']); + } + break; } } -if($view) { +if ($view) { $view->setParam('type', $type); $view->setParam('data', $data); $view->setParam('accessobject', $accessop); diff --git a/out/out.ErrorDlg.php b/out/out.ErrorDlg.php index 4f2744e20..ea744fbc5 100644 --- a/out/out.ErrorDlg.php +++ b/out/out.ErrorDlg.php @@ -22,7 +22,7 @@ // This file is needed because SeedDMS_View_Bootstrap::htmlEndPage() includes // a file out/out.ErrorDlg.php?action=webrootjs and out/out.ErrorDlg.php?action=footerjs -if(!isset($settings)) +if (!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.Utils.php"); require_once("inc/inc.LogInit.php"); @@ -35,7 +35,7 @@ require_once("inc/inc.ClassUI.php"); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms)); -if($view) { +if ($view) { $view($_GET); exit; } diff --git a/out/out.FolderChooser.php b/out/out.FolderChooser.php index 1cf5b27e2..0837eff4e 100644 --- a/out/out.FolderChooser.php +++ b/out/out.FolderChooser.php @@ -18,7 +18,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -if(!isset($settings)) +if (!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.Utils.php"); require_once("inc/inc.LogInit.php"); @@ -29,8 +29,8 @@ require_once("inc/inc.DBInit.php"); require_once("inc/inc.ClassUI.php"); require_once("inc/inc.Authentication.php"); -if(isset($_GET['action']) && $_GET['action'] == 'subtree') { - if (!isset($_GET["node"]) || !is_numeric($_GET["node"]) || intval($_GET["node"])<1) { +if (isset($_GET['action']) && $_GET['action'] == 'subtree') { + if (!isset($_GET["node"]) || !is_numeric($_GET["node"]) || intval($_GET["node"]) < 1) { $node = $dms->getRootFolder(); } else { $node = $dms->getFolder(intval($_GET["node"])); @@ -47,9 +47,9 @@ if(isset($_GET['action']) && $_GET['action'] == 'subtree') { $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'rootfolderid'=>$settings->_rootFolderID)); -if($view) { +if ($view) { $view->setParam('orderby', $settings->_sortFoldersDefault); - if(isset($_GET['action']) && $_GET['action'] == 'subtree') { + if (isset($_GET['action']) && $_GET['action'] == 'subtree') { $view->setParam('node', $node); } else { $view->setParam('form', $form); diff --git a/out/out.GroupMgr.php b/out/out.GroupMgr.php index 48c0f67d9..04faff202 100644 --- a/out/out.GroupMgr.php +++ b/out/out.GroupMgr.php @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -if(!isset($settings)) +if (!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.Utils.php"); require_once("inc/inc.LogInit.php"); @@ -34,26 +34,26 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); $accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings); if (!$user->isAdmin()) { - UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); + UI::exitError(getMLText("admin_tools"), getMLText("access_denied")); } $allUsers = $dms->getAllUsers($settings->_sortUsersInList); if (is_bool($allUsers)) { - UI::exitError(getMLText("admin_tools"),getMLText("internal_error")); + UI::exitError(getMLText("admin_tools"), getMLText("internal_error")); } $allGroups = $dms->getAllGroups(); if (is_bool($allGroups)) { - UI::exitError(getMLText("admin_tools"),getMLText("internal_error")); + UI::exitError(getMLText("admin_tools"), getMLText("internal_error")); } -if(isset($_GET['groupid']) && $_GET['groupid']) { +if (isset($_GET['groupid']) && $_GET['groupid']) { $selgroup = $dms->getGroup($_GET['groupid']); } else { $selgroup = null; } -if($view) { +if ($view) { $view->setParam('selgroup', $selgroup); $view->setParam('allgroups', $allGroups); $view->setParam('allusers', $allUsers); diff --git a/out/out.Help.php b/out/out.Help.php index a43662e33..e881f38f4 100644 --- a/out/out.Help.php +++ b/out/out.Help.php @@ -17,7 +17,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -if(!isset($settings)) +if (!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.Utils.php"); require_once("inc/inc.LogInit.php"); @@ -32,11 +32,12 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1]); $accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings); -if(isset($_GET['context'])) +if (isset($_GET['context'])) $context = $_GET['context']; else $context = ''; -if($view) { + +if ($view) { $view->setParam('dms', $dms); $view->setParam('user', $user); $view->setParam('context', $context); diff --git a/out/out.LogManagement.php b/out/out.LogManagement.php index 6b7f66d48..04af7a99c 100644 --- a/out/out.LogManagement.php +++ b/out/out.LogManagement.php @@ -17,7 +17,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -if(!isset($settings)) +if (!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.Utils.php"); require_once("inc/inc.LogInit.php"); @@ -32,16 +32,16 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); $accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings); if (!$user->isAdmin()) { - UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); + UI::exitError(getMLText("admin_tools"), getMLText("access_denied")); } if (isset($_GET["logname"])) $logname=basename($_GET["logname"], '.log').'.log'; -else $logname=NULL; +else $logname=null; if (isset($_GET["mode"])) $mode=$_GET["mode"]; else $mode='default'; -if($view) { +if ($view) { $view->setParam('logname', $logname); $view->setParam('mode', $mode); $view->setParam('logdir', $settings->_contentDir.'log/'); diff --git a/out/out.ReviewSummary.php b/out/out.ReviewSummary.php index 03db7df3b..f380cab4f 100644 --- a/out/out.ReviewSummary.php +++ b/out/out.ReviewSummary.php @@ -30,7 +30,7 @@ * @link https://www.seeddms.org Main Site */ -if(!isset($settings)) { +if (!isset($settings)) { require_once "../inc/inc.Settings.php"); } require_once "inc/inc.Utils.php"; diff --git a/out/out.Search.php b/out/out.Search.php index 349799bd5..064675a19 100644 --- a/out/out.Search.php +++ b/out/out.Search.php @@ -18,7 +18,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -if(!isset($settings)) +if (!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.Utils.php"); require_once("inc/inc.LogInit.php"); diff --git a/out/out.WorkflowActionsMgr.php b/out/out.WorkflowActionsMgr.php index 0f7590eb0..302b52d13 100644 --- a/out/out.WorkflowActionsMgr.php +++ b/out/out.WorkflowActionsMgr.php @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -if(!isset($settings)) +if (!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.Utils.php"); require_once("inc/inc.LogInit.php"); @@ -34,10 +34,10 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); $accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings); if (!$user->isAdmin()) { - UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); + UI::exitError(getMLText("admin_tools"), getMLText("access_denied")); } -if(isset($_GET['workflowactionid']) && $_GET['workflowactionid']) { +if (isset($_GET['workflowactionid']) && $_GET['workflowactionid']) { $selworkflowaction = $dms->getWorkflowAction($_GET['workflowactionid']); } else { $selworkflowaction = null; @@ -45,10 +45,10 @@ if(isset($_GET['workflowactionid']) && $_GET['workflowactionid']) { $workflowactions = $dms->getAllWorkflowActions(); if (is_bool($workflowactions)) { - UI::exitError(getMLText("admin_tools"),getMLText("internal_error")); + UI::exitError(getMLText("admin_tools"), getMLText("internal_error")); } -if($view) { +if ($view) { $view->setParam('allworkflowactions', $workflowactions); $view->setParam('selworkflowaction', $selworkflowaction); $view->setParam('accessobject', $accessop);