Move all public facing scripts under public folder
@@ -12,7 +12,7 @@ server {
|
||||
listen 80; ## listen for ipv4; this line is default and implied
|
||||
listen [::]:80 default_server ipv6only=on; ## listen for ipv6
|
||||
|
||||
root /var/www;
|
||||
root /var/www/public;
|
||||
index index.html index.htm index.php;
|
||||
|
||||
server_name localhost;
|
||||
|
||||
12
.gitignore
vendored
@@ -7,21 +7,21 @@ __MACOSX/
|
||||
logs/
|
||||
!logs/README.txt
|
||||
|
||||
static/local/
|
||||
public/static/local/
|
||||
|
||||
static/similar/
|
||||
!static/similar/.gitkeep
|
||||
public/static/similar/
|
||||
!public/static/similar/.gitkeep
|
||||
|
||||
preview.html
|
||||
|
||||
static/stylespreview/
|
||||
!static/stylespreview/.gitkeep
|
||||
public/static/stylespreview/
|
||||
!public/static/stylespreview/.gitkeep
|
||||
|
||||
sections/tools/development/node_modules/
|
||||
/vendor/
|
||||
node_modules/
|
||||
|
||||
static/userscripts/gazelle-json-export.js.txt
|
||||
public/static/userscripts/gazelle-json-export.js.txt
|
||||
|
||||
.bash_history
|
||||
.cache/
|
||||
|
||||
@@ -12,7 +12,7 @@ server {
|
||||
listen 80; ## listen for ipv4; this line is default and implied
|
||||
listen [::]:80 default_server ipv6only=on; ## listen for ipv6
|
||||
|
||||
root /var/www;
|
||||
root /var/www/public;
|
||||
index index.html index.htm index.php;
|
||||
|
||||
server_name localhost;
|
||||
|
||||
@@ -363,7 +363,7 @@ class ARTISTS_SIMILAR extends ARTIST{
|
||||
}
|
||||
reset($this->xValues);
|
||||
}
|
||||
$Img->make_png(SERVER_ROOT.'/static/similar/'.$this->ID.'.png');
|
||||
$Img->make_png(SERVER_ROOT.'/public/static/similar/'.$this->ID.'.png');
|
||||
}
|
||||
|
||||
function dump() {
|
||||
|
||||
@@ -85,10 +85,10 @@ if (isset(G::$LoggedUser['Notify'])) {
|
||||
href="feeds.php?feed=torrents_lossless24&user=<?=G::$LoggedUser['ID']?>&auth=<?=G::$LoggedUser['RSS_Auth']?>&passkey=<?=G::$LoggedUser['torrent_pass']?>&authkey=<?=G::$LoggedUser['AuthKey']?>"
|
||||
title="<?=SITE_NAME?> - 24bit Lossless Torrents" />
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="<?=STATIC_SERVER?>styles/global.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/global.css')?>" />
|
||||
href="<?=STATIC_SERVER?>styles/global.css?v=<?=filemtime(SERVER_ROOT.'/public/static/styles/global.css')?>" />
|
||||
<?php
|
||||
if ($UseTooltipster) { ?>
|
||||
<link rel="stylesheet" href="<?=STATIC_SERVER?>styles/tooltipster/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/tooltipster/style.css')?>" type="text/css" media="screen" />
|
||||
<link rel="stylesheet" href="<?=STATIC_SERVER?>styles/tooltipster/style.css?v=<?=filemtime(SERVER_ROOT.'/public/static/styles/tooltipster/style.css')?>" type="text/css" media="screen" />
|
||||
<?php
|
||||
} ?>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
@@ -96,7 +96,7 @@ if ($UseTooltipster) { ?>
|
||||
if (empty(G::$LoggedUser['StyleURL'])) {
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" title="<?=G::$LoggedUser['StyleName']?>" media="screen"
|
||||
href="<?=STATIC_SERVER?>styles/<?=G::$LoggedUser['StyleName']?>/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/'.G::$LoggedUser['StyleName'].'/style.css')?>" />
|
||||
href="<?=STATIC_SERVER?>styles/<?=G::$LoggedUser['StyleName']?>/style.css?v=<?=filemtime(SERVER_ROOT.'/public/static/styles/'.G::$LoggedUser['StyleName'].'/style.css')?>" />
|
||||
<?php
|
||||
} else {
|
||||
$StyleURLInfo = parse_url(G::$LoggedUser['StyleURL']);
|
||||
@@ -104,7 +104,7 @@ if (empty(G::$LoggedUser['StyleURL'])) {
|
||||
&& $StyleURLInfo['query'].$StyleURLInfo['fragment'] == ''
|
||||
&& in_array($StyleURLInfo['host'], [NONSSL_SITE_URL, SSL_SITE_URL])
|
||||
&& file_exists(SERVER_ROOT.$StyleURLInfo['path'])) {
|
||||
$StyleURL = G::$LoggedUser['StyleURL'].'?v='.filemtime(SERVER_ROOT.$StyleURLInfo['path']);
|
||||
$StyleURL = G::$LoggedUser['StyleURL'].'?v='.filemtime(SERVER_ROOT.'/public/'.$StyleURLInfo['path']);
|
||||
} else {
|
||||
$StyleURL = G::$LoggedUser['StyleURL'];
|
||||
}
|
||||
@@ -116,7 +116,7 @@ if (!empty(G::$LoggedUser['UseOpenDyslexic'])) {
|
||||
// load the OpenDyslexic font
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" charset="utf-8"
|
||||
href="<?=STATIC_SERVER?>styles/opendyslexic/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/opendyslexic/style.css')?>" />
|
||||
href="<?=STATIC_SERVER?>styles/opendyslexic/style.css?v=<?=filemtime(SERVER_ROOT.'/public/static/styles/opendyslexic/style.css')?>" />
|
||||
<?php
|
||||
}
|
||||
$ExtraCSS = explode(',', $CSSIncludes);
|
||||
@@ -125,7 +125,7 @@ foreach ($ExtraCSS as $CSS) {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="<?=STATIC_SERVER."styles/$CSS/style.css?v=".filemtime(SERVER_ROOT."/static/styles/$CSS/style.css")?>" />
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="<?=STATIC_SERVER."styles/$CSS/style.css?v=".filemtime(SERVER_ROOT."/public/static/styles/$CSS/style.css")?>" />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@@ -148,7 +148,7 @@ foreach ($Scripts as $Script) {
|
||||
}
|
||||
?>
|
||||
<script
|
||||
src="<?=STATIC_SERVER?>functions/<?=$Script?>.js?v=<?=filemtime(SERVER_ROOT.'/static/functions/'.$Script.'.js')?>"
|
||||
src="<?=STATIC_SERVER?>functions/<?=$Script?>.js?v=<?=filemtime(SERVER_ROOT.'/public/static/functions/'.$Script.'.js')?>"
|
||||
type="text/javascript"></script>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -14,11 +14,11 @@ define('FOOTER_FILE',SERVER_ROOT.'/design/publicfooter.php');
|
||||
<meta name="viewport" content="width=device-width; initial-scale=1.0;" />
|
||||
<link href="<?=STATIC_SERVER ?>styles/public/style.css?v=<?=filemtime(SERVER_ROOT."/static/styles/public/style.css")?>" rel="stylesheet" type="text/css" />
|
||||
<script src="<?=STATIC_SERVER?>functions/jquery.js" type="text/javascript"></script>
|
||||
<script src="<?=STATIC_SERVER?>functions/script_start.js?v=<?=filemtime(SERVER_ROOT.'/static/functions/script_start.js')?>" type="text/javascript"></script>
|
||||
<script src="<?=STATIC_SERVER?>functions/ajax.class.js?v=<?=filemtime(SERVER_ROOT.'/static/functions/ajax.class.js')?>" type="text/javascript"></script>
|
||||
<script src="<?=STATIC_SERVER?>functions/cookie.class.js?v=<?=filemtime(SERVER_ROOT.'/static/functions/cookie.class.js')?>" type="text/javascript"></script>
|
||||
<script src="<?=STATIC_SERVER?>functions/storage.class.js?v=<?=filemtime(SERVER_ROOT.'/static/functions/storage.class.js')?>" type="text/javascript"></script>
|
||||
<script src="<?=STATIC_SERVER?>functions/global.js?v=<?=filemtime(SERVER_ROOT.'/static/functions/global.js')?>" type="text/javascript"></script>
|
||||
<script src="<?=STATIC_SERVER?>functions/script_start.js?v=<?=filemtime(SERVER_ROOT.'/public/static/functions/script_start.js')?>" type="text/javascript"></script>
|
||||
<script src="<?=STATIC_SERVER?>functions/ajax.class.js?v=<?=filemtime(SERVER_ROOT.'/public/static/functions/ajax.class.js')?>" type="text/javascript"></script>
|
||||
<script src="<?=STATIC_SERVER?>functions/cookie.class.js?v=<?=filemtime(SERVER_ROOT.'/public/static/functions/cookie.class.js')?>" type="text/javascript"></script>
|
||||
<script src="<?=STATIC_SERVER?>functions/storage.class.js?v=<?=filemtime(SERVER_ROOT.'/public/static/functions/storage.class.js')?>" type="text/javascript"></script>
|
||||
<script src="<?=STATIC_SERVER?>functions/global.js?v=<?=filemtime(SERVER_ROOT.'/public/static/functions/global.js')?>" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="maincontent">
|
||||
|
||||
@@ -1 +1 @@
|
||||
<script type="text/javascript" src="static/functions/textareapreview.class.js?v=<?=filemtime(SERVER_ROOT.'/static/functions/textareapreview.class.js')?>"></script>
|
||||
<script type="text/javascript" src="static/functions/textareapreview.class.js?v=<?=filemtime(SERVER_ROOT.'/public/static/functions/textareapreview.class.js')?>"></script>
|
||||
|
||||
@@ -14,6 +14,7 @@ services:
|
||||
- .:/var/www
|
||||
- /var/www/vendor
|
||||
- /var/www/node_modules
|
||||
- .docker/web/nginx.conf:/etc/nginx/sites-available/gazelle.conf
|
||||
|
||||
memcached:
|
||||
image: memcached:1.5-alpine
|
||||
|
||||
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -16,11 +16,11 @@ if (isset($_GET['clearcache'])) {
|
||||
unset($_GET['clearcache']);
|
||||
}
|
||||
|
||||
require_once(__DIR__.'/classes/config.php');
|
||||
require_once(__DIR__.'/classes/classloader.php');
|
||||
require_once(__DIR__.'/classes/time.class.php');
|
||||
require_once(__DIR__.'/classes/paranoia.class.php');
|
||||
require_once(__DIR__.'/classes/util.php');
|
||||
require_once(__DIR__.'/../classes/config.php');
|
||||
require_once(__DIR__.'/../classes/classloader.php');
|
||||
require_once(__DIR__.'/../classes/time.class.php');
|
||||
require_once(__DIR__.'/../classes/paranoia.class.php');
|
||||
require_once(__DIR__.'/../classes/util.php');
|
||||
|
||||
$Cache = new CACHE($MemcachedServers);
|
||||
$DB = new DB_MYSQL;
|
||||
@@ -89,4 +89,4 @@ function display_array($Array, $Escape = []) {
|
||||
header('Expires: '.date('D, d M Y H:i:s', time() + (2 * 60 * 60)).' GMT');
|
||||
header('Last-Modified: '.date('D, d M Y H:i:s').' GMT');
|
||||
header('Content-type: application/json');
|
||||
require_once(SERVER_ROOT.'/sections/api/index.php');
|
||||
require_once(__DIR__.'/../sections/api/index.php');
|
||||
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 814 B After Width: | Height: | Size: 814 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -11,8 +11,8 @@ if (isset($_GET['clearcache'])) {
|
||||
unset($_GET['clearcache']);
|
||||
}
|
||||
|
||||
require_once(__DIR__.'/classes/config.php');
|
||||
require_once(__DIR__.'/classes/classloader.php');
|
||||
require_once(__DIR__.'/../classes/config.php');
|
||||
require_once(__DIR__.'/../classes/classloader.php');
|
||||
|
||||
$Cache = new CACHE($MemcachedServers);
|
||||
$Feed = new Feed;
|
||||
@@ -65,4 +65,4 @@ header('Expires: '.date('D, d M Y H:i:s', time() + (2 * 60 * 60)).' GMT');
|
||||
header('Last-Modified: '.date('D, d M Y H:i:s').' GMT');
|
||||
|
||||
$Feed->UseSSL = (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443);
|
||||
require(__DIR__ . '/sections/feeds/index.php');
|
||||
require(__DIR__ . '/../sections/feeds/index.php');
|
||||
@@ -16,7 +16,7 @@ if (!extension_loaded('gd')) {
|
||||
|
||||
function img_error($Type) {
|
||||
header('Content-type: image/gif');
|
||||
die(file_get_contents(SERVER_ROOT.'/sections/image/'.$Type.'.gif'));
|
||||
die(file_get_contents(__DIR__.'/../sections/image/'.$Type.'.gif'));
|
||||
}
|
||||
|
||||
function invisible($Image) {
|
||||
@@ -98,4 +98,4 @@ function image_height($Type, $Data) {
|
||||
}
|
||||
|
||||
define('SKIP_NO_CACHE_HEADERS', 1);
|
||||
require_once(__DIR__.'/classes/script_start.php');
|
||||
require_once(__DIR__.'/../classes/script_start.php');
|
||||
3
public/index.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
require_once('gazelle.php');
|
||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
header('Content-type: application/opensearchdescription+xml');
|
||||
require_once(__DIR__.'/classes/config.php');
|
||||
require_once(__DIR__.'/../classes/config.php');
|
||||
|
||||
$SSL = ($_SERVER['SERVER_PORT'] === '443');
|
||||
|
||||
@@ -3,4 +3,4 @@ define('MEMORY_EXCEPTION', true);
|
||||
define('TIME_EXCEPTION', true);
|
||||
define('ERROR_EXCEPTION', true);
|
||||
$_SERVER['SCRIPT_FILENAME'] = 'peerupdate.php';
|
||||
require_once(__DIR__.'classes/script_start.php');
|
||||
require_once(__DIR__.'/../classes/script_start.php');
|
||||
|
Before Width: | Height: | Size: 205 KiB After Width: | Height: | Size: 205 KiB |
@@ -3,4 +3,4 @@ define('MEMORY_EXCEPTION', true);
|
||||
define('TIME_EXCEPTION', true);
|
||||
define('ERROR_EXCEPTION', true);
|
||||
$_SERVER['SCRIPT_FILENAME'] = 'schedule.php'; // CLI fix
|
||||
require_once(__DIR__.'/classes/script_start.php');
|
||||
require_once(__DIR__.'/../classes/script_start.php');
|
||||
|
Before Width: | Height: | Size: 42 B After Width: | Height: | Size: 42 B |
|
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 684 KiB After Width: | Height: | Size: 684 KiB |
|
Before Width: | Height: | Size: 660 B After Width: | Height: | Size: 660 B |
|
Before Width: | Height: | Size: 826 B After Width: | Height: | Size: 826 B |
|
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 628 B |
|
Before Width: | Height: | Size: 372 B After Width: | Height: | Size: 372 B |
|
Before Width: | Height: | Size: 861 B After Width: | Height: | Size: 861 B |
|
Before Width: | Height: | Size: 733 B After Width: | Height: | Size: 733 B |
|
Before Width: | Height: | Size: 472 B After Width: | Height: | Size: 472 B |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 681 B After Width: | Height: | Size: 681 B |
|
Before Width: | Height: | Size: 666 B After Width: | Height: | Size: 666 B |
|
Before Width: | Height: | Size: 681 B After Width: | Height: | Size: 681 B |
|
Before Width: | Height: | Size: 680 B After Width: | Height: | Size: 680 B |
|
Before Width: | Height: | Size: 664 B After Width: | Height: | Size: 664 B |
|
Before Width: | Height: | Size: 676 B After Width: | Height: | Size: 676 B |
|
Before Width: | Height: | Size: 683 B After Width: | Height: | Size: 683 B |
|
Before Width: | Height: | Size: 683 B After Width: | Height: | Size: 683 B |
|
Before Width: | Height: | Size: 679 B After Width: | Height: | Size: 679 B |
|
Before Width: | Height: | Size: 144 B After Width: | Height: | Size: 144 B |
|
Before Width: | Height: | Size: 685 B After Width: | Height: | Size: 685 B |
|
Before Width: | Height: | Size: 844 B After Width: | Height: | Size: 844 B |
|
Before Width: | Height: | Size: 654 B After Width: | Height: | Size: 654 B |
|
Before Width: | Height: | Size: 825 B After Width: | Height: | Size: 825 B |
|
Before Width: | Height: | Size: 725 B After Width: | Height: | Size: 725 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 952 B After Width: | Height: | Size: 952 B |
|
Before Width: | Height: | Size: 667 B After Width: | Height: | Size: 667 B |
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 670 B |
|
Before Width: | Height: | Size: 637 B After Width: | Height: | Size: 637 B |
|
Before Width: | Height: | Size: 768 B After Width: | Height: | Size: 768 B |
|
Before Width: | Height: | Size: 679 B After Width: | Height: | Size: 679 B |
|
Before Width: | Height: | Size: 892 B After Width: | Height: | Size: 892 B |
|
Before Width: | Height: | Size: 672 B After Width: | Height: | Size: 672 B |
|
Before Width: | Height: | Size: 678 B After Width: | Height: | Size: 678 B |
|
Before Width: | Height: | Size: 834 B After Width: | Height: | Size: 834 B |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 820 B After Width: | Height: | Size: 820 B |
|
Before Width: | Height: | Size: 677 B After Width: | Height: | Size: 677 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 678 B After Width: | Height: | Size: 678 B |
|
Before Width: | Height: | Size: 679 B After Width: | Height: | Size: 679 B |
|
Before Width: | Height: | Size: 677 B After Width: | Height: | Size: 677 B |
|
Before Width: | Height: | Size: 726 B After Width: | Height: | Size: 726 B |
|
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 243 B |
|
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
|
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 328 B |
|
Before Width: | Height: | Size: 319 B After Width: | Height: | Size: 319 B |
|
Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 321 B |
|
Before Width: | Height: | Size: 309 B After Width: | Height: | Size: 309 B |
|
Before Width: | Height: | Size: 311 B After Width: | Height: | Size: 311 B |
|
Before Width: | Height: | Size: 400 B After Width: | Height: | Size: 400 B |
|
Before Width: | Height: | Size: 147 B After Width: | Height: | Size: 147 B |
|
Before Width: | Height: | Size: 459 B After Width: | Height: | Size: 459 B |
|
Before Width: | Height: | Size: 699 B After Width: | Height: | Size: 699 B |
|
Before Width: | Height: | Size: 522 B After Width: | Height: | Size: 522 B |
|
Before Width: | Height: | Size: 890 B After Width: | Height: | Size: 890 B |
|
Before Width: | Height: | Size: 406 B After Width: | Height: | Size: 406 B |