From a5389b55a377e07088ced630b6c280166ac2c79a Mon Sep 17 00:00:00 2001 From: mikespub Date: Wed, 19 Jul 2023 18:49:14 +0200 Subject: [PATCH] move verifyLogin + expand Format --- base.php | 135 ++++++++++++++++++++--------------- checkconfig.php | 1 - config.php | 2 +- epubfs.php | 1 - epubreader.php | 1 - feed.php | 1 - fetch.php | 1 - getJSON.php | 1 - index.php | 7 +- lib/Calibre/Book.php | 5 +- lib/Calibre/Data.php | 16 ++--- lib/Model/LinkFacet.php | 7 +- lib/Model/LinkNavigation.php | 7 +- lib/Output/JSON_renderer.php | 13 +++- lib/Output/OPDS_renderer.php | 16 ++--- restapi.php | 1 - sendtomail.php | 1 - test/baseTest.php | 17 ++--- test/configTest.php | 4 +- verifyLogin.php | 18 ----- 20 files changed, 117 insertions(+), 138 deletions(-) delete mode 100644 verifyLogin.php diff --git a/base.php b/base.php index b57ab10bf..677d183b3 100644 --- a/base.php +++ b/base.php @@ -32,7 +32,6 @@ class Config namespace SebLucas\Cops\Request; use SebLucas\Cops\Config; -use SebLucas\Template\doT; function useServerSideRendering() { @@ -40,35 +39,6 @@ function useServerSideRendering() return preg_match('/' . $config['cops_server_side_render'] . '/', $_SERVER['HTTP_USER_AGENT']); } -function serverSideRender($data) -{ - // Get the templates - $theme = getCurrentTemplate(); - $header = file_get_contents('templates/' . $theme . '/header.html'); - $footer = file_get_contents('templates/' . $theme . '/footer.html'); - $main = file_get_contents('templates/' . $theme . '/main.html'); - $bookdetail = file_get_contents('templates/' . $theme . '/bookdetail.html'); - $page = file_get_contents('templates/' . $theme . '/page.html'); - - // Generate the function for the template - $template = new doT(); - $dot = $template->template($page, ['bookdetail' => $bookdetail, - 'header' => $header, - 'footer' => $footer, - 'main' => $main]); - // If there is a syntax error in the function created - // $dot will be equal to FALSE - if (!$dot) { - return false; - } - // Execute the template - if (!empty($data)) { - return $dot($data); - } - - return null; -} - function getQueryString() { if (isset($_SERVER['QUERY_STRING'])) { @@ -116,34 +86,6 @@ function setURLParam($name, $value) $urlParams[$name] = $value; } -function addURLParameter($urlParams, $paramName, $paramValue) -{ - if (empty($urlParams)) { - $urlParams = ''; - } - $start = ''; - if (preg_match('#^\?(.*)#', $urlParams, $matches)) { - $start = '?'; - $urlParams = $matches[1]; - } - $params = []; - parse_str($urlParams, $params); - if (empty($paramValue) && strval($paramValue) !== "0") { - unset($params[$paramName]); - } else { - $params[$paramName] = $paramValue; - } - return $start . http_build_query($params); -} - -function addDbParameter($urlParams) -{ - if (!is_null(getURLParam('db'))) { - $urlParams = addURLParameter($urlParams, 'db', getURLParam('db')); - } - return $urlParams; -} - function getCurrentOption($option) { global $config; @@ -186,10 +128,29 @@ function getUrlWithVersion($url) return $url . '?v=' . Config::VERSION; } +function verifyLogin() +{ + global $config; + if (isset($config['cops_basic_authentication']) && + is_array($config['cops_basic_authentication'])) { + if (!isset($_SERVER['PHP_AUTH_USER']) || + (isset($_SERVER['PHP_AUTH_USER']) && + ($_SERVER['PHP_AUTH_USER'] != $config['cops_basic_authentication']['username'] || + $_SERVER['PHP_AUTH_PW'] != $config['cops_basic_authentication']['password']))) { + return false; + } + } + return true; +} + namespace SebLucas\Cops\Output; +use SebLucas\Template\doT; use DOMDocument; +use function SebLucas\Cops\Request\getURLParam; +use function SebLucas\Cops\Request\getCurrentTemplate; + class Format { /** @@ -212,6 +173,64 @@ public static function str_format($format) return $format; } + public static function addURLParam($urlParams, $paramName, $paramValue) + { + if (empty($urlParams)) { + $urlParams = ''; + } + $start = ''; + if (preg_match('#^\?(.*)#', $urlParams, $matches)) { + $start = '?'; + $urlParams = $matches[1]; + } + $params = []; + parse_str($urlParams, $params); + if (empty($paramValue) && strval($paramValue) !== "0") { + unset($params[$paramName]); + } else { + $params[$paramName] = $paramValue; + } + return $start . http_build_query($params); + } + + public static function addDatabaseParam($urlParams) + { + $database = getURLParam('db'); + if (!is_null($database)) { + $urlParams = self::addURLParam($urlParams, 'db', $database); + } + return $urlParams; + } + + public static function serverSideRender($data) + { + // Get the templates + $theme = getCurrentTemplate(); + $header = file_get_contents('templates/' . $theme . '/header.html'); + $footer = file_get_contents('templates/' . $theme . '/footer.html'); + $main = file_get_contents('templates/' . $theme . '/main.html'); + $bookdetail = file_get_contents('templates/' . $theme . '/bookdetail.html'); + $page = file_get_contents('templates/' . $theme . '/page.html'); + + // Generate the function for the template + $template = new doT(); + $dot = $template->template($page, ['bookdetail' => $bookdetail, + 'header' => $header, + 'footer' => $footer, + 'main' => $main]); + // If there is a syntax error in the function created + // $dot will be equal to FALSE + if (!$dot) { + return false; + } + // Execute the template + if (!empty($data)) { + return $dot($data); + } + + return null; + } + public static function xml2xhtml($xml) { return preg_replace_callback('#<(\w+)([^>]*)\s*/>#s', function ($m) { diff --git a/checkconfig.php b/checkconfig.php index 8b9fbfaad..33d194dff 100644 --- a/checkconfig.php +++ b/checkconfig.php @@ -17,7 +17,6 @@ use function SebLucas\Cops\Request\useServerSideRendering; require_once dirname(__FILE__) . '/config.php'; -require_once dirname(__FILE__) . '/base.php'; /** @var array $config */ $err = getURLParam('err', -1); diff --git a/config.php b/config.php index 8ec946349..b7970b8d7 100644 --- a/config.php +++ b/config.php @@ -22,7 +22,7 @@ if (file_exists(dirname(__FILE__) . '/' . $user_config_file) && (php_sapi_name() !== 'cli')) { require dirname(__FILE__) . '/' . $user_config_file; } -require_once 'verifyLogin.php'; +require_once dirname(__FILE__) . '/base.php'; if (!verifyLogin()) { header('WWW-Authenticate: Basic realm="COPS Authentication"'); header('HTTP/1.0 401 Unauthorized'); diff --git a/epubfs.php b/epubfs.php index 39031eb10..97386eb8c 100644 --- a/epubfs.php +++ b/epubfs.php @@ -15,7 +15,6 @@ use function SebLucas\Cops\Request\notFound; require_once dirname(__FILE__) . '/config.php'; -require_once dirname(__FILE__) . '/base.php'; if (php_sapi_name() === 'cli') { return; diff --git a/epubreader.php b/epubreader.php index a33ea92e7..c10d08c90 100644 --- a/epubreader.php +++ b/epubreader.php @@ -12,7 +12,6 @@ use function SebLucas\Cops\Request\notFound; require_once dirname(__FILE__) . '/config.php'; -require_once dirname(__FILE__) . '/base.php'; /** @var array $config */ $idData = (int) getURLParam('data', null); diff --git a/feed.php b/feed.php index 693d2e810..a8707d973 100644 --- a/feed.php +++ b/feed.php @@ -12,7 +12,6 @@ use function SebLucas\Cops\Request\getURLParam; require_once dirname(__FILE__) . '/config.php'; -require_once dirname(__FILE__) . '/base.php'; /** @var array $config */ header('Content-Type:application/xml'); diff --git a/fetch.php b/fetch.php index 992ef107d..939015119 100644 --- a/fetch.php +++ b/fetch.php @@ -11,7 +11,6 @@ use function SebLucas\Cops\Request\notFound; require_once dirname(__FILE__) . '/config.php'; -require_once dirname(__FILE__) . '/base.php'; /** @var array $config */ global $config; diff --git a/getJSON.php b/getJSON.php index 8acd8e2fb..598c5c23d 100644 --- a/getJSON.php +++ b/getJSON.php @@ -9,7 +9,6 @@ use SebLucas\Cops\Output\JSONRenderer; require_once dirname(__FILE__) . '/config.php'; -require_once dirname(__FILE__) . '/base.php'; /** @var array $config */ header('Content-Type:application/json;charset=utf-8'); diff --git a/index.php b/index.php index 4f6dc34ad..25a13ad3d 100644 --- a/index.php +++ b/index.php @@ -14,16 +14,13 @@ use SebLucas\Cops\Pages\Page; use SebLucas\Template\doT; -use function SebLucas\Cops\Request\addURLParameter; use function SebLucas\Cops\Request\getCurrentCss; use function SebLucas\Cops\Request\getCurrentTemplate; use function SebLucas\Cops\Request\getQueryString; use function SebLucas\Cops\Request\getURLParam; -use function SebLucas\Cops\Request\serverSideRender; use function SebLucas\Cops\Request\useServerSideRendering; require_once dirname(__FILE__) . '/config.php'; -require_once dirname(__FILE__) . '/base.php'; /** @var array $config */ // If we detect that an OPDS reader try to connect try to redirect to feed.php @@ -60,7 +57,7 @@ 'server_side_rendering' => useServerSideRendering(), 'current_css' => getCurrentCss(), 'favico' => $config['cops_icon'], - 'getjson_url' => Config::ENDPOINT["json"] . '?' . addURLParameter(getQueryString(), 'complete', 1)]; + 'getjson_url' => JSONRenderer::getCurrentUrl(getQueryString())]; if (preg_match('/Kindle/', $_SERVER['HTTP_USER_AGENT'])) { $data['customHeader'] = ''; } @@ -75,7 +72,7 @@ // Get the data $data = JSONRenderer::getJson(true); - echo serverSideRender($data); + echo Format::serverSideRender($data); } ?> diff --git a/lib/Calibre/Book.php b/lib/Calibre/Book.php index bba196df7..dc59e50aa 100644 --- a/lib/Calibre/Book.php +++ b/lib/Calibre/Book.php @@ -19,7 +19,6 @@ use SebLucas\EPubMeta\EPub; use Exception; -use function SebLucas\Cops\Request\addURLParameter; use function SebLucas\Cops\Request\getCurrentOption; use function SebLucas\Cops\Request\getURLParam; @@ -230,9 +229,7 @@ public function getUri() public function getDetailUrl() { $urlParam = $this->getUri(); - if (!is_null(getURLParam('db'))) { - $urlParam = addURLParameter($urlParam, 'db', getURLParam('db')); - } + $urlParam = Format::addDatabaseParam($urlParam); return self::$endpoint . $urlParam; } diff --git a/lib/Calibre/Data.php b/lib/Calibre/Data.php index aff854b00..ed3e59ce6 100644 --- a/lib/Calibre/Data.php +++ b/lib/Calibre/Data.php @@ -10,8 +10,8 @@ use SebLucas\Cops\Config; use SebLucas\Cops\Model\Link; +use SebLucas\Cops\Output\Format; -use function SebLucas\Cops\Request\addURLParameter; use function SebLucas\Cops\Request\getURLParam; class Data @@ -193,7 +193,7 @@ public static function handleThumbnailLink($urlParam, $height) } } if ($config['cops_thumbnail_handling'] != "1") { - $urlParam = addURLParameter($urlParam, "height", $height); + $urlParam = Format::addURLParam($urlParam, "height", $height); } return $urlParam; @@ -203,24 +203,22 @@ public static function getLink($book, $type, $mime, $rel, $filename, $idData, $t { global $config; - $urlParam = addURLParameter("", "data", $idData); + $urlParam = Format::addURLParam("", "data", $idData); if ($view) { - $urlParam = addURLParameter($urlParam, "view", 1); + $urlParam = Format::addURLParam($urlParam, "view", 1); } if (Base::useAbsolutePath() || $rel == Link::OPDS_THUMBNAIL_TYPE || ($type == "epub" && $config['cops_update_epub-metadata'])) { if ($type != "jpg") { - $urlParam = addURLParameter($urlParam, "type", $type); + $urlParam = Format::addURLParam($urlParam, "type", $type); } if ($rel == Link::OPDS_THUMBNAIL_TYPE) { $urlParam = self::handleThumbnailLink($urlParam, $height); } - $urlParam = addURLParameter($urlParam, "id", $book->id); - if (!is_null(getURLParam('db'))) { - $urlParam = addURLParameter($urlParam, 'db', getURLParam('db')); - } + $urlParam = Format::addURLParam($urlParam, "id", $book->id); + $urlParam = Format::addDatabaseParam($urlParam); if ($config['cops_thumbnail_handling'] != "1" && !empty($config['cops_thumbnail_handling']) && $rel == Link::OPDS_THUMBNAIL_TYPE) { diff --git a/lib/Model/LinkFacet.php b/lib/Model/LinkFacet.php index 74cea5131..36b1a46bd 100644 --- a/lib/Model/LinkFacet.php +++ b/lib/Model/LinkFacet.php @@ -8,17 +8,14 @@ namespace SebLucas\Cops\Model; -use function SebLucas\Cops\Request\addURLParameter; -use function SebLucas\Cops\Request\getURLParam; +use SebLucas\Cops\Output\Format; class LinkFacet extends Link { public function __construct($phref, $ptitle = null, $pfacetGroup = null, $pactiveFacet = false) { parent::__construct($phref, Link::OPDS_PAGING_TYPE, "http://opds-spec.org/facet", $ptitle, $pfacetGroup, $pactiveFacet); - if (!is_null(getURLParam('db'))) { - $this->href = addURLParameter($this->href, 'db', getURLParam('db')); - } + $this->href = Format::addDatabaseParam($this->href); $this->href = parent::getScriptName() . $this->href; } } diff --git a/lib/Model/LinkNavigation.php b/lib/Model/LinkNavigation.php index 1c135f906..1b494aaa0 100644 --- a/lib/Model/LinkNavigation.php +++ b/lib/Model/LinkNavigation.php @@ -8,17 +8,14 @@ namespace SebLucas\Cops\Model; -use function SebLucas\Cops\Request\addURLParameter; -use function SebLucas\Cops\Request\getURLParam; +use SebLucas\Cops\Output\Format; class LinkNavigation extends Link { public function __construct($phref, $prel = null, $ptitle = null) { parent::__construct($phref, Link::OPDS_NAVIGATION_TYPE, $prel, $ptitle); - if (!is_null(getURLParam('db'))) { - $this->href = addURLParameter($this->href, 'db', getURLParam('db')); - } + $this->href = Format::addDatabaseParam($this->href); if (!preg_match("#^\?(.*)#", $this->href) && !empty($this->href)) { $this->href = "?" . $this->href; } diff --git a/lib/Output/JSON_renderer.php b/lib/Output/JSON_renderer.php index dbadf1499..e46ecc4cf 100644 --- a/lib/Output/JSON_renderer.php +++ b/lib/Output/JSON_renderer.php @@ -15,9 +15,10 @@ use SebLucas\Cops\Model\EntryBook; use SebLucas\Cops\Model\Link; use SebLucas\Cops\Model\LinkNavigation; +use SebLucas\Cops\Output\Format; use SebLucas\Cops\Pages\Page; -use function SebLucas\Cops\Request\addURLParameter; +use function SebLucas\Cops\Request\getQueryString; use function SebLucas\Cops\Request\getURLParam; use function SebLucas\Cops\Request\useServerSideRendering; @@ -213,6 +214,12 @@ public static function addCompleteArray($in) return $out; } + public static function getCurrentUrl($queryString = null) + { + $queryString ??= getQueryString(); + return Config::ENDPOINT["json"] . '?' . Format::addURLParam($queryString, 'complete', 1); + } + public static function getJson($complete = false) { global $config; @@ -275,7 +282,7 @@ public static function getJson($complete = false) $out ["containsBook"] = 1; } - $out["abouturl"] = self::$endpoint . addURLParameter("?page=" . Page::ABOUT, 'db', $database); + $out["abouturl"] = self::$endpoint . Format::addURLParam("?page=" . Page::ABOUT, 'db', $database); if ($page == Page::ABOUT) { $temp = preg_replace("/\About COPS\<\/h1\>/", "

About COPS " . Config::VERSION . "

", file_get_contents('about.html')); @@ -284,7 +291,7 @@ public static function getJson($complete = false) $out ["homeurl"] = self::$endpoint; if ($page != Page::INDEX && !is_null($database)) { - $out ["homeurl"] = $out ["homeurl"] . "?" . addURLParameter("", 'db', $database); + $out ["homeurl"] = $out ["homeurl"] . "?" . Format::addURLParam("", 'db', $database); } return $out; diff --git a/lib/Output/OPDS_renderer.php b/lib/Output/OPDS_renderer.php index 7fc04a425..20b27f562 100644 --- a/lib/Output/OPDS_renderer.php +++ b/lib/Output/OPDS_renderer.php @@ -13,10 +13,10 @@ use SebLucas\Cops\Model\Link; use SebLucas\Cops\Model\LinkFacet; use SebLucas\Cops\Model\LinkNavigation; +use SebLucas\Cops\Output\Format; use SebLucas\Cops\Pages\Page; use XMLWriter; -use function SebLucas\Cops\Request\addURLParameter; use function SebLucas\Cops\Request\getQueryString; use function SebLucas\Cops\Request\getURLParam; @@ -74,9 +74,7 @@ public function getOpenSearch() $xml->startElement("Url"); $xml->writeAttribute("type", 'application/atom+xml'); $urlparam = "?query={searchTerms}"; - if (!is_null(getURLParam('db'))) { - $urlparam = addURLParameter($urlparam, 'db', getURLParam('db')); - } + $urlparam = Format::addDatabaseParam($urlparam); $urlparam = str_replace("%7B", "{", $urlparam); $urlparam = str_replace("%7D", "}", $urlparam); $xml->writeAttribute("template", $config['cops_full_url'] . self::$endpoint . $urlparam); @@ -141,16 +139,14 @@ private function startXmlDocument($page) $link = new LinkNavigation("?" . getQueryString(), "self"); self::renderLink($link); $urlparam = "?"; - if (!is_null(getURLParam('db'))) { - $urlparam = addURLParameter($urlparam, 'db', getURLParam('db')); - } + $urlparam = Format::addDatabaseParam($urlparam); if ($config['cops_generate_invalid_opds_stream'] == 0 || preg_match("/(MantanoReader|FBReader)/", $_SERVER['HTTP_USER_AGENT'])) { // Good and compliant way of handling search - $urlparam = addURLParameter($urlparam, "page", Page::OPENSEARCH); + $urlparam = Format::addURLParam($urlparam, "page", Page::OPENSEARCH); $link = new Link(self::$endpoint . $urlparam, "application/opensearchdescription+xml", "search", "Search here"); } else { // Bad way, will be removed when OPDS client are fixed - $urlparam = addURLParameter($urlparam, "query", "{searchTerms}"); + $urlparam = Format::addURLParam($urlparam, "query", "{searchTerms}"); $urlparam = str_replace("%7B", "{", $urlparam); $urlparam = str_replace("%7D", "}", $urlparam); $link = new Link($config['cops_full_url'] . self::$endpoint . $urlparam, "application/atom+xml", "search", "Search here"); @@ -159,7 +155,7 @@ private function startXmlDocument($page) if ($page->containsBook() && !is_null($config['cops_books_filter']) && count($config['cops_books_filter']) > 0) { $Urlfilter = getURLParam("tag", ""); foreach ($config['cops_books_filter'] as $lib => $filter) { - $link = new LinkFacet("?" . addURLParameter(getQueryString(), "tag", $filter), $lib, localize("tagword.title"), $filter == $Urlfilter); + $link = new LinkFacet("?" . Format::addURLParam(getQueryString(), "tag", $filter), $lib, localize("tagword.title"), $filter == $Urlfilter); self::renderLink($link); } } diff --git a/restapi.php b/restapi.php index 0342aba29..4c58886db 100644 --- a/restapi.php +++ b/restapi.php @@ -11,7 +11,6 @@ use SebLucas\Cops\Output\RestApi; require_once dirname(__FILE__) . '/config.php'; -require_once dirname(__FILE__) . '/base.php'; /** @var array $config */ // override splitting authors and books by first letter here? diff --git a/sendtomail.php b/sendtomail.php index 24ecd633d..00546b21b 100644 --- a/sendtomail.php +++ b/sendtomail.php @@ -5,7 +5,6 @@ use SebLucas\Cops\Calibre\Book; require_once dirname(__FILE__) . '/config.php'; -require_once dirname(__FILE__) . '/base.php'; /** @var array $config */ use PHPMailer\PHPMailer\PHPMailer; diff --git a/test/baseTest.php b/test/baseTest.php index 2fa2bc8a8..edc79fac6 100644 --- a/test/baseTest.php +++ b/test/baseTest.php @@ -6,18 +6,17 @@ * @author Sébastien Lucas */ -require_once(dirname(__FILE__) . "/../base.php"); require_once(dirname(__FILE__) . "/config_test.php"); use PHPUnit\Framework\TestCase; use SebLucas\Cops\Calibre\Base; use SebLucas\Cops\Config; +use SebLucas\Cops\Output\Format; +use SebLucas\Cops\Output\JSONRenderer; use SebLucas\Cops\Language\Translation; use SebLucas\Template\doT; -use function SebLucas\Cops\Request\addURLParameter; use function SebLucas\Cops\Request\getCurrentCss; use function SebLucas\Cops\Request\getQueryString; -use function SebLucas\Cops\Request\serverSideRender; use function SebLucas\Cops\Request\useServerSideRendering; use function SebLucas\Cops\Request\verifyLogin; @@ -32,9 +31,9 @@ public static function setUpBeforeClass(): void public function testAddURLParameter() { - $this->assertEquals("?db=0", addURLParameter("?", "db", "0")); - $this->assertEquals("?key=value&db=0", addURLParameter("?key=value", "db", "0")); - $this->assertEquals("?key=value&otherKey=&db=0", addURLParameter("?key=value&otherKey", "db", "0")); + $this->assertEquals("?db=0", Format::addURLParam("?", "db", "0")); + $this->assertEquals("?key=value&db=0", Format::addURLParam("?key=value", "db", "0")); + $this->assertEquals("?key=value&otherKey=&db=0", Format::addURLParam("?key=value&otherKey", "db", "0")); } /** @@ -44,7 +43,7 @@ public function testAddURLParameter() public function testServerSideRender($template) { $_COOKIE["template"] = $template; - $this->assertNull(serverSideRender(null)); + $this->assertNull(Format::serverSideRender(null)); unset($_COOKIE['template']); } @@ -68,7 +67,7 @@ public function testGenerateHeader($templateName) "server_side_rendering" => useServerSideRendering(), "current_css" => getCurrentCss(), "favico" => $config['cops_icon'], - "getjson_url" => Config::ENDPOINT["json"] . "?" . addURLParameter(getQueryString(), "complete", 1)]; + "getjson_url" => JSONRenderer::getCurrentUrl(getQueryString())]; $head = $tpl($data); $this->assertStringContainsString("", $head); @@ -258,7 +257,6 @@ public function testNormalizeUtf8String() public function testLoginEnabledWithoutCreds() { global $config; - require_once __DIR__.'/../verifyLogin.php'; $config['cops_basic_authentication'] = [ "username" => "xxx", "password" => "secret"]; $this->assertFalse(verifyLogin()); } @@ -266,7 +264,6 @@ public function testLoginEnabledWithoutCreds() public function testLoginEnabledAndLoggingIn() { global $config; - require_once __DIR__.'/../verifyLogin.php'; $config['cops_basic_authentication'] = [ "username" => "xxx", "password" => "secret"]; $_SERVER['PHP_AUTH_USER'] = 'xxx'; $_SERVER['PHP_AUTH_PW'] = 'secret'; diff --git a/test/configTest.php b/test/configTest.php index f863e3e7f..731d507e2 100644 --- a/test/configTest.php +++ b/test/configTest.php @@ -7,9 +7,9 @@ */ use PHPUnit\Framework\TestCase; use SebLucas\Cops\Config; +use SebLucas\Cops\Output\JSONRenderer; use SebLucas\Template\doT; -use function SebLucas\Cops\Request\addURLParameter; use function SebLucas\Cops\Request\getCurrentCss; use function SebLucas\Cops\Request\getQueryString; use function SebLucas\Cops\Request\useServerSideRendering; @@ -143,7 +143,7 @@ public function testCheckConfigurationTemplate() "server_side_rendering" => useServerSideRendering(), "current_css" => getCurrentCss(), "favico" => $config['cops_icon'], - "getjson_url" => Config::ENDPOINT["json"] . "?" . addURLParameter(getQueryString(), "complete", 1)]; + "getjson_url" => JSONRenderer::getCurrentUrl(getQueryString())]; $head = $tpl($data); diff --git a/verifyLogin.php b/verifyLogin.php deleted file mode 100644 index 4a0c63653..000000000 --- a/verifyLogin.php +++ /dev/null @@ -1,18 +0,0 @@ -