From: Janusz Dobrowolski Date: Sat, 26 Jul 2008 07:20:58 +0000 (+0000) Subject: Site admin priviledges available only for first registered company admins. X-Git-Tag: v2.4.2~19^2~1883 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=45966656906337a4119f03df3d2cea55e22f1757;p=fa-stable.git Site admin priviledges available only for first registered company admins. --- diff --git a/admin/create_coy.php b/admin/create_coy.php index a7cae00c..b40b41d7 100644 --- a/admin/create_coy.php +++ b/admin/create_coy.php @@ -1,6 +1,6 @@ $con) { - if ($_POST['host'] == $con['host'] && $_POST['dbname'] == $con['dbname']) + if($id != $selected_id && $_POST['host'] == $con['host'] + && $_POST['dbname'] == $con['dbname']) { if ($_POST['tbpref'] == $con['tbpref']) { @@ -232,8 +233,8 @@ function display_companies() label_cell($conn[$i]['tbpref']); label_cell($what); label_cell("" . _("Edit") . ""); - if ($i != $coyno) - label_cell("" . _("Delete") . ""); + label_cell( $i == $coyno ? '' : + "" . _("Delete") . ""); end_row(); } diff --git a/admin/inst_lang.php b/admin/inst_lang.php index d024970f..98776618 100644 --- a/admin/inst_lang.php +++ b/admin/inst_lang.php @@ -1,6 +1,6 @@ access]); + // first registered company has site admin privileges + return isset($page_level) && in_array($page_level, $security_groups[$this->access]) + && ($this->company == 0 || $page_level != 20); } function get_db_connection()