From ede231c8d9b7bb0dbeafa424bb812fef3af0b1fb Mon Sep 17 00:00:00 2001 From: fisharebest Date: Mon, 28 Nov 2011 09:27:56 +0000 Subject: Import not working. --- library/WT/Controller/Base.php | 7 +++++-- library/WT/Controller/Simple.php | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'library') diff --git a/library/WT/Controller/Base.php b/library/WT/Controller/Base.php index 2029aa9ab2..f424d5b549 100644 --- a/library/WT/Controller/Base.php +++ b/library/WT/Controller/Base.php @@ -97,9 +97,12 @@ class WT_Controller_Base { } // Restrict access - public function requireManagerLogin() { + public function requireManagerLogin($ged_id=WT_GED_ID) { require_once WT_ROOT.'includes/functions/functions.php'; // for get_query_url - if (!WT_USER_GEDCOM_ADMIN) { + if ( + $ged_id==WT_GED_ID && !WT_USER_GEDCOM_ADMIN || + $ged_id!=WT_GED_ID && userGedcomAdmin(WT_USER_ID, $gedcom_id) + ) { header('Location: '.WT_SERVER_NAME.WT_SCRIPT_PATH.get_site_setting('LOGIN_URL', 'login.php').'?url='.rawurlencode(get_query_url())); exit; } diff --git a/library/WT/Controller/Simple.php b/library/WT/Controller/Simple.php index d579f0793f..d4dc8cd3e0 100644 --- a/library/WT/Controller/Simple.php +++ b/library/WT/Controller/Simple.php @@ -50,8 +50,11 @@ class WT_Controller_Simple extends WT_Controller_Base { } // Restrict access - public function requireManagerLogin() { - if (!WT_USER_GEDCOM_ADMIN) { + public function requireManagerLogin($ged_id=WT_GED_ID) { + if ( + $ged_id==WT_GED_ID && !WT_USER_GEDCOM_ADMIN || + $ged_id!=WT_GED_ID && userGedcomAdmin(WT_USER_ID, $gedcom_id) + ) { $this->addInlineJavaScript('opener.window.location.reload(); window.close();'); exit; } -- cgit v1.3