This commit has been accessed 572 times via Git panel.
commit bdfbfda438421cd407a8c38eb1992df95261e557
tree 38636def519d6ff715b4674b6ee8af20c2fd72a7
parent daf4deead9936f5bac8137aa99d5b3260a68c66a
author Engels Antonio <engels@majcms.org> 1277314210 +0800
committer Engels Antonio <engels@majcms.org> 1277314210 +0800
maj-1.0-20090205-bb.zip
diff --git a/album.php b/album.php
index 08231cc..c1a3312 100644
--- a/album.php
+++ b/album.php
@@ -54,6 +54,10 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
if (file_exists("data/items/{$_REQUEST['entry']}/album/views/{$_REQUEST['show']}.txt")) {
unlink("data/items/{$_REQUEST['entry']}/album/views/{$_REQUEST['show']}.txt");
}
+
+ if (count(glob("images/{$_REQUEST['entry']}/album/*")) < 1) {
+ header("Location: index.php?entry={$_REQUEST['entry']}");
+ }
}
if (isset($_POST['filename']) and !empty($_POST['filename']) and isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and isset($_POST['edit']) and ($_POST['edit'] == "rename") and !file_exists("images/{$_REQUEST['entry']}/album/{$_POST['filename']}")) {
diff --git a/index.php b/index.php
index 25f9fdd..0bee35b 100644
--- a/index.php
+++ b/index.php
@@ -3535,6 +3535,18 @@ foreach ($disp as $d) {
}
$entry_body = preg_replace("/\b($badwords)\b/i",$censor,$entry_body);
}
+
+ if (file_exists("data/items/$d/shorten.txt")) {
+
+ $entry_shorten = file_get_contents("data/items/$d/shorten.txt");
+
+ $entry_lines = explode("\r",$entry_body);
+
+ if (count($entry_lines) > $entry_shorten) {
+ $entry_body = implode("",array_slice($entry_lines,0,$entry_shorten));
+ }
+ }
+
echo $entry_body;
}
diff --git a/rel.txt b/rel.txt
index 105c62b..cab0f10 100644
--- a/rel.txt
+++ b/rel.txt
@@ -1 +1 @@
-20090129
\ No newline at end of file
+20090205
\ No newline at end of file
tree 38636def519d6ff715b4674b6ee8af20c2fd72a7
parent daf4deead9936f5bac8137aa99d5b3260a68c66a
author Engels Antonio <engels@majcms.org> 1277314210 +0800
committer Engels Antonio <engels@majcms.org> 1277314210 +0800
maj-1.0-20090205-bb.zip
diff --git a/album.php b/album.php
index 08231cc..c1a3312 100644
--- a/album.php
+++ b/album.php
@@ -54,6 +54,10 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
if (file_exists("data/items/{$_REQUEST['entry']}/album/views/{$_REQUEST['show']}.txt")) {
unlink("data/items/{$_REQUEST['entry']}/album/views/{$_REQUEST['show']}.txt");
}
+
+ if (count(glob("images/{$_REQUEST['entry']}/album/*")) < 1) {
+ header("Location: index.php?entry={$_REQUEST['entry']}");
+ }
}
if (isset($_POST['filename']) and !empty($_POST['filename']) and isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and isset($_POST['edit']) and ($_POST['edit'] == "rename") and !file_exists("images/{$_REQUEST['entry']}/album/{$_POST['filename']}")) {
diff --git a/index.php b/index.php
index 25f9fdd..0bee35b 100644
--- a/index.php
+++ b/index.php
@@ -3535,6 +3535,18 @@ foreach ($disp as $d) {
}
$entry_body = preg_replace("/\b($badwords)\b/i",$censor,$entry_body);
}
+
+ if (file_exists("data/items/$d/shorten.txt")) {
+
+ $entry_shorten = file_get_contents("data/items/$d/shorten.txt");
+
+ $entry_lines = explode("\r",$entry_body);
+
+ if (count($entry_lines) > $entry_shorten) {
+ $entry_body = implode("",array_slice($entry_lines,0,$entry_shorten));
+ }
+ }
+
echo $entry_body;
}
diff --git a/rel.txt b/rel.txt
index 105c62b..cab0f10 100644
--- a/rel.txt
+++ b/rel.txt
@@ -1 +1 @@
-20090129
\ No newline at end of file
+20090205
\ No newline at end of file