aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-11-08 19:49:57 -0800
committerzotlabs <mike@macgirvin.com>2018-11-08 19:49:57 -0800
commitd56e1f6285fd2e4cc7b2f9cd88df88a26c5d2ad7 (patch)
treebecc824f9d7da04fb31c5ef00406cf27a929d34e /include/text.php
parent22b3ddab66f128ca05a42ebfccda0964bddd7509 (diff)
downloadvolse-hubzilla-d56e1f6285fd2e4cc7b2f9cd88df88a26c5d2ad7.tar.gz
volse-hubzilla-d56e1f6285fd2e4cc7b2f9cd88df88a26c5d2ad7.tar.bz2
volse-hubzilla-d56e1f6285fd2e4cc7b2f9cd88df88a26c5d2ad7.zip
begin native summary support
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php23
1 files changed, 21 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php
index 15cc0ca8a..3d351f7dc 100644
--- a/include/text.php
+++ b/include/text.php
@@ -3,8 +3,11 @@
* @file include/text.php
*/
-use \Zotlabs\Lib as Zlib;
-use \Michelf\MarkdownExtra;
+use Zotlabs\Lib as Zlib;
+
+use Michelf\MarkdownExtra;
+use Ramsey\Uuid\Uuid;
+use Ramsey\Uuid\Exception\UnsatisfiedDependencyException;
require_once("include/bbcode.php");
@@ -3467,3 +3470,19 @@ function print_val($v) {
return $v;
}
+
+/**
+ * @brief Generate a unique ID.
+ *
+ * @return string
+ */
+function new_uuid() {
+
+ try {
+ $hash = Uuid::uuid4()->toString();
+ } catch (UnsatisfiedDependencyException $e) {
+ $hash = random_string(48);
+ }
+
+ return $hash;
+}