summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2011-04-06 18:31:26 +1000
committerSavetheinternet <savetheinternet@n0v4.com>2011-04-06 18:31:26 +1000
commit08bbd3f9127204aa4bc8be18fdc6ca6d68d88ff1 (patch)
tree28c204c3907e70f0e49620658f8736d9258c4dce /post.php
parent10bd465ea366023769b047050d48b0e81d513b9b (diff)
Post saving/cache and Google Analytics integration
Diffstat (limited to 'post.php')
-rw-r--r--post.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/post.php b/post.php
index faa4cecc..88bdf3ae 100644
--- a/post.php
+++ b/post.php
@@ -460,6 +460,16 @@
buildIndex();
sql_close();
+ // Tell Javascript that we posted successfully
+ if(isset($_COOKIE[$config['cookies']['js']]))
+ $js = json_decode($_COOKIE[$config['cookies']['js']]);
+ else
+ $js = Array();
+ // Tell it to delete the cached post for referer
+ $js->{$_SERVER['HTTP_REFERER']} = true;
+ // Encode and set cookie
+ setcookie($config['cookies']['js'], json_encode($js), 0, $config['cookies']['jail']?$config['cookies']['path']:'/', null, false, false);
+
$root = $post['mod'] ? $config['root'] . $config['file_mod'] . '?/' : $config['root'];
if($config['always_noko'] || $noko) {