mirror of
https://github.com/psenough/pouet.net.git
synced 2025-01-16 20:58:27 +01:00
Moved all the cache stuff in the tmp folder
This commit is contained in:
parent
243d85763d
commit
287fded79a
@ -17,7 +17,6 @@ RSYNC="/home/hosted/pouet/bin/rsync \
|
||||
--exclude=othernfo \
|
||||
--exclude=results \
|
||||
--exclude=screenshots \
|
||||
--exclude=include/*.inc \
|
||||
--exclude=rulez/*.log \
|
||||
--exclude=tmp/* \
|
||||
--exclude=include/auth.php \
|
||||
|
3
bin/sync
3
bin/sync
@ -16,7 +16,6 @@ RSYNC="rsync --recursive \
|
||||
--exclude=othernfo \
|
||||
--exclude=results \
|
||||
--exclude=screenshots \
|
||||
--exclude=include/*.inc \
|
||||
--exclude=rulez/*.log \
|
||||
--exclude=tmp/* \
|
||||
--exclude=include/auth.php \
|
||||
@ -39,7 +38,7 @@ function usage()
|
||||
|
||||
copy_cache_from_live_to_test()
|
||||
{
|
||||
ssh pouet cp $LIVE_PATH/include/*.inc $TEST_PATH/include/
|
||||
ssh pouet cp $LIVE_PATH/tmp/* $TEST_PATH/tmp/
|
||||
ssh pouet cp $LIVE_PATH/include/auth.php $TEST_PATH/include/auth.php
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,6 @@ RSYNC="rsync --recursive \
|
||||
--exclude=othernfo \
|
||||
--exclude=results \
|
||||
--exclude=screenshots \
|
||||
--exclude=include/*.inc \
|
||||
--exclude=rulez/*.log \
|
||||
--exclude=include/auth.php \
|
||||
--exclude=LAST_SCENEORG_CHECK \
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?
|
||||
include_once('auth.php');
|
||||
require_once('constants.php');
|
||||
require_once('auth.php');
|
||||
|
||||
// a very useful misc. include file added by melwyn - 19/12/2003
|
||||
|
||||
@ -82,7 +83,7 @@ function isIPBanned() {
|
||||
|
||||
}
|
||||
|
||||
$fp = fopen("include/".$name.".cache.inc", "wb");
|
||||
$fp = fopen(TMP_FOLDER.'/'.$name.'.cache.inc', 'wb');
|
||||
fwrite($fp, "<?\n");
|
||||
|
||||
while(list($k,$v)=each($data))
|
||||
@ -154,7 +155,7 @@ function isIPBanned() {
|
||||
$result=mysql_query($query);
|
||||
$inc_comments=mysql_result($result,0);
|
||||
|
||||
$fp = fopen("include/stats.cache.inc", "wb");
|
||||
$fp = fopen(TMP_FOLDER.'/stats.cache.inc', "wb");
|
||||
fwrite($fp, "<?\n");
|
||||
|
||||
fwrite($fp, "\$nb_demos=\"".$nb_demos."\";\n");
|
||||
|
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
require_once 'include/constants.php';
|
||||
|
||||
// lets send things zipped if we can..
|
||||
|
16
index.php
16
index.php
@ -6,7 +6,7 @@ require_once('lib/lastrss/lastRSS.php');
|
||||
|
||||
if ($user["indexoneliner"]>0)
|
||||
{
|
||||
include('include/onelines.cache.inc');
|
||||
include(TMP_FOLDER.'/onelines.cache.inc');
|
||||
$onelines = array_slice($onelines, 0, $user["indexoneliner"]);
|
||||
}
|
||||
|
||||
@ -25,34 +25,34 @@ $rs = @$rss->GetCached('http://bitfellas.org/e107_plugins/rss_menu/rss.php?1.2')
|
||||
// latest added prods
|
||||
if ($user["indexlatestadded"]>0)
|
||||
{
|
||||
include('include/latest_demos.cache.inc');
|
||||
include(TMP_FOLDER.'/latest_demos.cache.inc');
|
||||
$latest_demos = array_slice($latest_demos, 0, $user["indexlatestadded"]);
|
||||
}
|
||||
|
||||
// latest released prods
|
||||
if ($user["indexlatestreleased"]>0)
|
||||
{
|
||||
include('include/latest_released_prods.cache.inc');
|
||||
include(TMP_FOLDER.'/latest_released_prods.cache.inc');
|
||||
$latest_released_prods = array_slice($latest_released_prods, 0, $user["indexlatestreleased"]);
|
||||
}
|
||||
|
||||
// debut calcul top demos
|
||||
if ($user["indextopprods"]>0)
|
||||
{
|
||||
include('include/top_demos.cache.inc');
|
||||
include(TMP_FOLDER.'/top_demos.cache.inc');
|
||||
$top_demos = array_slice($top_demos, 0, $user["indextopprods"]);
|
||||
}
|
||||
|
||||
if ($user["indextopkeops"]>0)
|
||||
{
|
||||
include('include/top_keops.cache.inc');
|
||||
include(TMP_FOLDER.'/top_keops.cache.inc');
|
||||
$top_keops = array_slice($top_keops, 0, $user["indextopkeops"]);
|
||||
}
|
||||
|
||||
// latest commented prods
|
||||
if ($user["indexlatestcomments"]>0)
|
||||
{
|
||||
include('include/latest_comments.cache.inc');
|
||||
include(TMP_FOLDER.'/latest_comments.cache.inc');
|
||||
$latest_comments = array_slice($latest_comments, 0, $user["indexlatestcomments"]);
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ if ($user["indextopglops"]>0)
|
||||
if ($user["indexstats"]>0)
|
||||
{
|
||||
if (rand(0,11)==0) create_stats_cache();
|
||||
include('include/stats.cache.inc');
|
||||
include(TMP_FOLDER.'/stats.cache.inc');
|
||||
}
|
||||
|
||||
// cdc
|
||||
@ -128,7 +128,7 @@ while($tmp = mysql_fetch_array($result)) {
|
||||
|
||||
if ($user["indexlatestparties"]>0)
|
||||
{
|
||||
include('include/latest_released_parties.cache.inc');
|
||||
include(TMP_FOLDER.'/latest_released_parties.cache.inc');
|
||||
$latest_parties = array_slice($latest_released_parties, 0, $user["indexlatestparties"]);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,7 @@
|
||||
<?
|
||||
<?php
|
||||
require_once('../include/constants.php');
|
||||
require_once('../include/auth.php');
|
||||
|
||||
session_start();
|
||||
if (!($SESSION_LEVEL=='administrator' || $SESSION_LEVEL=='moderator' || $SESSION_LEVEL=='gloperator'))
|
||||
die("OMG");
|
||||
@ -76,7 +79,7 @@ function create_cache_module($name, $query, $domore)
|
||||
|
||||
}
|
||||
|
||||
$fp = fopen("../include/".$name.".cache.inc", "wb");
|
||||
$fp = fopen('../'.TMP_FOLDER.'/'.$name.'.cache.inc', "wb");
|
||||
fwrite($fp, "<?\n");
|
||||
|
||||
while(list($k,$v)=each($data))
|
||||
@ -145,7 +148,7 @@ function create_stats_cache()
|
||||
$result=mysql_query($query);
|
||||
$inc_comments=mysql_result($result,0);
|
||||
|
||||
$fp = fopen("../include/stats.cache.inc", "wb");
|
||||
$fp = fopen('../'.TMP_FOLDER.'/stats.cache.inc', "wb");
|
||||
fwrite($fp, "<?\n");
|
||||
|
||||
fwrite($fp, "\$nb_demos=\"".$nb_demos."\";\n");
|
||||
@ -164,10 +167,6 @@ function create_stats_cache()
|
||||
fwrite($fp, "?>\n");
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
//require('../include/misc.php'); cant use that include couz i need relative path of /include/
|
||||
|
||||
|
||||
?>
|
||||
options:
|
||||
- all
|
||||
@ -209,7 +208,6 @@ if ($ojuice||$all)
|
||||
print("ojuice stage 2!<br />");
|
||||
}
|
||||
|
||||
require_once("../include/auth.php");
|
||||
$dbinfo=$db;
|
||||
$db=mysql_connect($dbinfo['host'],$dbinfo['user'], $dbinfo['password']);
|
||||
mysql_select_db($dbinfo['database'],$db);
|
||||
|
Loading…
x
Reference in New Issue
Block a user