This commit has been accessed 579 times via Git panel.
commit 7a4dead464fb20ecebee07e80fcb21431af3dd08
tree 660433fc6ef859dbc93c60bc77c87ad86e229855
parent 7c6900f07fda98936889b0e7b7e3bf6a16478aab
author Engels Antonio <engels@majcms.org> 1277314216 +0800
committer Engels Antonio <engels@majcms.org> 1277314216 +0800
maj-2.0-201006180340.zip
diff --git a/add.php b/add.php
index 88a156c..60f4698 100644
--- a/add.php
+++ b/add.php
@@ -1037,21 +1037,16 @@ if (isset($_POST['passwd']) and !empty($_POST['passwd'])) {
}
}
-$default_ping_url = "http://technorati.com/ping/http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']);
+if (file_exists("data/ping.txt")) {
-if (!file_exists("data/ping.txt")) {
- $fp_default_ping_txt = fopen("data/ping.txt","w");
- fwrite($fp_default_ping_txt, $default_ping_url);
- fclose($fp_default_ping_txt);
-}
-
-$ping_urls = file_get_contents("data/ping.txt");
+ $ping_urls = file_get_contents("data/ping.txt");
-$get_ping_urls = explode("|", $ping_urls);
+ $get_ping_urls = explode("|", $ping_urls);
-foreach ($get_ping_urls as $ping_url) {
- $ping = file_get_contents($ping_url);
- unset($ping);
+ foreach ($get_ping_urls as $ping_url) {
+ $ping = file_get_contents($ping_url);
+ unset($ping);
+ }
}
?>
diff --git a/edit.php b/edit.php
index 8e3ea52..d3c95a1 100644
--- a/edit.php
+++ b/edit.php
@@ -1502,19 +1502,14 @@ if (file_exists("data/items/{$_REQUEST['entry']}/body.old")) {
unlink("data/items/{$_REQUEST['entry']}/body.old");
}
-$default_ping_url = "http://technorati.com/ping/http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']);
+if (file_exists("data/ping.txt")) {
-if (!file_exists("data/ping.txt")) {
- $fp_default_ping_txt = fopen("data/ping.txt","w");
- fwrite($fp_default_ping_txt, $default_ping_url);
- fclose($fp_default_ping_txt);
-}
-
-$ping_urls = explode("|", file_get_contents("data/ping.txt"));
+ $ping_urls = explode("|", file_get_contents("data/ping.txt"));
-foreach ($ping_urls as $ping_url) {
- $ping = file_get_contents($ping_url);
- unset($ping);
+ foreach ($ping_urls as $ping_url) {
+ $ping = file_get_contents($ping_url);
+ unset($ping);
+ }
}
?>
diff --git a/index.php b/index.php
index a6e3300..654ca5c 100644
--- a/index.php
+++ b/index.php
@@ -4017,6 +4017,22 @@ foreach ($maj_disp as $maj_d) {
}
else {
+ if ($maj_dh_count = opendir("data/items/$maj_d/filedrop/count")) {
+
+ while (($maj_dl_count = readdir($maj_dh_count)) !== false) {
+
+ if ($maj_dl_count != "." && $maj_dl_count != "..") {
+
+ $maj_dl_match = substr("$maj_dl_count",0,-4);
+
+ if (file_exists("data/items/$maj_d/filedrop/count/$maj_dl_count") and !file_exists("data/items/$maj_d/filedrop/files/$maj_dl_match")) {
+ unlink("data/items/$maj_d/filedrop/count/$maj_dl_count");
+ }
+ }
+ }
+ closedir($maj_dh_count);
+ }
+
if ($maj_dh_filedrop = opendir("data/items/$maj_d/filedrop/files")) {
while (($maj_dl_file = readdir($maj_dh_filedrop)) !== false) {
if ($maj_dl_file != "." && $maj_dl_file != "..") {
diff --git a/rel.txt b/rel.txt
index 3ea4ea2..5379875 100644
--- a/rel.txt
+++ b/rel.txt
@@ -1 +1 @@
-201006171846
+201006180340
tree 660433fc6ef859dbc93c60bc77c87ad86e229855
parent 7c6900f07fda98936889b0e7b7e3bf6a16478aab
author Engels Antonio <engels@majcms.org> 1277314216 +0800
committer Engels Antonio <engels@majcms.org> 1277314216 +0800
maj-2.0-201006180340.zip
diff --git a/add.php b/add.php
index 88a156c..60f4698 100644
--- a/add.php
+++ b/add.php
@@ -1037,21 +1037,16 @@ if (isset($_POST['passwd']) and !empty($_POST['passwd'])) {
}
}
-$default_ping_url = "http://technorati.com/ping/http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']);
+if (file_exists("data/ping.txt")) {
-if (!file_exists("data/ping.txt")) {
- $fp_default_ping_txt = fopen("data/ping.txt","w");
- fwrite($fp_default_ping_txt, $default_ping_url);
- fclose($fp_default_ping_txt);
-}
-
-$ping_urls = file_get_contents("data/ping.txt");
+ $ping_urls = file_get_contents("data/ping.txt");
-$get_ping_urls = explode("|", $ping_urls);
+ $get_ping_urls = explode("|", $ping_urls);
-foreach ($get_ping_urls as $ping_url) {
- $ping = file_get_contents($ping_url);
- unset($ping);
+ foreach ($get_ping_urls as $ping_url) {
+ $ping = file_get_contents($ping_url);
+ unset($ping);
+ }
}
?>
diff --git a/edit.php b/edit.php
index 8e3ea52..d3c95a1 100644
--- a/edit.php
+++ b/edit.php
@@ -1502,19 +1502,14 @@ if (file_exists("data/items/{$_REQUEST['entry']}/body.old")) {
unlink("data/items/{$_REQUEST['entry']}/body.old");
}
-$default_ping_url = "http://technorati.com/ping/http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']);
+if (file_exists("data/ping.txt")) {
-if (!file_exists("data/ping.txt")) {
- $fp_default_ping_txt = fopen("data/ping.txt","w");
- fwrite($fp_default_ping_txt, $default_ping_url);
- fclose($fp_default_ping_txt);
-}
-
-$ping_urls = explode("|", file_get_contents("data/ping.txt"));
+ $ping_urls = explode("|", file_get_contents("data/ping.txt"));
-foreach ($ping_urls as $ping_url) {
- $ping = file_get_contents($ping_url);
- unset($ping);
+ foreach ($ping_urls as $ping_url) {
+ $ping = file_get_contents($ping_url);
+ unset($ping);
+ }
}
?>
diff --git a/index.php b/index.php
index a6e3300..654ca5c 100644
--- a/index.php
+++ b/index.php
@@ -4017,6 +4017,22 @@ foreach ($maj_disp as $maj_d) {
}
else {
+ if ($maj_dh_count = opendir("data/items/$maj_d/filedrop/count")) {
+
+ while (($maj_dl_count = readdir($maj_dh_count)) !== false) {
+
+ if ($maj_dl_count != "." && $maj_dl_count != "..") {
+
+ $maj_dl_match = substr("$maj_dl_count",0,-4);
+
+ if (file_exists("data/items/$maj_d/filedrop/count/$maj_dl_count") and !file_exists("data/items/$maj_d/filedrop/files/$maj_dl_match")) {
+ unlink("data/items/$maj_d/filedrop/count/$maj_dl_count");
+ }
+ }
+ }
+ closedir($maj_dh_count);
+ }
+
if ($maj_dh_filedrop = opendir("data/items/$maj_d/filedrop/files")) {
while (($maj_dl_file = readdir($maj_dh_filedrop)) !== false) {
if ($maj_dl_file != "." && $maj_dl_file != "..") {
diff --git a/rel.txt b/rel.txt
index 3ea4ea2..5379875 100644
--- a/rel.txt
+++ b/rel.txt
@@ -1 +1 @@
-201006171846
+201006180340