Commit Diff


commit - b3d40d7e5040830b598e5e87d85bed4da23efcf4
commit + 796a9d50c26db95456cacca759c7a87d256cae22
blob - b1b6d8ab92fe30fd0e693f63507307b0135ccd1e
blob + aac1f8e1c2a3485db0e9a02026110778413c6c47
--- conf.php-sample
+++ conf.php-sample
@@ -24,7 +24,7 @@ define('ALIASES', '10');
 define('MAILBOXES', '10');
 
 // Mail Admin Administrator tag
-define('ADMIN_RIGHTS', 'ADMINISTRATOR');
+define('ADMIN_ROLE', 'ADMINISTRATOR');
 
 // Expose virtual mail construct 'vmail' to admins.
 define('ALIAS_CONTROL', 'NO');
blob - 351aef70d6aebd9ba1fc5ad16bf37229fc71d5ab
blob + c4addc06372b84304ea7c86c7523a198fc1dc5b5
--- setup.php
+++ setup.php
@@ -2,7 +2,7 @@
 /** 
  * OpenSMTPD Admin Refactor
  * by Jeroen Janssen <jeroen at laylo dot io>
- * Copyright (c) 2022 LAYLO
+ * Copyright (c) 2022-2023 LAYLO
  */
 
 // Check whether the configuration file exists - bail if that is the case
@@ -12,7 +12,7 @@ if (file_exists(realpath("./conf.php"))) {
 }
 // Define the app specifics
 DEFINE('APP_NAME', 'OpenSMTPD Admin Setup Checker');
-DEFINE('VERSION', '1.1');
+DEFINE('VERSION', '1.2');
 
 // Start generating the HTML output
 $html  = '<html>';
@@ -30,14 +30,14 @@ $html .= '<td><strong>PHP version:</strong></td>';
 $html .= (version_compare(PHP_VERSION, '7.4.0') >= 0) ? '<td><span style="color:green;">' . phpversion() . '</td>' : '<td><span style="color:red;">' . phpversion() . '</span></td>';
 $html .= '</tr><tr>';
 $html .= '<td><strong>SQL support:</strong></td>';
-$html .= (extension_loaded('mysqli')) ? '<td><span style="color:green;">MySQL/MariaDB</span>' : '<td><span style="color:red;">MySQL/MariaDB</span>';
+$html .= (extension_loaded('PDO')) ? '<td><span style="color:green;">PDO - MySQL/MariaDB</span>' : '<td><span style="color:red;">PDO - MySQL/MariaDB</span>';
 $html .= '</tr><tr>';
 $html .= '<td><strong>Functions:</strong></td>';
 $html .= (extension_loaded('pcre')) ? '<td><span style="color:green;">pcre</span>' : '<td><span style="color:red;">pcre</span>';
-$html .= (function_exists('get_magic_quotes_gpc')) ? ' - <span style="color:green;">get_magic_quotes_gpc</span>' : ' - <span style="color:red;">get_magic_quotes_gpc</span>';
 $html .= (function_exists('session_start')) ? ' - <span style="color:green;">session_start</span></td>' : ' - <span style="color:red;">session_start</span></td>';
 $html .= '</tr>';
 $html .= '</table>';
+$html .= '<p>cp or mv conf.php-sample to conf.php and change it to reflect your setup.</p>';
 $html .= '</body>';
 $html .= '</html>';
 
blob - 2cc3095c17e42d7dd2d5bf1a87b12ac4271e1f74
blob + 09d7324babef15943c8299d39bcd413e94010a86
--- templates/menu.tpl
+++ templates/menu.tpl
@@ -1,6 +1,6 @@
 <div id="menu">
 <ul>
-	<?php if (count($list_domains) == 0) { ?>
+	<?php if (count($list_domains) == 0 && $ROLE != ADMIN_ROLE) { ?>
 		<li><a target="_top" href="password.php"><?php echo $LANG['Menu_user_password']; ?></a></li>
 		<?php if (VACATION == "YES") { ?>
 		<li><a target="_top" href="vacation.php"><?php echo $LANG['Menu_user_vacation']; ?></a></li>