diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2012-12-04 04:30:49 +0400 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2012-12-04 04:30:49 +0400 |
commit | 59ef62502baf88b66fe2d1054c56a0baba6330d6 (patch) | |
tree | 4d84e4a5bb30f914da2cc09e4188db601b061acc /misc | |
parent | 33584888df591eb1cc6afcc9dce7d40e3358eaa3 (diff) |
Moving up authentication
git-svn-id: http://dev.piwik.org/svn/trunk@7570 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/others/geoipUpdateRows.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/misc/others/geoipUpdateRows.php b/misc/others/geoipUpdateRows.php index 98427210a3..9028651ac2 100755 --- a/misc/others/geoipUpdateRows.php +++ b/misc/others/geoipUpdateRows.php @@ -36,17 +36,16 @@ $count = Piwik_FetchOne($query); // when script run via browser, check for Super User & output html page to do conversion via AJAX if (!Piwik_Common::isPhpCliMode()) { + try { + Piwik::checkUserIsSuperUser(); + } catch(Exception $e) { + Piwik::log('[error] You must be logged in as Super User to run this script. Please login in to Piwik and refresh this page.'); + exit; + } // the 'start' query param will be supplied by the AJAX requests, so if it's not there, the // user is viewing the page in the browser. if (Piwik_Common::getRequestVar('start', false) === false) { - try { - Piwik::checkUserIsSuperUser(); - } catch(Exception $e) { - Piwik::log('[error] You must be logged in as Super User to run this script. Please login in to Piwik and refresh this page.'); - exit; - } - // output HTML page that runs update via AJAX ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |