aboutsummaryrefslogtreecommitdiffstats
path: root/library/ajaxchat/chat/lib/class/AJAXChatFileSystem.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-18 23:49:39 -0800
committerfriendica <info@friendica.com>2014-01-18 23:49:39 -0800
commit724ad4505628d493b43b4f585512d67dc0b4ee76 (patch)
tree4fb920a79e3dff961a6301ec56ec9f40e91f6af3 /library/ajaxchat/chat/lib/class/AJAXChatFileSystem.php
parent3f7032e542e3c451507fc9266ab3536155c8190f (diff)
downloadvolse-hubzilla-724ad4505628d493b43b4f585512d67dc0b4ee76.tar.gz
volse-hubzilla-724ad4505628d493b43b4f585512d67dc0b4ee76.tar.bz2
volse-hubzilla-724ad4505628d493b43b4f585512d67dc0b4ee76.zip
add ajaxchat library - needs a lot of integration work to handle decentralisation (e.g. chatroom@website) and zotid w/permissions (e.g. ACL controlled chatrooms); we can also rip out a lot of stuff we don't need.
Diffstat (limited to 'library/ajaxchat/chat/lib/class/AJAXChatFileSystem.php')
-rw-r--r--library/ajaxchat/chat/lib/class/AJAXChatFileSystem.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/library/ajaxchat/chat/lib/class/AJAXChatFileSystem.php b/library/ajaxchat/chat/lib/class/AJAXChatFileSystem.php
new file mode 100644
index 000000000..c9626c36a
--- /dev/null
+++ b/library/ajaxchat/chat/lib/class/AJAXChatFileSystem.php
@@ -0,0 +1,22 @@
+<?php
+/*
+ * @package AJAX_Chat
+ * @author Sebastian Tschan
+ * @copyright (c) Sebastian Tschan
+ * @license Modified MIT License
+ * @link https://blueimp.net/ajax/
+ */
+
+// Class to provide methods for file system access:
+class AJAXChatFileSystem {
+
+ public static function getFileContents($file) {
+ if(function_exists('file_get_contents')) {
+ return file_get_contents($file);
+ } else {
+ return(implode('', file($file)));
+ }
+ }
+
+}
+?> \ No newline at end of file