Skip to content
This repository was archived by the owner on Oct 30, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions files/class.loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function load($type) {
$path = "{$this->css_base}min/{$this->theme}/main.css";
if ($this->generate($path, $this->default_css, 'css')) {
$buster = filemtime($this->php_base.$path);
$css_includes = "<link rel='stylesheet' href='https://hackthis-10af.kxcdn.com{$path}?{$buster}' type='text/css'/>\n";
$css_includes = "<link rel='stylesheet' href='{$this->app->config('http-cache')}{$path}?{$buster}' type='text/css'/>\n";
}

//Build custom CSS file, if required
Expand All @@ -94,7 +94,7 @@ public function load($type) {

if ($this->generate($path, $this->custom_css, 'css')) {
$buster = filemtime($this->php_base.$path);
$css_includes .= " <link rel='stylesheet' href='https://hackthis-10af.kxcdn.com{$path}?{$buster}' type='text/css'/>\n";
$css_includes .= " <link rel='stylesheet' href='{$this->app->config('http-cache')}{$path}?{$buster}' type='text/css'/>\n";
}
}

Expand All @@ -104,7 +104,7 @@ public function load($type) {
$path = "{$this->js_base}min/main.js";
if ($this->generate($path, $this->default_js, 'js')) {
$buster = filemtime($this->php_base.$path);
$js_includes = "<script type='text/javascript' src='https://hackthis-10af.kxcdn.com{$path}?{$buster}'></script>\n";
$js_includes = "<script type='text/javascript' src='{$this->app->config('http-cache')}{$path}?{$buster}'></script>\n";
}

//Build custom JS, if required
Expand All @@ -116,7 +116,7 @@ public function load($type) {

if ($this->generate($path, $this->custom_js, 'js')) {
$buster = filemtime($this->php_base.$path);
$js_includes .= " <script type='text/javascript' src='https://hackthis-10af.kxcdn.com{$path}?{$buster}'></script>\n";
$js_includes .= " <script type='text/javascript' src='{$this->app->config('http-cache')}{$path}?{$buster}'></script>\n";
}
}

Expand Down
6 changes: 4 additions & 2 deletions files/example.config.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?php
$config['domain'] = 'http://example.org';
$config['domain'] = 'example.org';
$config['http-cache'] = 'http://example.org';

// Site variables
$config['path'] = realpath($_SERVER["DOCUMENT_ROOT"] . '/../');
$config['session-path'] = '/srv/www/hackthis.co.uk/sessions';

// Database configuration
$config['db']['driver'] = 'mysql';
Expand Down Expand Up @@ -32,4 +34,4 @@
$config['socket']['key'] = '';

$config['ssga-ua'] = '';
?>
?>
3 changes: 2 additions & 1 deletion files/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// session_set_save_handler('redis');
// session_save_path("tcp://gir:9248");

session_save_path('/srv/www/hackthis.co.uk/sessions');
require('config.php');
session_save_path($config['session-path']);
ini_set('session.gc_maxlifetime', 3*60*60); // 3 hours
ini_set('session.gc_probability', 1);
ini_set('session.gc_divisor', 100);
Expand Down
2 changes: 1 addition & 1 deletion html/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
require_once('header.php');
?>
<div class='row header'>
<img src="https://hackthis-10af.kxcdn.com/files/images/logo_landing.png" alt="HackThis!! - The hackers playground">
<img src="<?php echo $app->config('http-cache') ?>/files/images/logo_landing.png" alt="HackThis!! - The hackers playground">
</div>
<?php
if (isset($_GET['deleted'])) {
Expand Down