fix code formatting

This commit is contained in:
Uwe Steinmann 2024-10-28 12:59:31 +01:00
parent d70a6c79b3
commit a8a8402c6e
10 changed files with 41 additions and 40 deletions

View File

@ -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);

View File

@ -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) {
if ($data = $dms->getStatisticalData($type)) {
switch ($type) {
case 'docsperstatus':
foreach($data as &$rec) {
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);

View File

@ -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;
}

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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/');

View File

@ -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";

View File

@ -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");

View File

@ -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);