Skip to content

Commit

Permalink
Removed APIStats in favor of CDN
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBack committed Jan 23, 2021
1 parent 6c0086e commit 6fd8aef
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
2 changes: 0 additions & 2 deletions api/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
$Query = "no_query";
}

\crisp\api\APIStats::add($GLOBALS["route"]->Page, $Query);

header("X-API-Interface: " . $GLOBALS["route"]->Page);
header("X-API-Query: $Query");

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace crisp\migrations;

class removeapistats extends \crisp\core\Migrations {

public function run() {
try {
$this->begin();
$this->Database->query("DROP Table APIStats;");
return $this->end();
} catch (\Exception $ex) {
echo $ex->getMessage() . PHP_EOL;
$this->rollback();
return false;
}
}

}
2 changes: 1 addition & 1 deletion themes/crisp/hook.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

\crisp\core\Theme::addtoNavbar("frontpage", crisp\api\Translation::fetch("components.navbar.home"), \crisp\api\Helper::generateLink("frontpage"), "_self", -99);
\crisp\core\Theme::addtoNavbar("ratings", crisp\api\Translation::fetch("components.navbar.ratings"), \crisp\api\Helper::generateLink("#ratings"), "_self", -98);
\crisp\core\Theme::addtoNavbar("ratings", crisp\api\Translation::fetch("components.navbar.ratings"), \crisp\api\Helper::generateLink("frontpage#ratings"), "_self", -98);
\crisp\core\Theme::addtoNavbar("api", crisp\api\Translation::fetch("components.navbar.api"), \crisp\api\Helper::generateLink("api"), "_self", -95);
\crisp\core\Theme::addtoNavbar("forum", crisp\api\Translation::fetch("components.navbar.forum"), \crisp\api\Helper::generateLink(\crisp\api\Config::get("forum_url"), true), "_self", -94);
\crisp\core\Theme::addtoNavbar("presskit", crisp\api\Translation::fetch("components.navbar.presskit"), \crisp\api\Helper::generateLink("presskit"), "_self", -93);
Expand Down

0 comments on commit 6fd8aef

Please sign in to comment.