aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-07-10 21:34:52 -0700
committerfriendica <info@friendica.com>2014-07-10 21:34:52 -0700
commitc74fd789935e19074e2799b5201654ffe3bfce5c (patch)
tree4778b979ba14b16b2b994c1ee8279ee133ecf060 /boot.php
parentf2c54cfcaf9d154970a4a4c99384e267f8699022 (diff)
downloadvolse-hubzilla-c74fd789935e19074e2799b5201654ffe3bfce5c.tar.gz
volse-hubzilla-c74fd789935e19074e2799b5201654ffe3bfce5c.tar.bz2
volse-hubzilla-c74fd789935e19074e2799b5201654ffe3bfce5c.zip
move smarty compiled files to store/[data]/smarty3 - which puts all writeable areas of the server except the config file and logs under the "store" directory. We'll do logs at a future time.
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/boot.php b/boot.php
index c3ea2a854..e6bbbee2f 100755
--- a/boot.php
+++ b/boot.php
@@ -47,11 +47,12 @@ define ( 'RED_PLATFORM', 'Red Matrix' );
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
define ( 'ZOT_REVISION', 1 );
-define ( 'DB_UPDATE_VERSION', 1116 );
+define ( 'DB_UPDATE_VERSION', 1117 );
define ( 'EOL', '<br />' . "\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
+define ( 'TEMPLATE_BUILD_PATH', 'store/[data]/smarty3' );
define ( 'DIRECTORY_MODE_NORMAL', 0x0000); // This is technically DIRECTORY_MODE_TERTIARY, but it's the default, hence 0x0000
define ( 'DIRECTORY_MODE_PRIMARY', 0x0001);
@@ -1062,8 +1063,8 @@ class App {
/*if ($engine) {
case 'smarty3':
- if(!is_writable('view/tpl/smarty3/'))
- echo "<b>ERROR</b> folder <tt>view/tpl/smarty3/</tt> must be writable by webserver."; killme();
+ if(!is_writable(TEMPLATE_BUILD_PATH))
+ echo "<b>ERROR</b> folder <tt>" . TEMPLATE_BUILD_PATH . "</tt> must be writable by webserver."; killme();
break;
default:
@@ -1256,10 +1257,11 @@ function check_config(&$a) {
$func = 'update_r' . $x;
$retval = $func();
if($retval) {
+
// Prevent sending hundreds of thousands of emails by creating
- // a lockfile. view/tpl/smarty3 is the only place we can
- // guarantee the server can write to.
- $lockfile = 'view/tpl/smarty3/mailsent';
+ // a lockfile.
+
+ $lockfile = 'store/[data]/mailsent';
if ((file_exists($lockfile)) && (filemtime($lockfile) > (time() - 86400)))
return;