summaryrefslogtreecommitdiffstats
path: root/wp-inst/wp-admin/admin-functions.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-09-16 10:58:22 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-09-16 10:58:22 +0000
commit6ef403f52cb9d755a32535482ae0bedf793cfb5d (patch)
tree87ff8208c1f40dd81f4a9f7c57b3a282c974c42d /wp-inst/wp-admin/admin-functions.php
parent1ddd64978b062c9d7636012d247e0475e1f5f925 (diff)
downloadwordpress-mu-6ef403f52cb9d755a32535482ae0bedf793cfb5d.tar.gz
wordpress-mu-6ef403f52cb9d755a32535482ae0bedf793cfb5d.tar.xz
wordpress-mu-6ef403f52cb9d755a32535482ae0bedf793cfb5d.zip
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@335 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-admin/admin-functions.php')
-rw-r--r--wp-inst/wp-admin/admin-functions.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/wp-inst/wp-admin/admin-functions.php b/wp-inst/wp-admin/admin-functions.php
index 8a7b6a7..5db2579 100644
--- a/wp-inst/wp-admin/admin-functions.php
+++ b/wp-inst/wp-admin/admin-functions.php
@@ -480,7 +480,6 @@ function wp_delete_user($id, $reassign = 'novalue') {
return true;
}
-
function post_exists($title, $content = '', $post_date = '') {
global $wpdb;
@@ -495,6 +494,13 @@ function post_exists($title, $content = '', $post_date = '') {
return 0;
}
+function comment_exists($comment_author, $comment_date) {
+ global $wpdb;
+
+ return $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments
+ WHERE comment_author = '$comment_author' AND comment_date = '$comment_date'");
+}
+
function url_shorten ($url) {
$short_url = str_replace('http://', '', stripslashes($url));
$short_url = str_replace('www.', '', $short_url);
@@ -959,9 +965,9 @@ function insert_with_markers($filename, $marker, $insertion) {
if ($markerdata) {
$state = true;
foreach($markerdata as $markerline) {
- if (strstr($markerline, "# BEGIN {$marker}\n")) $state = false;
+ if (strstr($markerline, "# BEGIN {$marker}")) $state = false;
if ($state) fwrite($f, "{$markerline}\n");
- if (strstr($markerline, "# END {$marker}\n")) {
+ if (strstr($markerline, "# END {$marker}")) {
fwrite($f, "# BEGIN {$marker}\n");
if(is_array($insertion)) foreach($insertion as $insertline) fwrite($f, "{$insertline}\n");
fwrite($f, "# END {$marker}\n");