This commit has been accessed 550 times via Git panel.
commit e6f4bdde48b940ce7dbacdbc7d19da2465755bc4
tree d72f45906f1c0af711b3e250cbbd8f2de2a76b8e
parent 355df227986be7bfeaceb1907d29824304e73a62
author Engels Antonio <engels@majcms.org> 1277314211 +0800
committer Engels Antonio <engels@majcms.org> 1277314211 +0800
maj-1.0-20090328-bb.zip
diff --git a/move.php b/move.php
index b997755..e912d9b 100644
--- a/move.php
+++ b/move.php
@@ -63,6 +63,20 @@ function rmdirr($recurse_dirname) {
return rmdir($recurse_dirname);
}
+if ($dh_items = opendir("data/items")) {
+
+ while (($entry_item = readdir($dh_items)) !== false) {
+
+ if ($entry_item != "." && $entry_item != ".." && ($_REQUEST['entry'] != $entry_item)) {
+ $target_items[] = $entry_item;
+ }
+ }
+ closedir($dh_items);
+}
+
+rsort($target_items);
+reset($target_items);
+
if (isset($_POST['target']) and !empty($_POST['target'])) {
$target = trim($_POST['target']);
@@ -170,24 +184,29 @@ if (isset($_POST['target']) and !empty($_POST['target'])) {
}
}
- header("Location: index.php?entry=$target&show=comments");
+ if ($dh_members = opendir("data/members/active")) {
- exit();
-}
+ while (($target_member = readdir($dh_members)) !== false) {
-if ($dh_items = opendir("data/items")) {
+ if ($target_member != "." && $target_member != "..") {
+
+ if (file_exists("data/members/active/$target_member/comments/unread/$entry")) {
- while (($entry_item = readdir($dh_items)) !== false) {
+ if (!file_exists("data/members/active/$target_member/comments/unread/$target")) {
+ mkdir("data/members/active/$target_member/comments/unread/$target");
+ }
- if ($entry_item != "." && $entry_item != ".." && ($_REQUEST['entry'] != $entry_item)) {
- $target_items[] = $entry_item;
+ rmdirr("data/members/active/$target_member/comments/unread/$entry");
+ }
+ }
}
+ closedir($dh_members);
}
- closedir($dh_items);
-}
-rsort($target_items);
-reset($target_items);
+ header("Location: index.php?entry=$target&show=comments");
+
+ exit();
+}
?>
diff --git a/rel.txt b/rel.txt
index d80faf4..9bf63ec 100644
--- a/rel.txt
+++ b/rel.txt
@@ -1 +1 @@
-20090211
\ No newline at end of file
+20090328
\ No newline at end of file
tree d72f45906f1c0af711b3e250cbbd8f2de2a76b8e
parent 355df227986be7bfeaceb1907d29824304e73a62
author Engels Antonio <engels@majcms.org> 1277314211 +0800
committer Engels Antonio <engels@majcms.org> 1277314211 +0800
maj-1.0-20090328-bb.zip
diff --git a/move.php b/move.php
index b997755..e912d9b 100644
--- a/move.php
+++ b/move.php
@@ -63,6 +63,20 @@ function rmdirr($recurse_dirname) {
return rmdir($recurse_dirname);
}
+if ($dh_items = opendir("data/items")) {
+
+ while (($entry_item = readdir($dh_items)) !== false) {
+
+ if ($entry_item != "." && $entry_item != ".." && ($_REQUEST['entry'] != $entry_item)) {
+ $target_items[] = $entry_item;
+ }
+ }
+ closedir($dh_items);
+}
+
+rsort($target_items);
+reset($target_items);
+
if (isset($_POST['target']) and !empty($_POST['target'])) {
$target = trim($_POST['target']);
@@ -170,24 +184,29 @@ if (isset($_POST['target']) and !empty($_POST['target'])) {
}
}
- header("Location: index.php?entry=$target&show=comments");
+ if ($dh_members = opendir("data/members/active")) {
- exit();
-}
+ while (($target_member = readdir($dh_members)) !== false) {
-if ($dh_items = opendir("data/items")) {
+ if ($target_member != "." && $target_member != "..") {
+
+ if (file_exists("data/members/active/$target_member/comments/unread/$entry")) {
- while (($entry_item = readdir($dh_items)) !== false) {
+ if (!file_exists("data/members/active/$target_member/comments/unread/$target")) {
+ mkdir("data/members/active/$target_member/comments/unread/$target");
+ }
- if ($entry_item != "." && $entry_item != ".." && ($_REQUEST['entry'] != $entry_item)) {
- $target_items[] = $entry_item;
+ rmdirr("data/members/active/$target_member/comments/unread/$entry");
+ }
+ }
}
+ closedir($dh_members);
}
- closedir($dh_items);
-}
-rsort($target_items);
-reset($target_items);
+ header("Location: index.php?entry=$target&show=comments");
+
+ exit();
+}
?>
diff --git a/rel.txt b/rel.txt
index d80faf4..9bf63ec 100644
--- a/rel.txt
+++ b/rel.txt
@@ -1 +1 @@
-20090211
\ No newline at end of file
+20090328
\ No newline at end of file