aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/bbcode.php32
-rw-r--r--phpBB/includes/constants.php1
-rw-r--r--phpBB/includes/functions.php8
3 files changed, 41 insertions, 0 deletions
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index b1a6a794cc..b7c1028db4 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -440,6 +440,38 @@ function make_clickable($text)
return($ret);
}
+/**
+ * Nathan Codding - Feb 6, 2001
+ * Reverses the effects of make_clickable(), for use in editpost.
+ * - Does not distinguish between "www.xxxx.yyyy" and "http://aaaa.bbbb" type URLs.
+ *
+ */
+
+function undo_make_clickable($text) {
+
+ $text = preg_replace("#<!-- BBCode auto-link start --><a href=\"(.*?)\" target=\"_blank\">.*?</a><!-- BBCode auto-link end -->#i", "\\1", $text);
+ $text = preg_replace("#<!-- BBcode auto-mailto start --><a href=\"mailto:(.*?)\">.*?</a><!-- BBCode auto-mailto end -->#i", "\\1", $text);
+
+ return $text;
+
+}
+
+
+
+/**
+ * Nathan Codding - August 24, 2000.
+ * Takes a string, and does the reverse of the PHP standard function
+ * htmlspecialchars().
+ */
+function undo_htmlspecialchars($input) {
+ $input = preg_replace("/&gt;/i", ">", $input);
+ $input = preg_replace("/&lt;/i", "<", $input);
+ $input = preg_replace("/&quot;/i", "\"", $input);
+ $input = preg_replace("/&amp;/i", "&", $input);
+
+ return $input;
+}
+
/**
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index 0957ed8d9e..3f0e70e4ba 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -68,6 +68,7 @@ define(LOGIN_FAILED, 7);
define(POST_TOPIC_URL, 't');
define(POST_FORUM_URL, 'f');
define(POST_USERS_URL, 'u');
+define(POST_POST_URL, 'p');
// Session parameters
define(SESSION_METHOD_COOKIE, 100);
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 9106c2c5ec..08cc9ed8f2 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -272,6 +272,14 @@ function create_date($format, $gmepoch, $tz)
}
//
+// Create a GMT timestamp
+//
+function get_gmt_ts()
+{
+ return(gmmktime(gmdate("H, i, s, m, d, Y")));
+}
+
+//
// Pagination routine, generates
// page number sequence
//