';
foreach($albums as $album) {
- // don't show contact photos. We once trasnlated this name, but then you could still access it under
+ // don't show contact photos. We once translated this name, but then you could still access it under
// a different language setting. Now we store the name in English and check in English (and translated for legacy albums).
if((! strlen($album['album'])) || ($album['album'] === 'Contact Photos') || ($album['album'] === t('Contact Photos')))
--
cgit v1.2.3
From d6d24f3b6a2fcd853387ff5338a89687e498300c Mon Sep 17 00:00:00 2001
From: Friendika
Date: Mon, 19 Sep 2011 16:51:52 -0700
Subject: personal notes going to wall instead of PN in dispy
---
view/theme/dispy/jot.tpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/view/theme/dispy/jot.tpl b/view/theme/dispy/jot.tpl
index d5e81a925..f6bf91ffa 100644
--- a/view/theme/dispy/jot.tpl
+++ b/view/theme/dispy/jot.tpl
@@ -9,7 +9,7 @@
+
+
+
--
cgit v1.2.3
From 4846d114a84b0c7da64501ea89a635d24e403a1d Mon Sep 17 00:00:00 2001
From: Friendika
Date: Sun, 25 Sep 2011 01:59:14 -0700
Subject: project fork
---
LICENSE | 14 +
README | 86 --
addon/README | 186 ---
addon/calc/calc.php | 363 -----
addon/convert/UnitConvertor.php | 283 ----
addon/convert/convert.php | 228 ----
addon/facebook/README | 39 -
addon/facebook/facebook.css | 13 -
addon/facebook/facebook.php | 1059 ---------------
addon/fortunate/fortunate.css | 7 -
addon/fortunate/fortunate.php | 27 -
addon/impressum/README | 27 -
addon/impressum/admin.tpl | 6 -
addon/impressum/impressum.php | 76 --
addon/js_upload/file-uploader/client/demo.htm | 38 -
.../js_upload/file-uploader/client/do-nothing.htm | 1 -
.../file-uploader/client/fileuploader.css | 31 -
.../js_upload/file-uploader/client/fileuploader.js | 1247 -----------------
addon/js_upload/file-uploader/client/loading.gif | Bin 1688 -> 0 bytes
addon/js_upload/file-uploader/gpl-2.0.txt | 339 -----
addon/js_upload/file-uploader/license.txt | 24 -
addon/js_upload/file-uploader/readme.md | 152 ---
.../file-uploader/server/OctetStreamReader.java | 125 --
.../file-uploader/server/coldfusion/coldfusion.cfc | 1 -
.../file-uploader/server/coldfusion/demo.cfm | 1 -
.../file-uploader/server/coldfusion/readme.txt | 9 -
addon/js_upload/file-uploader/server/perl.cgi | 62 -
addon/js_upload/file-uploader/server/php.php | 162 ---
addon/js_upload/file-uploader/server/readme.txt | 18 -
.../file-uploader/server/uploads/.gitignore | 2 -
.../file-uploader/tests/action-acceptance.php | 46 -
.../tests/action-handler-queue-test.php | 31 -
.../file-uploader/tests/action-handler-test.php | 31 -
.../file-uploader/tests/action-slow-response.php | 2 -
.../tests/browser-bugs/safari-bug1.htm | 9 -
.../tests/browser-bugs/safari-bug2.htm | 19 -
.../application-javascript.php | 1 -
.../iframe-content-tests/application-json.php | 1 -
.../tests/iframe-content-tests/header-404.php | 2 -
.../tests/iframe-content-tests/somepage.php | 1 -
.../tests/iframe-content-tests/text-html-large.php | 6 -
.../tests/iframe-content-tests/text-html.php | 7 -
.../tests/iframe-content-tests/text-javascript.php | 1 -
.../tests/iframe-content-tests/text-plain.php | 2 -
.../file-uploader/tests/jquery-1.4.2.min.js | 154 ---
.../tests/jquery-ui/jquery-ui-1.8.4.custom.min.js | 200 ---
.../ui-bg_diagonals-thick_18_b81900_40x40.png | Bin 260 -> 0 bytes
.../ui-bg_diagonals-thick_20_666666_40x40.png | Bin 251 -> 0 bytes
.../images/ui-bg_flat_10_000000_40x100.png | Bin 178 -> 0 bytes
.../images/ui-bg_glass_100_f6f6f6_1x400.png | Bin 104 -> 0 bytes
.../images/ui-bg_glass_100_fdf5ce_1x400.png | Bin 125 -> 0 bytes
.../images/ui-bg_glass_65_ffffff_1x400.png | Bin 105 -> 0 bytes
.../images/ui-bg_gloss-wave_35_f6a828_500x100.png | Bin 4427 -> 0 bytes
.../ui-bg_highlight-soft_100_eeeeee_1x100.png | Bin 90 -> 0 bytes
.../ui-bg_highlight-soft_75_ffe45c_1x100.png | Bin 129 -> 0 bytes
.../images/ui-icons_222222_256x240.png | Bin 4369 -> 0 bytes
.../images/ui-icons_228ef1_256x240.png | Bin 4369 -> 0 bytes
.../images/ui-icons_ef8c08_256x240.png | Bin 4369 -> 0 bytes
.../images/ui-icons_ffd27a_256x240.png | Bin 4369 -> 0 bytes
.../images/ui-icons_ffffff_256x240.png | Bin 4369 -> 0 bytes
.../ui-lightness/jquery-ui-1.8.4.custom.css | 334 -----
.../file-uploader/tests/qunit/package.json | 21 -
.../file-uploader/tests/qunit/qunit/qunit.css | 119 --
.../file-uploader/tests/qunit/qunit/qunit.js | 1069 ---------------
.../file-uploader/tests/qunit/test/index.html | 17 -
.../file-uploader/tests/qunit/test/same.js | 1423 --------------------
.../file-uploader/tests/qunit/test/test.js | 171 ---
.../1imagelonglonglonglonglonglongname.gif | Bin 1688 -> 0 bytes
.../file-uploader/tests/sample-files/2larger.txt | 1 -
.../file-uploader/tests/sample-files/3empty.txt | 0
.../file-uploader/tests/sample-files/4text.txt | 1 -
.../file-uploader/tests/sample-files/5text.txt | 1 -
.../file-uploader/tests/sample-files/6text.txt | 1 -
.../file-uploader/tests/sample-files/7small.txt | 1 -
.../file-uploader/tests/sample-files/8text.txt | 1 -
.../file-uploader/tests/separate-file-list.htm | 24 -
.../file-uploader/tests/test-acceptance.htm | 106 --
.../file-uploader/tests/test-drop-zone.htm | 48 -
.../file-uploader/tests/test-handler-queue.htm | 81 --
.../file-uploader/tests/test-upload-handlers.htm | 382 ------
addon/js_upload/js_upload.php | 339 -----
addon/ldapauth/README | 17 -
addon/ldapauth/ldapauth.php | 130 --
addon/oembed/oembed.js | 6 -
addon/oembed/oembed.php | 89 --
addon/oembed/oembed.png | Bin 417 -> 0 bytes
addon/oembed/settings.tpl | 7 -
addon/piwik/README | 43 -
addon/piwik/admin.tpl | 4 -
addon/piwik/piwik.css | 8 -
addon/piwik/piwik.php | 95 --
addon/poormancron/poormancron.php | 64 -
addon/randplace/randplace.css | 14 -
addon/randplace/randplace.php | 180 ---
addon/sniper/100x100.gif | Bin 6870 -> 0 bytes
addon/sniper/100x100.jpg | Bin 30484 -> 0 bytes
addon/sniper/100x75.jpg | Bin 12010 -> 0 bytes
addon/sniper/100x80.jpg | Bin 12524 -> 0 bytes
addon/sniper/120x90hotshotsniper.jpg | Bin 16122 -> 0 bytes
addon/sniper/125x125.jpg | Bin 31696 -> 0 bytes
addon/sniper/140x90.jpg | Bin 17690 -> 0 bytes
addon/sniper/150x150.jpg | Bin 43762 -> 0 bytes
addon/sniper/160x86.gif | Bin 9420 -> 0 bytes
addon/sniper/180x135.jpg | Bin 10466 -> 0 bytes
addon/sniper/250x180.jpg | Bin 39574 -> 0 bytes
addon/sniper/300x200.jpg | Bin 16466 -> 0 bytes
addon/sniper/300x300.jpg | Bin 19530 -> 0 bytes
addon/sniper/32x32.jpg | Bin 13904 -> 0 bytes
addon/sniper/335x185.jpg | Bin 15345 -> 0 bytes
addon/sniper/60x60.jpg | Bin 19531 -> 0 bytes
addon/sniper/64x64.gif | Bin 3663 -> 0 bytes
addon/sniper/70x45.jpg | Bin 15510 -> 0 bytes
addon/sniper/70x60.jpg | Bin 8167 -> 0 bytes
addon/sniper/73x80.jpg | Bin 9456 -> 0 bytes
addon/sniper/75x57.jpg | Bin 8298 -> 0 bytes
addon/sniper/80x60.jpg | Bin 7889 -> 0 bytes
addon/sniper/80x70.jpg | Bin 5218 -> 0 bytes
addon/sniper/80x80hotshotsniper.jpg | Bin 23760 -> 0 bytes
addon/sniper/81x67.jpg | Bin 9805 -> 0 bytes
addon/sniper/description_etc.txt | 11 -
addon/sniper/hotshotsniper.html | 15 -
addon/sniper/hotshotsniper.swf | Bin 927817 -> 0 bytes
addon/sniper/sniper.php | 43 -
addon/statusnet/README | 75 --
addon/statusnet/admin.tpl | 16 -
addon/statusnet/signinwithstatusnet.png | Bin 5808 -> 0 bytes
addon/statusnet/statusnet.css | 74 -
addon/statusnet/statusnet.php | 480 -------
addon/tictac/tictac.php | 665 ---------
addon/twitter/README | 77 --
addon/twitter/admin.tpl | 3 -
addon/twitter/lighter.png | Bin 2490 -> 0 bytes
addon/twitter/twitter.css | 41 -
addon/twitter/twitter.php | 285 ----
addon/widgets/settings.tpl | 19 -
addon/widgets/widget_friends.php | 32 -
addon/widgets/widget_like.php | 22 -
addon/widgets/widgets.js | 64 -
addon/widgets/widgets.php | 170 ---
boot.php | 2 +-
140 files changed, 15 insertions(+), 12015 deletions(-)
create mode 100644 LICENSE
delete mode 100644 README
delete mode 100644 addon/README
delete mode 100644 addon/calc/calc.php
delete mode 100644 addon/convert/UnitConvertor.php
delete mode 100644 addon/convert/convert.php
delete mode 100644 addon/facebook/README
delete mode 100644 addon/facebook/facebook.css
delete mode 100644 addon/facebook/facebook.php
delete mode 100644 addon/fortunate/fortunate.css
delete mode 100644 addon/fortunate/fortunate.php
delete mode 100644 addon/impressum/README
delete mode 100644 addon/impressum/admin.tpl
delete mode 100644 addon/impressum/impressum.php
delete mode 100644 addon/js_upload/file-uploader/client/demo.htm
delete mode 100644 addon/js_upload/file-uploader/client/do-nothing.htm
delete mode 100644 addon/js_upload/file-uploader/client/fileuploader.css
delete mode 100644 addon/js_upload/file-uploader/client/fileuploader.js
delete mode 100644 addon/js_upload/file-uploader/client/loading.gif
delete mode 100644 addon/js_upload/file-uploader/gpl-2.0.txt
delete mode 100644 addon/js_upload/file-uploader/license.txt
delete mode 100644 addon/js_upload/file-uploader/readme.md
delete mode 100644 addon/js_upload/file-uploader/server/OctetStreamReader.java
delete mode 100644 addon/js_upload/file-uploader/server/coldfusion/coldfusion.cfc
delete mode 100644 addon/js_upload/file-uploader/server/coldfusion/demo.cfm
delete mode 100644 addon/js_upload/file-uploader/server/coldfusion/readme.txt
delete mode 100644 addon/js_upload/file-uploader/server/perl.cgi
delete mode 100644 addon/js_upload/file-uploader/server/php.php
delete mode 100644 addon/js_upload/file-uploader/server/readme.txt
delete mode 100644 addon/js_upload/file-uploader/server/uploads/.gitignore
delete mode 100644 addon/js_upload/file-uploader/tests/action-acceptance.php
delete mode 100644 addon/js_upload/file-uploader/tests/action-handler-queue-test.php
delete mode 100644 addon/js_upload/file-uploader/tests/action-handler-test.php
delete mode 100644 addon/js_upload/file-uploader/tests/action-slow-response.php
delete mode 100644 addon/js_upload/file-uploader/tests/browser-bugs/safari-bug1.htm
delete mode 100644 addon/js_upload/file-uploader/tests/browser-bugs/safari-bug2.htm
delete mode 100644 addon/js_upload/file-uploader/tests/iframe-content-tests/application-javascript.php
delete mode 100644 addon/js_upload/file-uploader/tests/iframe-content-tests/application-json.php
delete mode 100644 addon/js_upload/file-uploader/tests/iframe-content-tests/header-404.php
delete mode 100644 addon/js_upload/file-uploader/tests/iframe-content-tests/somepage.php
delete mode 100644 addon/js_upload/file-uploader/tests/iframe-content-tests/text-html-large.php
delete mode 100644 addon/js_upload/file-uploader/tests/iframe-content-tests/text-html.php
delete mode 100644 addon/js_upload/file-uploader/tests/iframe-content-tests/text-javascript.php
delete mode 100644 addon/js_upload/file-uploader/tests/iframe-content-tests/text-plain.php
delete mode 100644 addon/js_upload/file-uploader/tests/jquery-1.4.2.min.js
delete mode 100644 addon/js_upload/file-uploader/tests/jquery-ui/jquery-ui-1.8.4.custom.min.js
delete mode 100644 addon/js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png
delete mode 100644 addon/js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png
delete mode 100644 addon/js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-bg_flat_10_000000_40x100.png
delete mode 100644 addon/js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png
delete mode 100644 addon/js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png
delete mode 100644 addon/js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png
delete mode 100644 addon/js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png
delete mode 100644 addon/js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
delete mode 100644 addon/js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
delete mode 100644 addon/js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-icons_222222_256x240.png
delete mode 100644 addon/js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-icons_228ef1_256x240.png
delete mode 100644 addon/js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-icons_ef8c08_256x240.png
delete mode 100644 addon/js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-icons_ffd27a_256x240.png
delete mode 100644 addon/js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-icons_ffffff_256x240.png
delete mode 100644 addon/js_upload/file-uploader/tests/jquery-ui/ui-lightness/jquery-ui-1.8.4.custom.css
delete mode 100644 addon/js_upload/file-uploader/tests/qunit/package.json
delete mode 100644 addon/js_upload/file-uploader/tests/qunit/qunit/qunit.css
delete mode 100644 addon/js_upload/file-uploader/tests/qunit/qunit/qunit.js
delete mode 100644 addon/js_upload/file-uploader/tests/qunit/test/index.html
delete mode 100644 addon/js_upload/file-uploader/tests/qunit/test/same.js
delete mode 100644 addon/js_upload/file-uploader/tests/qunit/test/test.js
delete mode 100644 addon/js_upload/file-uploader/tests/sample-files/1imagelonglonglonglonglonglongname.gif
delete mode 100644 addon/js_upload/file-uploader/tests/sample-files/2larger.txt
delete mode 100644 addon/js_upload/file-uploader/tests/sample-files/3empty.txt
delete mode 100644 addon/js_upload/file-uploader/tests/sample-files/4text.txt
delete mode 100644 addon/js_upload/file-uploader/tests/sample-files/5text.txt
delete mode 100644 addon/js_upload/file-uploader/tests/sample-files/6text.txt
delete mode 100644 addon/js_upload/file-uploader/tests/sample-files/7small.txt
delete mode 100644 addon/js_upload/file-uploader/tests/sample-files/8text.txt
delete mode 100644 addon/js_upload/file-uploader/tests/separate-file-list.htm
delete mode 100644 addon/js_upload/file-uploader/tests/test-acceptance.htm
delete mode 100644 addon/js_upload/file-uploader/tests/test-drop-zone.htm
delete mode 100644 addon/js_upload/file-uploader/tests/test-handler-queue.htm
delete mode 100644 addon/js_upload/file-uploader/tests/test-upload-handlers.htm
delete mode 100644 addon/js_upload/js_upload.php
delete mode 100644 addon/ldapauth/README
delete mode 100644 addon/ldapauth/ldapauth.php
delete mode 100644 addon/oembed/oembed.js
delete mode 100644 addon/oembed/oembed.php
delete mode 100644 addon/oembed/oembed.png
delete mode 100644 addon/oembed/settings.tpl
delete mode 100644 addon/piwik/README
delete mode 100644 addon/piwik/admin.tpl
delete mode 100644 addon/piwik/piwik.css
delete mode 100644 addon/piwik/piwik.php
delete mode 100644 addon/poormancron/poormancron.php
delete mode 100644 addon/randplace/randplace.css
delete mode 100644 addon/randplace/randplace.php
delete mode 100644 addon/sniper/100x100.gif
delete mode 100644 addon/sniper/100x100.jpg
delete mode 100644 addon/sniper/100x75.jpg
delete mode 100644 addon/sniper/100x80.jpg
delete mode 100644 addon/sniper/120x90hotshotsniper.jpg
delete mode 100644 addon/sniper/125x125.jpg
delete mode 100644 addon/sniper/140x90.jpg
delete mode 100644 addon/sniper/150x150.jpg
delete mode 100644 addon/sniper/160x86.gif
delete mode 100644 addon/sniper/180x135.jpg
delete mode 100644 addon/sniper/250x180.jpg
delete mode 100644 addon/sniper/300x200.jpg
delete mode 100644 addon/sniper/300x300.jpg
delete mode 100644 addon/sniper/32x32.jpg
delete mode 100644 addon/sniper/335x185.jpg
delete mode 100644 addon/sniper/60x60.jpg
delete mode 100644 addon/sniper/64x64.gif
delete mode 100644 addon/sniper/70x45.jpg
delete mode 100644 addon/sniper/70x60.jpg
delete mode 100644 addon/sniper/73x80.jpg
delete mode 100644 addon/sniper/75x57.jpg
delete mode 100644 addon/sniper/80x60.jpg
delete mode 100644 addon/sniper/80x70.jpg
delete mode 100644 addon/sniper/80x80hotshotsniper.jpg
delete mode 100644 addon/sniper/81x67.jpg
delete mode 100644 addon/sniper/description_etc.txt
delete mode 100644 addon/sniper/hotshotsniper.html
delete mode 100644 addon/sniper/hotshotsniper.swf
delete mode 100644 addon/sniper/sniper.php
delete mode 100644 addon/statusnet/README
delete mode 100644 addon/statusnet/admin.tpl
delete mode 100644 addon/statusnet/signinwithstatusnet.png
delete mode 100644 addon/statusnet/statusnet.css
delete mode 100644 addon/statusnet/statusnet.php
delete mode 100644 addon/tictac/tictac.php
delete mode 100644 addon/twitter/README
delete mode 100644 addon/twitter/admin.tpl
delete mode 100644 addon/twitter/lighter.png
delete mode 100644 addon/twitter/twitter.css
delete mode 100644 addon/twitter/twitter.php
delete mode 100644 addon/widgets/settings.tpl
delete mode 100644 addon/widgets/widget_friends.php
delete mode 100644 addon/widgets/widget_like.php
delete mode 100644 addon/widgets/widgets.js
delete mode 100644 addon/widgets/widgets.php
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000..488f2e6b7
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,14 @@
+Copyright (c) 2010, 2011 the Friendika Project
+All rights reserved.
+
+Redistribution and use in source and binary forms are permitted
+provided that the above copyright notice and this paragraph are
+duplicated in all such forms and that any documentation,
+advertising materials, and other materials related to such
+distribution and use acknowledge that the software was developed
+by the Friendika Project. The name of the
+University may not be used to endorse or promote products derived
+from this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/README b/README
deleted file mode 100644
index 598b6d292..000000000
--- a/README
+++ /dev/null
@@ -1,86 +0,0 @@
-
- *************
- * Friendika *
- *************
-
- Friendika Communications Server
-
- http://project.friendika.com
-
-
- Friendika is a web application for managing social communications. Some
-would call it a "social network" or "distributed social network". We think
-both terms have been over-used, and don't adequately describe Friendika's
-capabilities - though Friendika can also fill those roles.
-
- At its essence, Friendika is a web application which can monitor various
-information and social activity streams, and which also lets you participate
-in online conversations with friends and associates, using a variety of network
-protocols. These are combined into an overview of your various communications
-and activities - regardless of network origin.
-
- Friendika also manages your personal profiles and photo albums and lets
-you securely present each of these to specific audiences. Your communications
-can be either open and public, or closed and private. You can easily create
-"groups" of contacts with which you can partition your conversations into
-private social circles, and which cannot be seen outside the circle.
-
- Friendika is decentralised. Any account on any Friendika server can connect
-with any account on any other Friendika server. You can also connect to and
-interact directly with friends on Facebook, Status.Net, and other federated
-social web services (e.g. identi.ca, GNU-Social, etc.).
-
- Outgoing communications can be directed to Friendika, existing accounts on
-Facebook and Twitter, federated social web providers - or even delivered to
-email contacts.
-
- Incoming data streams aren't limited to traditional social networks.
-They may include most any service which provides a syndication feed (both RSS
-and Atom). This allows you to view communications from friends in other
-diverse social networks - such as Diaspora, Google Buzz, and millions of
-blogs, news services, and other websites. You can also import
-contacts from (and write to) anybody that is accessible from your email
-INBOX and view them in your social stream. Over time we will try to
-build two-way bridges to other services so that you can freely
-interact in both directions with anybody on an accessible network that
-allows it.
-
- Communications between Friendika servers are private and encrypted,
-using military grade encryption - and require mutual identity provenance
-before any data is exchanged. These same crypto mechanisms provide remote
-password-less authentication; allowing you to post to profiles and view private
-photo collections on other servers - without encountering any login and/or
-authorisation dialogues when visiting these sites.
-
- Friendika has no boundaries and no central ownership of the data generated
-within the network. Anybody with a commodity PHP/MySQL web server or hosting
-account can provide a server, and each individual server can then support
-up to several thousand participating members - each with their own unique
-communication and privacy needs. This allows Friendika to scale to global
-levels and mimics the decentralised architecture of the web itself.
-
- If you are creating a website which requires social interaction, Friendika
-can also take the place of blog software, forum software and feed readers, and
-also provide individualised communications and content management - or
-simply be used as an alternative to traditional "monolithic" social networks.
-
- Friendika is also free - in every sense of the word.
-
- Choose freedom - join us.
-
- Find out more about the project at http://project.friendika.com
-
- *******************
- Friendika Demo Site
- *******************
-
- http://demo.friendika.com
-
- *******************
- Friendika Downloads
- *******************
-
- http://github.com/friendika/friendika/tarball/master
-
-
-
diff --git a/addon/README b/addon/README
deleted file mode 100644
index fb1c6340a..000000000
--- a/addon/README
+++ /dev/null
@@ -1,186 +0,0 @@
-Friendika Addon/Plugin development
-
-This is an early specification and hook details may be subject to change.
-
-Please see the sample addon 'randplace' for a working example of using these features.
-
-
-You must register plugins with the system in the .htconfig.php file.
-
-$a->config['system']['addon'] = 'plugin1name, plugin2name, another_name';
-
-Plugin names cannot contain spaces and are used as filenames.
-
-
-Register your plugin hooks during installation.
-
- register_hook($hookname, $file, $function);
-
- $hookname is a string and corresponds to a known Friendika hook
- $file is a pathname relative to the top-level Friendika directory.
- This *should* be 'addon/plugin_name/plugin_name.php' in most cases.
- $function is a string and is the name of the function which will be executed
- when the hook is called.
-
-
-Your hook functions will be called with at least one and possibly two arguments
-
- function myhook_function(&$a, &$b) {
-
-
- }
-
-If you wish to make changes to the calling data, you must declare them as
-reference variables (with '&') during function declaration.
-
-$a is the Friendika 'App' class - which contains a wealth of information
-about the current state of Friendika, such as which module has been called,
-configuration info, the page contents at the point the hook was invoked, profile
-and user information, etc. It is recommeded you call this '$a' to match its usage
-elsewhere.
-
-$b can be called anything you like. This is information which is specific to the hook
-currently being processed, and generally contains information that is being immediately
-processed or acted on that you can use, display, or alter. Remember to declare it with
-'&' if you wish to alter it.
-
-
-Current hooks:
-
-'authenticate' - called when a user attempts to login.
- $b is an array
- 'username' => the supplied username
- 'password' => the supplied password
- 'authenticated' => set this to non-zero to authenticate the user.
- 'user_record' => successful authentication must also return a valid user record from the database
-
-
-'logged_in' - called after a user has successfully logged in.
- $b contains the $a->user array
-
-
-'display_item' - called when formatting a post for display.
- $b is an array
- 'item' => The item (array) details pulled from the database
- 'output' => the (string) HTML representation of this item prior to adding it
- to the page
-
-'post_local' - called when a status post or comment is entered on the local system
- $b is the item array of the information to be stored in the database
- {Please note: body contents are bbcode - not HTML)
-
-'post_local_end' - called when a local status post or comment has been stored on the local system
- $b is the item array of the information which has just been stored in the database
- {Please note: body contents are bbcode - not HTML)
-
-
-'post_remote' - called when receiving a post from another source. This may also be used
- to post local activity or system generated messages.
- $b is the item array of information to be stored in the database and the item
- body is bbcode.
-
-'settings_form' - called when generating the HTML for the user Settings page
- $b is the (string) HTML of the settings page before the final '' tag.
-
-'settings_post' - called when the Settings pages are submitted.
- $b is the $_POST array
-
-'plugin_settings' - called when generating the HTML for the addon settings page
- $b is the (string) HTML of the addon settings page before the final '' tag.
-
-'plugin_settings_post' - called when the Addon Settings pages are submitted.
- $b is the $_POST array
-
-'profile_post' - called when posting a profile page.
- $b is the $_POST array
-
-'profile_edit' - called prior to output of profile edit page
- $b is array
- 'profile' => profile (array) record from the database
- 'entry' => the (string) HTML of the generated entry
-
-'profile_advanced' - called when the HTML is generated for the 'Advanced profile',
- corresponding to the 'Profile' tab within a person's profile page.
- $b is the (string) HTML representation of the generated profile
-
-'directory_item' - called from the Directory page when formatting an item for display
- $b is an array
- 'contact' => contact (array) record for the person from the database
- 'entry' => the (string) HTML of the generated entry
-
-'profile_sidebar_enter' - called prior to generating the sidebar "short" profile for a page
- $b is (array) the person's profile array
-
-'profile_sidebar' - called when generating the sidebar "short" profile for a page
- $b is an array
- 'profile' => profile (array) record for the person from the database
- 'entry' => the (string) HTML of the generated entry
-
-'contact_block_end' - called when formatting the block of contacts/friends on a
- profile sidebar has completed
- $b is an array
- 'contacts' => contact array of entries
- 'output' => the (string) generated HTML of the contact block
-
-'bbcode' - called during conversion of bbcode to html
- $b is (string) converted text
-
-'html2bbcode' - called during conversion of html to bbcode (e.g. remote message posting)
- $b is (string) converted text
-
-
-'page_header' - called after building the page navigation section
- $b is (string) HTML of nav region
-
-
-'personal_xrd' - called prior to output of personal XRD file.
- $b is an array
- 'user' => the user record for the person
- 'xml' => the complete XML to be output
-
-
-'home_content' - called prior to output home page content, shown to unlogged users
- $b is (string) HTML of section region
-
-'contact_edit' - called when editing contact details on an individual from the Contacts page
- $b is (array)
- 'contact' => contact record (array) of target contact
- 'output' => the (string) generated HTML of the contact edit page
-
-'contact_edit_post' - called when posting the contact edit page
- $b is the $_POST array
-
-'init_1' - called just after DB has been opened and before session start
- $b is not used or passed
-
-'page_end' - called after HTML content functions have completed
- $b is (string) HTML of content div
-
-'jot_plugin' - add tools to jot toolbar
- $b is (string) HTML for tool icon
-
-
-*** = subject to change
-
-
-
-
-
-Not yet documented:
-
-'atom_feed' ***
-
-'atom_feed_end' ***
-
-'parse_atom' ***
-
-'atom_author' ***
-
-'atom_entry' ***
-
-'parse_link' ***
-
-
-
-
-
diff --git a/addon/calc/calc.php b/addon/calc/calc.php
deleted file mode 100644
index 8c079dc7a..000000000
--- a/addon/calc/calc.php
+++ /dev/null
@@ -1,363 +0,0 @@
-
- */
-
-
-function calc_install() {
- register_hook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
-}
-
-function calc_uninstall() {
- unregister_hook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
-
-}
-
-function calc_app_menu($a,&$b) {
- $b['app_menu'] .= '
-
-EOT;
-return $o;
-
-}
diff --git a/addon/convert/UnitConvertor.php b/addon/convert/UnitConvertor.php
deleted file mode 100644
index d7933a8fb..000000000
--- a/addon/convert/UnitConvertor.php
+++ /dev/null
@@ -1,283 +0,0 @@
- |
-// | Co-authored by : CVH, Chris Hansel |
-// +----------------------------------------------------------------------+
-//
-// $Id: UnitConvertor.php,v 1.00 2002/02/20 11:40:00 stasokhvat Exp $
-
-/**
-* UnitConvertor is able to convert between different units and currencies.
-*
-* @author Stanislav Okhvat
-* @version $Id: UnitConvertor.php,v 1.00 2002/03/01 17:00:00 stasokhvat Exp $
-* @package UnitConvertor
-* @access public
-* @history 01.03.2002 Implemented the code for regular and offset-based
-* conversions
-*
-* 13.12.2004
-* By Chris Hansel (CVH): changed getConvSpecs in order to have it look up
-* intermediary conversions (also see comments in check_key).
-*
-* Intermediary conversions are useful when no conversion ratio is specified
-* between two units when we calculate between the two. For example, we want
-* to convert between Fahrenheit and Kelvin, and we have only
-* specified how to convert Centigrade<->Fahrenheit and
-* Centigrade<->Kelvin. While a direct (Fahrenheit->Kelvin) or
-* reverse (Kelvin->Fahrenheit) lookups fail, looking for an intermediary
-* unit linking the two (Centigrade) helps us do the conversion.
-*
-* 13.12.2004
-* Chris Hansel (CVH): $to_array argument of addConversion method can now
-* contain units as 'unit1/unit2/unit3', when all units stand for the same
-* thing. See examples in unitconv.php
-*/
-class UnitConvertor
-{
- /**
- * Stores conversion ratios.
- *
- * @var array
- * @access private
- */
- var $conversion_table = array();
-
- /**
- * Decimal point character (default is "." - American - set in constructor).
- *
- * @var string
- * @access private
- */
- var $decimal_point;
-
- /**
- * Thousands separator (default is "," - American - set in constructor).
- *
- * @var string
- * @access private
- */
- var $thousand_separator;
-
- /**
- * For future use
- *
- * @var array
- * @access private
- */
- var $bases = array();
-
- /**
- * Constructor. Initializes the UnitConvertor object with the most important
- * properties.
- *
- * @param string decimal point character
- * @param string thousand separator character
- * @return void
- * @access public
- */
- function UnitConvertor($dec_point = '.', $thousand_sep = ',')
- {
- $this->decimal_point = $dec_point;
- $this->thousand_separator = $thousand_sep;
-
- } // end func UnitConvertor
-
- /**
- * Adds a conversion ratio to the conversion table.
- *
- * @param string the name of unit from which to convert
- * @param array array(
- * "pound"=>array("ratio"=>'', "offset"=>'')
- * )
- * "pound" - name of unit to set conversion ration to
- * "ratio" - 'double' conversion ratio which, when
- * multiplied by the number of $from_unit units produces
- * the result
- * "offset" - an offset from 0 which will be added to
- * the result when converting (needed for temperature
- * conversions and defaults to 0).
- * @return boolean true if successful, false otherwise
- * @access public
- */
- function addConversion($from_unit, $to_array)
- {
- if (!isset($this->conversion_table[$from_unit])) {
- while(list($key, $val) = each($to_array))
- {
- if (strstr($key, '/'))
- {
- $to_units = explode('/', $key);
- foreach ($to_units as $to_unit)
- {
- $this->bases[$from_unit][] = $to_unit;
-
- if (!is_array($val))
- {
- $this->conversion_table[$from_unit."_".$to_unit] = array("ratio"=>$val, "offset"=>0);
- }
- else
- {
- $this->conversion_table[$from_unit."_".$to_unit] =
- array(
- "ratio"=>$val['ratio'],
- "offset"=>(isset($val['offset']) ? $val['offset'] : 0)
- );
- }
- }
- }
- else
- {
- $this->bases[$from_unit][] = $key;
-
- if (!is_array($val))
- {
- $this->conversion_table[$from_unit."_".$key] = array("ratio"=>$val, "offset"=>0);
- }
- else
- {
- $this->conversion_table[$from_unit."_".$key] =
- array(
- "ratio"=>$val['ratio'],
- "offset"=>(isset($val['offset']) ? $val['offset'] : 0)
- );
- }
- }
- }
- return true;
- }
- return false;
-
- } // end func addConversion
-
- /**
- * Converts from one unit to another using specified precision.
- *
- * @param double value to convert
- * @param string name of the source unit from which to convert
- * @param string name of the target unit to which we are converting
- * @param integer double precision of the end result
- * @return void
- * @access public
- */
- function convert($value, $from_unit, $to_unit, $precision)
- {
- if ($this->getConvSpecs($from_unit, $to_unit, $value, $converted ))
- {
- return number_format($converted , (int)$precision, $this->decimal_point, $this->thousand_separator);
- } else {
- return false;
- }
- } // end func
-
- /**
- * CVH : changed this Function getConvSpecs in order to have it look up
- * intermediary Conversions from the
- * "base" unit being that one that has the highest hierarchical order in one
- * "logical" Conversion_Array
- * when taking $conv->addConversion('km',
- * array('meter'=>1000, 'dmeter'=>10000, 'centimeter'=>100000,
- * 'millimeter'=>1000000, 'mile'=>0.62137, 'naut.mile'=>0.53996,
- * 'inch(es)/zoll'=>39370, 'ft/foot/feet'=>3280.8, 'yd/yard'=>1093.6));
- * "km" would be the logical base unit for all units of dinstance, thus,
- * if the function fails to find a direct or reverse conversion in the table
- * it is only logical to suspect that if there is a chance
- * converting the value it only is via the "base" unit, and so
- * there is not even a need for a recursive search keeping the perfomance
- * acceptable and the ressource small...
- *
- * CVH check_key checks for a key in the Conversiontable and returns a value
- */
- function check_key( $key) {
- if ( array_key_exists ($key,$this->conversion_table)) {
- if (! empty($this->conversion_table[$key])) {
- return $this->conversion_table[$key];
- }
- }
- return false;
- }
-
- /**
- * Key function. Finds the conversion ratio and offset from one unit to another.
- *
- * @param string name of the source unit from which to convert
- * @param string name of the target unit to which we are converting
- * @param double conversion ratio found. Returned by reference.
- * @param double offset which needs to be added (or subtracted, if negative)
- * to the result to convert correctly.
- * For temperature or some scientific conversions,
- * i.e. Fahrenheit -> Celcius
- * @return boolean true if ratio and offset are found for the supplied
- * units, false otherwise
- * @access private
- */
- function getConvSpecs($from_unit, $to_unit, $value, &$converted)
- {
- $key = $from_unit."_".$to_unit;
- $revkey = $to_unit."_".$from_unit;
- $found = false;
- if ($ct_arr = $this->check_key($key)) {
- // Conversion Specs found directly
- $ratio = (double)$ct_arr['ratio'];
- $offset = $ct_arr['offset'];
- $converted = (double)(($value * $ratio)+ $offset);
-
- return true;
- } // not found in direct order, try reverse order
- elseif ($ct_arr = $this->check_key($revkey)) {
- $ratio = (double)(1/$ct_arr['ratio']);
- $offset = -$ct_arr['offset'];
- $converted = (double)(($value + $offset) * $ratio);
-
- return true;
- } // not found test for intermediary conversion
- else {
- // return ratio = 1 if keyparts match
- if ($key == $revkey) {
- $ratio = 1;
- $offset = 0;
- $converted = $value;
- return true;
- }
- // otherwise search intermediary
- reset($this->conversion_table);
- while (list($convk, $i1_value) = each($this->conversion_table)) {
- // split the key into parts
- $keyparts = preg_split("/_/",$convk);
- // return ratio = 1 if keyparts match
-
- // Now test if either part matches the from or to unit
- if ($keyparts[1] == $to_unit && ($i2_value = $this->check_key($keyparts[0]."_".$from_unit))) {
- // an intermediary $keyparts[0] was found
- // now let us put things together intermediary 1 and 2
- $converted = (double)(((($value - $i2_value['offset']) / $i2_value['ratio']) * $i1_value['ratio'])+ $i1_value['offset']);
-
- $found = true;
-
- } elseif ($keyparts[1] == $from_unit && ($i2_value = $this->check_key($keyparts[0]."_".$to_unit))) {
- // an intermediary $keyparts[0] was found
- // now let us put things together intermediary 2 and 1
- $converted = (double)(((($value - $i1_value['offset']) / $i1_value['ratio']) + $i2_value['offset']) * $i2_value['ratio']);
-
- $found = true;
- }
- }
- return $found;
- }
-
- } // end func getConvSpecs
-
-} // end class UnitConvertor
-?>
\ No newline at end of file
diff --git a/addon/convert/convert.php b/addon/convert/convert.php
deleted file mode 100644
index 7a4c90a53..000000000
--- a/addon/convert/convert.php
+++ /dev/null
@@ -1,228 +0,0 @@
-
- */
-
-function convert_install() {
- register_hook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
-}
-
-function convert_uninstall() {
- unregister_hook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
-}
-
-function convert_app_menu($a,&$b) {
- $b['app_menu'] .= '
";
- }
-
- if(isset($_POST['value']))
- $value = $_POST['value'];
- else
- $value = '';
-
- $o .= '';
-
- return $o;
-}
diff --git a/addon/facebook/README b/addon/facebook/README
deleted file mode 100644
index 325f18dd1..000000000
--- a/addon/facebook/README
+++ /dev/null
@@ -1,39 +0,0 @@
-Installing the Friendika/Facebook connector
-
-1. register an API key for your site from developer.facebook.com
- a. We'd be very happy if you include "Friendika" in the application name
- to increase name recognition. The Friendika icons are also present
- in the images directory and may be uploaded as a Facebook app icon.
- Use images/friendika-16.jpg for the Icon and images/friendika-128.jpg for the Logo.
- b. The url should be your site URL with a trailing slash.
- You may use http://portal.friendika.com/privacy as the privacy policy
- URL unless your site has different requirements, and
- http://portal.friendika.com as the Terms of Service URL unless
- you have different requirements. (Friendika is a software application
- and does not require Terms of Service, though your installation of it might).
- c. Set the following values in your .htconfig.php file
- $a->config['facebook']['appid'] = 'xxxxxxxxxxx';
- $a->config['facebook']['appsecret'] = 'xxxxxxxxxxxxxxx';
- Replace with the settings Facebook gives you.
- d. Navigate to Set Web->Site URL & Domain -> Website Settings. Set Site URL
- to yoursubdomain.yourdomain.com. Set Site Domain to your yourdomain.com.
-2. Enable the facebook plugin by including it in .htconfig.php - e.g.
- $a->config['system']['addon'] = 'plugin1,plugin2,facebook';
-3. Visit the Facebook Settings section of the "Settings->Plugin Settings" page.
- and click 'Install Facebook Connector'.
-4. This will ask you to login to Facebook and grant permission to the
- plugin to do its stuff. Allow it to do so.
-5. You're done. To turn it off visit the Plugin Settings page again and
- 'Remove Facebook posting'.
-
-Vidoes and embeds will not be posted if there is no other content. Links
-and images will be converted to a format suitable for the Facebook API and
-long posts truncated - with a link to view the full post.
-
-Facebook contacts will not be able to view private photos, as they are not able to
-authenticate to your site to establish identity. We will address this
-in a future release.
-
-Info: please make sure that you understand all aspects due to Friendika's
-default licence which is: Creative Commons Attribution 3.0 (further info:
-http://creativecommons.org/licenses/by/3.0/ )
diff --git a/addon/facebook/facebook.css b/addon/facebook/facebook.css
deleted file mode 100644
index 0c164331e..000000000
--- a/addon/facebook/facebook.css
+++ /dev/null
@@ -1,13 +0,0 @@
-
-#facebook-enable-wrapper {
- margin-top: 20px;
-}
-
-#facebook-disable-wrapper {
- margin-top: 20px;
-}
-
-#facebook-post-default-form input {
- margin-top: 20px;
- margin-right: 20px;
-}
\ No newline at end of file
diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php
deleted file mode 100644
index 7ffdaffac..000000000
--- a/addon/facebook/facebook.php
+++ /dev/null
@@ -1,1059 +0,0 @@
-
- */
-
-/**
- * Installing the Friendika/Facebook connector
- *
- * 1. register an API key for your site from developer.facebook.com
- * a. We'd be very happy if you include "Friendika" in the application name
- * to increase name recognition. The Friendika icons are also present
- * in the images directory and may be uploaded as a Facebook app icon.
- * Use images/friendika-16.jpg for the Icon and images/friendika-128.jpg for the Logo.
- * b. The url should be your site URL with a trailing slash.
- * You may use http://portal.friendika.com/privacy as the privacy policy
- * URL unless your site has different requirements, and
- * http://portal.friendika.com as the Terms of Service URL unless
- * you have different requirements. (Friendika is a software application
- * and does not require Terms of Service, though your installation of it might).
- * c. Set the following values in your .htconfig.php file
- * $a->config['facebook']['appid'] = 'xxxxxxxxxxx';
- * $a->config['facebook']['appsecret'] = 'xxxxxxxxxxxxxxx';
- * Replace with the settings Facebook gives you.
- * d. Navigate to Set Web->Site URL & Domain -> Website Settings. Set
- * Site URL to yoursubdomain.yourdomain.com. Set Site Domain to your
- * yourdomain.com.
- * 2. Enable the facebook plugin by including it in .htconfig.php - e.g.
- * $a->config['system']['addon'] = 'plugin1,plugin2,facebook';
- * 3. Visit the Facebook Settings section of the "Settings->Plugin Settings" page.
- * and click 'Install Facebook Connector'.
- * 4. This will ask you to login to Facebook and grant permission to the
- * plugin to do its stuff. Allow it to do so.
- * 5. You're done. To turn it off visit the Plugin Settings page again and
- * 'Remove Facebook posting'.
- *
- * Vidoes and embeds will not be posted if there is no other content. Links
- * and images will be converted to a format suitable for the Facebook API and
- * long posts truncated - with a link to view the full post.
- *
- * Facebook contacts will not be able to view private photos, as they are not able to
- * authenticate to your site to establish identity. We will address this
- * in a future release.
- */
-
-define('FACEBOOK_MAXPOSTLEN', 420);
-
-
-function facebook_install() {
- register_hook('post_local_end', 'addon/facebook/facebook.php', 'facebook_post_hook');
- register_hook('jot_networks', 'addon/facebook/facebook.php', 'facebook_jot_nets');
- register_hook('plugin_settings', 'addon/facebook/facebook.php', 'facebook_plugin_settings');
- register_hook('cron', 'addon/facebook/facebook.php', 'facebook_cron');
- register_hook('queue_predeliver', 'addon/facebook/facebook.php', 'fb_queue_hook');
-}
-
-
-function facebook_uninstall() {
- unregister_hook('post_local_end', 'addon/facebook/facebook.php', 'facebook_post_hook');
- unregister_hook('jot_networks', 'addon/facebook/facebook.php', 'facebook_jot_nets');
- unregister_hook('plugin_settings', 'addon/facebook/facebook.php', 'facebook_plugin_settings');
- unregister_hook('cron', 'addon/facebook/facebook.php', 'facebook_cron');
- unregister_hook('queue_predeliver', 'addon/facebook/facebook.php', 'fb_queue_hook');
-}
-
-
-/* declare the facebook_module function so that /facebook url requests will land here */
-
-function facebook_module() {}
-
-
-
-/* If a->argv[1] is a nickname, this is a callback from Facebook oauth requests. */
-
-function facebook_init(&$a) {
-
- if($a->argc != 2)
- return;
- $nick = $a->argv[1];
- if(strlen($nick))
- $r = q("SELECT `uid` FROM `user` WHERE `nickname` = '%s' LIMIT 1",
- dbesc($nick)
- );
- if(! count($r))
- return;
-
- $uid = $r[0]['uid'];
- $auth_code = (($_GET['code']) ? $_GET['code'] : '');
- $error = (($_GET['error_description']) ? $_GET['error_description'] : '');
-
-
- if($error)
- logger('facebook_init: Error: ' . $error);
-
- if($auth_code && $uid) {
-
- $appid = get_config('facebook','appid');
- $appsecret = get_config('facebook', 'appsecret');
-
- $x = fetch_url('https://graph.facebook.com/oauth/access_token?client_id='
- . $appid . '&client_secret=' . $appsecret . '&redirect_uri='
- . urlencode($a->get_baseurl() . '/facebook/' . $nick)
- . '&code=' . $auth_code);
-
- logger('facebook_init: returned access token: ' . $x, LOGGER_DATA);
-
- if(strpos($x,'access_token=') !== false) {
- $token = str_replace('access_token=', '', $x);
- if(strpos($token,'&') !== false)
- $token = substr($token,0,strpos($token,'&'));
- set_pconfig($uid,'facebook','access_token',$token);
- set_pconfig($uid,'facebook','post','1');
- if(get_pconfig($uid,'facebook','no_linking') === false)
- set_pconfig($uid,'facebook','no_linking',1);
- fb_get_self($uid);
- fb_get_friends($uid);
- fb_consume_all($uid);
-
- }
-
- }
-
-}
-
-
-function fb_get_self($uid) {
- $access_token = get_pconfig($uid,'facebook','access_token');
- if(! $access_token)
- return;
- $s = fetch_url('https://graph.facebook.com/me/?access_token=' . $access_token);
- if($s) {
- $j = json_decode($s);
- set_pconfig($uid,'facebook','self_id',(string) $j->id);
- }
-}
-
-
-
-function fb_get_friends($uid) {
-
- $r = q("SELECT `id` FROM `user` WHERE `uid` = %d AND `account_expired` = 0 LIMIT 1",
- intval($uid)
- );
- if(! count($r))
- return;
-
- $access_token = get_pconfig($uid,'facebook','access_token');
-
- $no_linking = get_pconfig($uid,'facebook','no_linking');
- if($no_linking)
- return;
-
- if(! $access_token)
- return;
- $s = fetch_url('https://graph.facebook.com/me/friends?access_token=' . $access_token);
- if($s) {
- logger('facebook: fb_get_friends: ' . $s, LOGGER_DATA);
- $j = json_decode($s);
- logger('facebook: fb_get_friends: json: ' . print_r($j,true), LOGGER_DATA);
- if(! $j->data)
- return;
- foreach($j->data as $person) {
- $s = fetch_url('https://graph.facebook.com/' . $person->id . '?access_token=' . $access_token);
- if($s) {
- $jp = json_decode($s);
- logger('fb_get_friends: info: ' . print_r($jp,true), LOGGER_DATA);
-
- // always use numeric link for consistency
-
- $jp->link = 'http://facebook.com/profile.php?id=' . $person->id;
-
- // check if we already have a contact
-
- $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `url` = '%s' LIMIT 1",
- intval($uid),
- dbesc($jp->link)
- );
-
- if(count($r)) {
-
- // check that we have all the photos, this has been known to fail on occasion
-
- if((! $r[0]['photo']) || (! $r[0]['thumb']) || (! $r[0]['micro'])) {
- require_once("Photo.php");
-
- $photos = import_profile_photo('https://graph.facebook.com/' . $jp->id . '/picture', $uid, $r[0]['id']);
-
- $r = q("UPDATE `contact` SET `photo` = '%s',
- `thumb` = '%s',
- `micro` = '%s',
- `name-date` = '%s',
- `uri-date` = '%s',
- `avatar-date` = '%s'
- WHERE `id` = %d LIMIT 1
- ",
- dbesc($photos[0]),
- dbesc($photos[1]),
- dbesc($photos[2]),
- dbesc(datetime_convert()),
- dbesc(datetime_convert()),
- dbesc(datetime_convert()),
- intval($r[0]['id'])
- );
- }
- continue;
- }
- else {
-
- // create contact record
- $r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `addr`, `alias`, `notify`, `poll`,
- `name`, `nick`, `photo`, `network`, `rel`, `priority`,
- `writable`, `blocked`, `readonly`, `pending` )
- VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, 0, 0, 0 ) ",
- intval($uid),
- dbesc(datetime_convert()),
- dbesc($jp->link),
- dbesc(''),
- dbesc(''),
- dbesc($jp->id),
- dbesc('facebook ' . $jp->id),
- dbesc($jp->name),
- dbesc(($jp->nickname) ? $jp->nickname : strtolower($jp->first_name)),
- dbesc('https://graph.facebook.com/' . $jp->id . '/picture'),
- dbesc(NETWORK_FACEBOOK),
- intval(CONTACT_IS_FRIEND),
- intval(1),
- intval(1)
- );
- }
-
- $r = q("SELECT * FROM `contact` WHERE `url` = '%s' AND `uid` = %d LIMIT 1",
- dbesc($jp->link),
- intval($uid)
- );
-
- if(! count($r)) {
- continue;
- }
-
- $contact = $r[0];
- $contact_id = $r[0]['id'];
-
- require_once("Photo.php");
-
- $photos = import_profile_photo($r[0]['photo'],$uid,$contact_id);
-
- $r = q("UPDATE `contact` SET `photo` = '%s',
- `thumb` = '%s',
- `micro` = '%s',
- `name-date` = '%s',
- `uri-date` = '%s',
- `avatar-date` = '%s'
- WHERE `id` = %d LIMIT 1
- ",
- dbesc($photos[0]),
- dbesc($photos[1]),
- dbesc($photos[2]),
- dbesc(datetime_convert()),
- dbesc(datetime_convert()),
- dbesc(datetime_convert()),
- intval($contact_id)
- );
-
- }
- }
- }
-}
-
-// This is the POST method to the facebook settings page
-// Content is posted to Facebook in the function facebook_post_hook()
-
-function facebook_post(&$a) {
-
- $uid = local_user();
- if($uid){
-
- $value = ((x($_POST,'post_by_default')) ? intval($_POST['post_by_default']) : 0);
- set_pconfig($uid,'facebook','post_by_default', $value);
-
- $no_linking = get_pconfig($uid,'facebook','no_linking');
-
- $no_wall = ((x($_POST,'facebook_no_wall')) ? intval($_POST['facebook_no_wall']) : 0);
- set_pconfig($uid,'facebook','no_wall',$no_wall);
-
- $private_wall = ((x($_POST,'facebook_private_wall')) ? intval($_POST['facebook_private_wall']) : 0);
- set_pconfig($uid,'facebook','private_wall',$private_wall);
-
-
- $linkvalue = ((x($_POST,'facebook_linking')) ? intval($_POST['facebook_linking']) : 0);
- set_pconfig($uid,'facebook','no_linking', (($linkvalue) ? 0 : 1));
-
- // FB linkage was allowed but has just been turned off - remove all FB contacts and posts
-
- if((! intval($no_linking)) && (! intval($linkvalue))) {
- $r = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `network` = '%s' ",
- intval($uid),
- dbesc(NETWORK_FACEBOOK)
- );
- if(count($r)) {
- require_once('include/Contact.php');
- foreach($r as $rr)
- contact_remove($rr['id']);
- }
- }
- elseif(intval($no_linking) && intval($linkvalue)) {
- // FB linkage is now allowed - import stuff.
- fb_get_self($uid);
- fb_get_friends($uid);
- fb_consume_all($uid);
- }
-
- info( t('Settings updated.') . EOL);
- }
-
- return;
-}
-
-// Facebook settings form
-
-function facebook_content(&$a) {
-
- if(! local_user()) {
- notice( t('Permission denied.') . EOL);
- return '';
- }
-
- if($a->argc > 1 && $a->argv[1] === 'remove') {
- del_pconfig(local_user(),'facebook','post');
- info( t('Facebook disabled') . EOL);
- }
-
- if($a->argc > 1 && $a->argv[1] === 'friends') {
- fb_get_friends(local_user());
- info( t('Updating contacts') . EOL);
- }
-
-
- $fb_installed = get_pconfig(local_user(),'facebook','post');
-
- $appid = get_config('facebook','appid');
-
- if(! $appid) {
- notice( t('Facebook API key is missing.') . EOL);
- return '';
- }
-
- $a->page['htmlhead'] .= '' . "\r\n";
-
- $o .= '
';
- }
-}
-
-
-function facebook_post_hook(&$a,&$b) {
-
- /**
- * Post to Facebook stream
- */
-
- require_once('include/group.php');
-
- logger('Facebook post');
-
- $reply = false;
- $likes = false;
-
- if((local_user()) && (local_user() == $b['uid'])) {
-
- // Facebook is not considered a private network
- if($b['prvnets'] && $b['private'])
- return;
-
- $linking = ((get_pconfig(local_user(),'facebook','no_linking')) ? 0 : 1);
-
- if(($b['parent']) && ($linking)) {
- $r = q("SELECT * FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1",
- intval($b['parent']),
- intval(local_user())
- );
- if(count($r) && substr($r[0]['uri'],0,4) === 'fb::')
- $reply = substr($r[0]['uri'],4);
- elseif(count($r) && substr($r[0]['extid'],0,4) === 'fb::')
- $reply = substr($r[0]['extid'],4);
- else
- return;
- logger('facebook reply id=' . $reply);
- }
-
- if($b['private'] && $reply === false) {
- $allow_people = expand_acl($b['allow_cid']);
- $allow_groups = expand_groups(expand_acl($b['allow_gid']));
- $deny_people = expand_acl($b['deny_cid']);
- $deny_groups = expand_groups(expand_acl($b['deny_gid']));
-
- $recipients = array_unique(array_merge($allow_people,$allow_groups));
- $deny = array_unique(array_merge($deny_people,$deny_groups));
-
- $allow_str = dbesc(implode(', ',$recipients));
- if($allow_str) {
- $r = q("SELECT `notify` FROM `contact` WHERE `id` IN ( $allow_str ) AND `network` = 'face'");
- $allow_arr = array();
- if(count($r))
- foreach($r as $rr)
- $allow_arr[] = $rr['notify'];
- }
-
- $deny_str = dbesc(implode(', ',$deny));
- if($deny_str) {
- $r = q("SELECT `notify` FROM `contact` WHERE `id` IN ( $deny_str ) AND `network` = 'face'");
- $deny_arr = array();
- if(count($r))
- foreach($r as $rr)
- $deny_arr[] = $rr['notify'];
- }
-
- if(count($deny_arr) && (! count($allow_arr))) {
-
- // One or more FB folks were denied access but nobody on FB was specifically allowed access.
- // This might cause the post to be open to public on Facebook, but only to selected members
- // on another network. Since this could potentially leak a post to somebody who was denied,
- // we will skip posting it to Facebook with a slightly vague but relevant message that will
- // hopefully lead somebody to this code comment for a better explanation of what went wrong.
-
- notice( t('Post to Facebook cancelled because of multi-network access permission conflict.') . EOL);
- return;
- }
-
-
- // if it's a private message but no Facebook members are allowed or denied, skip Facebook post
-
- if((! count($allow_arr)) && (! count($deny_arr)))
- return;
- }
-
- if($b['verb'] == ACTIVITY_LIKE)
- $likes = true;
-
-
- $appid = get_config('facebook', 'appid' );
- $secret = get_config('facebook', 'appsecret' );
-
- if($appid && $secret) {
-
- logger('facebook: have appid+secret');
-
- $fb_post = intval(get_pconfig(local_user(),'facebook','post'));
- $fb_enable = (($fb_post && x($_POST,'facebook_enable')) ? intval($_POST['facebook_enable']) : 0);
- $fb_token = get_pconfig(local_user(),'facebook','access_token');
-
- // if API is used, default to the chosen settings
- if($_POST['api_source'] && intval(get_pconfig(local_user(),'facebook','post_by_default')))
- $fb_enable = 1;
-
-
-
-
- logger('facebook: $fb_post: ' . $fb_post . ' $fb_enable: ' . $fb_enable . ' $fb_token: ' . $fb_token,LOGGER_DEBUG);
-
- // post to facebook if it's a public post and we've ticked the 'post to Facebook' box,
- // or it's a private message with facebook participants
- // or it's a reply or likes action to an existing facebook post
-
- if($fb_post && $fb_token && ($fb_enable || $b['private'] || $reply)) {
- logger('facebook: able to post');
- require_once('library/facebook.php');
- require_once('include/bbcode.php');
-
- $msg = $b['body'];
-
- logger('Facebook post: original msg=' . $msg, LOGGER_DATA);
-
- // make links readable before we strip the code
-
- // unless it's a dislike - just send the text as a comment
-
- if($b['verb'] == ACTIVITY_DISLIKE)
- $msg = trim(strip_tags(bbcode($msg)));
-
- $search_str = $a->get_baseurl() . '/search';
-
- if(preg_match("/\[url=(.*?)\](.*?)\[\/url\]/is",$msg,$matches)) {
-
- // don't use hashtags for message link
-
- if(strpos($matches[2],$search_str) === false) {
- $link = $matches[1];
- if(substr($matches[2],0,5) != '[img]')
- $linkname = $matches[2];
- }
- }
-
- $msg = preg_replace("/\[url=(.*?)\](.*?)\[\/url\]/is",'$2 $1',$msg);
-
- if(preg_match("/\[img\](.*?)\[\/img\]/is",$msg,$matches))
- $image = $matches[1];
-
- $msg = preg_replace("/\[img\](.*?)\[\/img\]/is", t('Image: ') . '$1', $msg);
-
- if((strpos($link,z_root()) !== false) && (! $image))
- $image = $a->get_baseurl() . '/images/friendika-64.jpg';
-
- $msg = trim(strip_tags(bbcode($msg)));
- $msg = html_entity_decode($msg,ENT_QUOTES,'UTF-8');
-
- // add any attachments as text urls
-
- $arr = explode(',',$b['attach']);
-
- if(count($arr)) {
- $msg .= "\n";
- foreach($arr as $r) {
- $matches = false;
- $cnt = preg_match('|\[attach\]href=\"(.*?)\" size=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"\[\/attach\]|',$r,$matches);
- if($cnt) {
- $msg .= $matches[1];
- }
- }
- }
-
- if (strlen($msg) > FACEBOOK_MAXPOSTLEN) {
- $shortlink = "";
- require_once('library/slinky.php');
-
- $display_url = $a->get_baseurl() . '/display/' . $a->user['nickname'] . '/' . $b['id'];
- $slinky = new Slinky( $display_url );
- // setup a cascade of shortening services
- // try to get a short link from these services
- // in the order ur1.ca, trim, id.gd, tinyurl
- $slinky->set_cascade( array( new Slinky_UR1ca(), new Slinky_Trim(), new Slinky_IsGd(), new Slinky_TinyURL() ) );
- $shortlink = $slinky->short();
- // the new message will be shortened such that "... $shortlink"
- // will fit into the character limit
- $msg = substr($msg, 0, FACEBOOK_MAXPOSTLEN - strlen($shortlink) - 4);
- $msg .= '... ' . $shortlink;
- }
- if(! strlen($msg))
- return;
-
- logger('Facebook post: msg=' . $msg, LOGGER_DATA);
-
- if($likes) {
- $postvars = array('access_token' => $fb_token);
- }
- else {
- $postvars = array(
- 'access_token' => $fb_token,
- 'message' => $msg
- );
- if(isset($image))
- $postvars['picture'] = $image;
- if(isset($link))
- $postvars['link'] = $link;
- if(isset($linkname))
- $postvars['name'] = $linkname;
- }
-
- if(($b['private']) && (! $b['parent'])) {
- $postvars['privacy'] = '{"value": "CUSTOM", "friends": "SOME_FRIENDS"';
- if(count($allow_arr))
- $postvars['privacy'] .= ',"allow": "' . implode(',',$allow_arr) . '"';
- if(count($deny_arr))
- $postvars['privacy'] .= ',"deny": "' . implode(',',$deny_arr) . '"';
- $postvars['privacy'] .= '}';
-
- }
-
- if($reply) {
- $url = 'https://graph.facebook.com/' . $reply . '/' . (($likes) ? 'likes' : 'comments');
- }
- else {
- $url = 'https://graph.facebook.com/me/feed';
- if($b['plink'])
- $postvars['actions'] = '{"name": "' . t('View on Friendika') . '", "link": "' . $b['plink'] . '"}';
- }
-
- logger('facebook: post to ' . $url);
- logger('facebook: postvars: ' . print_r($postvars,true));
-
- // "test_mode" prevents anything from actually being posted.
- // Otherwise, let's do it.
-
- if(! get_config('facebook','test_mode')) {
- $x = post_url($url, $postvars);
-
- $retj = json_decode($x);
- if($retj->id) {
- q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d LIMIT 1",
- dbesc('fb::' . $retj->id),
- intval($b['id'])
- );
- }
- else {
- if(! $likes) {
- $s = serialize(array('url' => $url, 'item' => $b['id'], 'post' => $postvars));
- q("INSERT INTO `queue` ( `network`, `cid`, `created`, `last`, `content`)
- VALUES ( '%s', %d, '%s', '%s', '%s') ",
- dbesc(NETWORK_FACEBOOK),
- intval($a->contact),
- dbesc(datetime_convert()),
- dbesc(datetime_convert()),
- dbesc($s)
- );
-
- notice( t('Facebook post failed. Queued for retry.') . EOL);
- }
- }
-
- logger('Facebook post returns: ' . $x, LOGGER_DEBUG);
- }
- }
- }
- }
-}
-
-
-function fb_queue_hook(&$a,&$b) {
-
- $qi = q("SELECT * FROM `queue` WHERE `network` = '%s'",
- dbesc(NETWORK_FACEBOOK)
- );
- if(! count($qi))
- return;
-
- require_once('include/queue_fn.php');
-
- foreach($qi as $x) {
- if($x['network'] !== NETWORK_FACEBOOK)
- continue;
-
- logger('facebook_queue: run');
-
- $r = q("SELECT `user`.* FROM `user` LEFT JOIN `contact` on `contact`.`uid` = `user`.`uid`
- WHERE `contact`.`self` = 1 AND `contact`.`id` = %d LIMIT 1",
- intval($x['cid'])
- );
- if(! count($r))
- continue;
-
- $user = $r[0];
-
- $appid = get_config('facebook', 'appid' );
- $secret = get_config('facebook', 'appsecret' );
-
- if($appid && $secret) {
- $fb_post = intval(get_pconfig($user['uid'],'facebook','post'));
- $fb_token = get_pconfig($user['uid'],'facebook','access_token');
-
- if($fb_post && $fb_token) {
- logger('facebook_queue: able to post');
- require_once('library/facebook.php');
-
- $z = unserialize($x['content']);
- $item = $z['item'];
- $j = post_url($z['url'],$z['post']);
-
- $retj = json_decode($j);
- if($retj->id) {
- q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d LIMIT 1",
- dbesc('fb::' . $retj->id),
- intval($item)
- );
- logger('facebook_queue: success: ' . $j);
- remove_queue_item($x['id']);
- }
- else {
- logger('facebook_queue: failed: ' . $j);
- update_queue_time($x['id']);
- }
- }
- }
- }
-}
-
-function fb_consume_all($uid) {
-
- require_once('include/items.php');
-
- $access_token = get_pconfig($uid,'facebook','access_token');
- if(! $access_token)
- return;
-
- if(! get_pconfig($uid,'facebook','no_wall')) {
- $private_wall = intval(get_pconfig($uid,'facebook','private_wall'));
- $s = fetch_url('https://graph.facebook.com/me/feed?access_token=' . $access_token);
- if($s) {
- $j = json_decode($s);
- logger('fb_consume_stream: wall: ' . print_r($j,true), LOGGER_DATA);
- fb_consume_stream($uid,$j,($private_wall) ? false : true);
- }
- }
- $s = fetch_url('https://graph.facebook.com/me/home?access_token=' . $access_token);
- if($s) {
- $j = json_decode($s);
- logger('fb_consume_stream: feed: ' . print_r($j,true), LOGGER_DATA);
- fb_consume_stream($uid,$j,false);
- }
-
-}
-
-function fb_consume_stream($uid,$j,$wall = false) {
-
- $a = get_app();
-
-
- $user = q("SELECT `nickname`, `blockwall` FROM `user` WHERE `uid` = %d AND `account_expired` = 0 LIMIT 1",
- intval($uid)
- );
- if(! count($user))
- return;
-
- $my_local_url = $a->get_baseurl() . '/profile/' . $user[0]['nickname'];
-
- $no_linking = get_pconfig($uid,'facebook','no_linking');
- if($no_linking)
- return;
-
- $self = q("SELECT * FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1",
- intval($uid)
- );
-
-
- $self_id = get_pconfig($uid,'facebook','self_id');
- if(! count($j->data) || (! strlen($self_id)))
- return;
-
- foreach($j->data as $entry) {
- logger('fb_consume: entry: ' . print_r($entry,true), LOGGER_DATA);
- $datarray = array();
-
- $r = q("SELECT * FROM `item` WHERE ( `uri` = '%s' OR `extid` = '%s') AND `uid` = %d LIMIT 1",
- dbesc('fb::' . $entry->id),
- dbesc('fb::' . $entry->id),
- intval($uid)
- );
- if(count($r)) {
- $post_exists = true;
- $orig_post = $r[0];
- $top_item = $r[0]['id'];
- }
- else {
- $post_exists = false;
- $orig_post = null;
- }
-
- if(! $orig_post) {
- $datarray['gravity'] = 0;
- $datarray['uid'] = $uid;
- $datarray['wall'] = (($wall) ? 1 : 0);
- $datarray['uri'] = $datarray['parent-uri'] = 'fb::' . $entry->id;
- $from = $entry->from;
- if($from->id == $self_id)
- $datarray['contact-id'] = $self[0]['id'];
- else {
- $r = q("SELECT * FROM `contact` WHERE `notify` = '%s' AND `uid` = %d AND `blocked` = 0 AND `readonly` = 0 LIMIT 1",
- dbesc($from->id),
- intval($uid)
- );
- if(count($r))
- $datarray['contact-id'] = $r[0]['id'];
- }
-
- // don't store post if we don't have a contact
-
- if(! x($datarray,'contact-id')) {
- logger('no contact: post ignored');
- continue;
- }
-
- $datarray['verb'] = ACTIVITY_POST;
- if($wall) {
- $datarray['owner-name'] = $self[0]['name'];
- $datarray['owner-link'] = $self[0]['url'];
- $datarray['owner-avatar'] = $self[0]['thumb'];
- }
- if(isset($entry->application) && isset($entry->application->name) && strlen($entry->application->name))
- $datarray['app'] = strip_tags($entry->application->name);
- else
- $datarray['app'] = 'facebook';
- $datarray['author-name'] = $from->name;
- $datarray['author-link'] = 'http://facebook.com/profile.php?id=' . $from->id;
- $datarray['author-avatar'] = 'https://graph.facebook.com/' . $from->id . '/picture';
- $datarray['plink'] = $datarray['author-link'] . '&v=wall&story_fbid=' . substr($entry->id,strpos($entry->id,'_') + 1);
-
- $datarray['body'] = $entry->message;
- if($entry->picture)
- $datarray['body'] .= "\n\n" . '[img]' . $entry->picture . '[/img]';
- if($entry->link)
- $datarray['body'] .= "\n" . linkify($entry->link);
- if($entry->name)
- $datarray['body'] .= "\n" . $entry->name;
- if($entry->caption)
- $datarray['body'] .= "\n" . $entry->caption;
- if($entry->description)
- $datarray['body'] .= "\n" . $entry->description;
- $datarray['created'] = datetime_convert('UTC','UTC',$entry->created_time);
- $datarray['edited'] = datetime_convert('UTC','UTC',$entry->updated_time);
-
- // If the entry has a privacy policy, we cannot assume who can or cannot see it,
- // as the identities are from a foreign system. Mark it as private to the owner.
-
- if($entry->privacy && $entry->privacy->value !== 'EVERYONE') {
- $datarray['private'] = 1;
- $datarray['allow_cid'] = '<' . $uid . '>';
- }
-
- $top_item = item_store($datarray);
- $r = q("SELECT * FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1",
- intval($top_item),
- intval($uid)
- );
- if(count($r)) {
- $orig_post = $r[0];
- logger('fb: new top level item posted');
- }
- }
-
- if(isset($entry->likes) && isset($entry->likes->data))
- $likers = $entry->likes->data;
- else
- $likers = null;
-
- if(isset($entry->comments) && isset($entry->comments->data))
- $comments = $entry->comments->data;
- else
- $comments = null;
-
- if(is_array($likers)) {
- foreach($likers as $likes) {
-
- if(! $orig_post)
- continue;
-
- // If we posted the like locally, it will be found with our url, not the FB url.
-
- $second_url = (($likes->id == $self_id) ? $self[0]['url'] : 'http://facebook.com/profile.php?id=' . $likes->id);
-
- $r = q("SELECT * FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `verb` = '%s'
- AND ( `author-link` = '%s' OR `author-link` = '%s' ) LIMIT 1",
- dbesc($orig_post['uri']),
- intval($uid),
- dbesc(ACTIVITY_LIKE),
- dbesc('http://facebook.com/profile.php?id=' . $likes->id),
- dbesc($second_url)
- );
-
- if(count($r))
- continue;
-
- $likedata = array();
- $likedata['parent'] = $top_item;
- $likedata['verb'] = ACTIVITY_LIKE;
- $likedata['gravity'] = 3;
- $likedata['uid'] = $uid;
- $likedata['wall'] = (($wall) ? 1 : 0);
- $likedata['uri'] = item_new_uri($a->get_baseurl(), $uid);
- $likedata['parent-uri'] = $orig_post['uri'];
- if($likes->id == $self_id)
- $likedata['contact-id'] = $self[0]['id'];
- else {
- $r = q("SELECT * FROM `contact` WHERE `notify` = '%s' AND `uid` = %d AND `blocked` = 0 AND `readonly` = 0 LIMIT 1",
- dbesc($likes->id),
- intval($uid)
- );
- if(count($r))
- $likedata['contact-id'] = $r[0]['id'];
- }
- if(! x($likedata,'contact-id'))
- $likedata['contact-id'] = $orig_post['contact-id'];
-
- $likedata['app'] = 'facebook';
- $likedata['verb'] = ACTIVITY_LIKE;
- $likedata['author-name'] = $likes->name;
- $likedata['author-link'] = 'http://facebook.com/profile.php?id=' . $likes->id;
- $likedata['author-avatar'] = 'https://graph.facebook.com/' . $likes->id . '/picture';
-
- $author = '[url=' . $likedata['author-link'] . ']' . $likedata['author-name'] . '[/url]';
- $objauthor = '[url=' . $orig_post['author-link'] . ']' . $orig_post['author-name'] . '[/url]';
- $post_type = t('status');
- $plink = '[url=' . $orig_post['plink'] . ']' . $post_type . '[/url]';
- $likedata['object-type'] = ACTIVITY_OBJ_NOTE;
-
- $likedata['body'] = sprintf( t('%1$s likes %2$s\'s %3$s'), $author, $objauthor, $plink);
- $likedata['object'] = '';
-
- $item = item_store($likedata);
- }
- }
- if(is_array($comments)) {
- foreach($comments as $cmnt) {
-
- if(! $orig_post)
- continue;
-
- $r = q("SELECT * FROM `item` WHERE `uid` = %d AND ( `uri` = '%s' OR `extid` = '%s' ) LIMIT 1",
- intval($uid),
- dbesc('fb::' . $cmnt->id),
- dbesc('fb::' . $cmnt->id)
- );
- if(count($r))
- continue;
-
- $cmntdata = array();
- $cmntdata['parent'] = $top_item;
- $cmntdata['verb'] = ACTIVITY_POST;
- $cmntdata['gravity'] = 6;
- $cmntdata['uid'] = $uid;
- $cmntdata['wall'] = (($wall) ? 1 : 0);
- $cmntdata['uri'] = 'fb::' . $cmnt->id;
- $cmntdata['parent-uri'] = $orig_post['uri'];
- if($cmnt->from->id == $self_id) {
- $cmntdata['contact-id'] = $self[0]['id'];
- }
- else {
- $r = q("SELECT * FROM `contact` WHERE `notify` = '%s' AND `uid` = %d LIMIT 1",
- dbesc($cmnt->from->id),
- intval($uid)
- );
- if(count($r)) {
- $cmntdata['contact-id'] = $r[0]['id'];
- if($r[0]['blocked'] || $r[0]['readonly'])
- continue;
- }
- }
- if(! x($cmntdata,'contact-id'))
- $cmntdata['contact-id'] = $orig_post['contact-id'];
-
- $cmntdata['app'] = 'facebook';
- $cmntdata['created'] = datetime_convert('UTC','UTC',$cmnt->created_time);
- $cmntdata['edited'] = datetime_convert('UTC','UTC',$cmnt->created_time);
- $cmntdata['verb'] = ACTIVITY_POST;
- $cmntdata['author-name'] = $cmnt->from->name;
- $cmntdata['author-link'] = 'http://facebook.com/profile.php?id=' . $cmnt->from->id;
- $cmntdata['author-avatar'] = 'https://graph.facebook.com/' . $cmnt->from->id . '/picture';
- $cmntdata['body'] = $cmnt->message;
- $item = item_store($cmntdata);
- }
- }
- }
-}
-
diff --git a/addon/fortunate/fortunate.css b/addon/fortunate/fortunate.css
deleted file mode 100644
index 61813b7d7..000000000
--- a/addon/fortunate/fortunate.css
+++ /dev/null
@@ -1,7 +0,0 @@
-.fortunate {
- margin-top: 25px;
- margin-left: 100px;
- margin-bottom: 25px;
- color: #000088;
- font-size: 14px;
-}
\ No newline at end of file
diff --git a/addon/fortunate/fortunate.php b/addon/fortunate/fortunate.php
deleted file mode 100644
index 5a6302e58..000000000
--- a/addon/fortunate/fortunate.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- */
-
-
-function fortunate_install() {
- register_hook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
-}
-
-function fortunate_uninstall() {
- unregister_hook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
-}
-
-
-function fortunate_fetch($a,&$b) {
-
- $a->page['htmlhead'] .= '' . "\r\n";
-
- $s = fetch_url('http://fortunemod.com/cookie.php?numlines=2&equal=1&rand=' . mt_rand());
- $b .= '
' . $s . '
';
-}
-
diff --git a/addon/impressum/README b/addon/impressum/README
deleted file mode 100644
index 8e4255bd1..000000000
--- a/addon/impressum/README
+++ /dev/null
@@ -1,27 +0,0 @@
-Impressum Plugin for Friendika
-
-Author: Tobias Diekershoff
- tobias.diekershoff@gmx.net
-
-License: 3-clause BSD license (same as Friendika)
-
-About
- This plugin adds an Impressum block to the /friendika page with informations
- about the page operator/owner and how to contact you in case of any questions.
-
- In the notes and postal fields you can use HTML tags for formatting.
-
-Configuration:
- For configuration you can set the following variables in the .htconfig file
- * $a->config['impressum']['owner'] this is the Name of the Operator
- * $a->config['impressum']['ownerprofile'] this is an optional Friendika account
- where the above owner name will link to
- * $a->config['impressum']['email'] a contact email address (optional)
- will be displayed slightly obfuscated
- as name(at)example(dot)com
- * $a->config['impressum']['postal'] should contain a postal address where
- you can be reached at (optional)
- * $a->config['impressum']['notes'] additional informations that should
- be displayed in the Impressum block
-
-
diff --git a/addon/impressum/admin.tpl b/addon/impressum/admin.tpl
deleted file mode 100644
index cfba8df76..000000000
--- a/addon/impressum/admin.tpl
+++ /dev/null
@@ -1,6 +0,0 @@
-{{ inc field_input.tpl with $field=$owner }}{{ endinc }}
-{{ inc field_input.tpl with $field=$ownerprofile }}{{ endinc }}
-{{ inc field_input.tpl with $field=$postal }}{{ endinc }}
-{{ inc field_input.tpl with $field=$notes }}{{ endinc }}
-{{ inc field_input.tpl with $field=$email }}{{ endinc }}
-
diff --git a/addon/impressum/impressum.php b/addon/impressum/impressum.php
deleted file mode 100644
index b760c7e0d..000000000
--- a/addon/impressum/impressum.php
+++ /dev/null
@@ -1,76 +0,0 @@
-
- * License: 3-clause BSD license
- */
-
-function impressum_install() {
- register_hook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
- logger("installed impressum plugin");
-}
-
-function impressum_uninstall() {
- unregister_hook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
- logger("uninstalled impressum plugin");
-}
-function obfuscate_email ($s) {
- $s = str_replace('@','(at)',$s);
- $s = str_replace('.','(dot)',$s);
- return $s;
-}
-function impressum_show($a,&$b) {
- $b .= '
'.t('The impressum addon needs to be configured! Please add at least the owner variable to your config file. For other variables please refer to the README file of the addon.').'
-
-Initialize uploader when the DOM is ready. Change the action option.
-For example ../server/php.php for the default folder structure.
-In the server folder you will find examples for different platforms.
-If you can't find the one you need, check the readme.txt in the same folder.
-
- var uploader = new qq.FileUploader({
- // pass the dom node (ex. $(selector)[0] for jQuery users)
- element: document.getElementById('file-uploader'),
- // path to server-side upload script
- action: '/server/upload'
- });
-
-### Options of both classes ###
-
- // url of the server-side upload script, should be on the same domain
- action: '/server/upload',
- // additional data to send, name-value pairs
- params: {},
-
- // validation
- // ex. ['jpg', 'jpeg', 'png', 'gif'] or []
- allowedExtensions: [],
- // each file size limit in bytes
- // this option isn't supported in all browsers
- sizeLimit: 0, // max size
- minSizeLimit: 0, // min size
-
- // set to true to output server response to console
- debug: false,
-
- // events
- // you can return false to abort submit
- onSubmit: function(id, fileName){},
- onProgress: function(id, fileName, loaded, total){},
- onComplete: function(id, fileName, responseJSON){},
- onCancel: function(id, fileName){},
-
- messages: {
- // error messages, see qq.FileUploaderBasic for content
- },
- showMessage: function(message){ alert(message); }
-
-Instance methods
-
-* setParams(newParams)
-
-#### Changing alert/messages to something more user friendly ####
-
-If you limited file types and max size, you will probably want to change the default alert and
-messages as you see fit, this is possible using showMessage callback and messages option.
-
-#### Sending additional params ####
-
-To add a parameter that will be passed as a query string with each upload use params option.
-
- var uploader = new qq.FileUploader({
- element: document.getElementById('file-uploader'),
- action: '/server-side.upload',
- // additional data to send, name-value pairs
- params: {
- param1: 'value1',
- param2: 'value2'
- }
- });
-
-To change params based on the state of your app, use
-
- uploader.setParams({
- anotherParam: 'value'
- });
-
-It can be nicely used in onSubmit callback.
-
-#### Troubleshooting ####
-
-If you can't get the uploader to work, please try the following steps
-before asking for help.
-
-If the upload doesn't complete, saying failed.
-
-* Set the debug option of the FileUploader to true.
-* Open the page where you have a FileUploader.
-* Open developer console in your browser.
-* Try to upload the file. You should see a server serponse.
-
-It should be {success:true} for completed requests. If it's not,
-then you have a problem with your server-side script.
-
-#### Contributors ####
-
-Thanks to everybody who contributed, either by sending bug reports or donating. And special thanks to:
-
-John Yeary
-Sidney Maestre
-Patrick Pfeiffer
-Sean Sandy (SeanJA)
-Andy Newby
-Ivan Valles
\ No newline at end of file
diff --git a/addon/js_upload/file-uploader/server/OctetStreamReader.java b/addon/js_upload/file-uploader/server/OctetStreamReader.java
deleted file mode 100644
index 23f02be12..000000000
--- a/addon/js_upload/file-uploader/server/OctetStreamReader.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright 2010 Blue Lotus Software, LLC.
- * Copyright 2010 John Yeary .
- * Copyright 2010 Allan O'Driscoll
- *
- * Dual Licensed MIT and GPL v.2
- *
- * The MIT License
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- *
- *
- * The GNU General Public License (GPL) Version 2, June 1991
- * This program is free software; you can redistribute it and/or modify it under the terms of the
- * GNU General Public License as published by the Free Software Foundation; version 2 of the License.
-
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package com.bluelotussoftware.apache.commons.fileupload.example;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.apache.commons.io.IOUtils;
-
-/**
- * Reads an application/octet-stream and writes it to a file.
- * @author John Yeary
- * @author Allan O'Driscoll
- * @version 1.0
- */
-public class OctetStreamReader extends HttpServlet {
-
- private static final long serialVersionUID = 6748857432950840322L;
- private static final String DESTINATION_DIR_PATH = "files";
- private static String realPath;
-
- /**
- * {@inheritDoc}
- * @param config
- * @throws ServletException
- */
- @Override
- public void init(ServletConfig config) throws ServletException {
- super.init(config);
- realPath = getServletContext().getRealPath(DESTINATION_DIR_PATH) + "/";
- }
-
- /**
- * Handles the HTTP POST method.
- * @param request servlet request
- * @param response servlet response
- * @throws ServletException if a servlet-specific error occurs
- * @throws IOException if an I/O error occurs
- */
- @Override
- protected void doPost(HttpServletRequest request, HttpServletResponse response)
- throws ServletException {
-
- PrintWriter writer = null;
- InputStream is = null;
- FileOutputStream fos = null;
-
- try {
- writer = response.getWriter();
- } catch (IOException ex) {
- log(OctetStreamReader.class.getName() + "has thrown an exception: " + ex.getMessage());
- }
-
- String filename = request.getHeader("X-File-Name");
- try {
- is = request.getInputStream();
- fos = new FileOutputStream(new File(realPath + filename));
- IOUtils.copy(is, fos);
- response.setStatus(response.SC_OK);
- writer.print("{success: true}");
- } catch (FileNotFoundException ex) {
- response.setStatus(response.SC_INTERNAL_SERVER_ERROR);
- writer.print("{success: false}");
- log(OctetStreamReader.class.getName() + "has thrown an exception: " + ex.getMessage());
- } catch (IOException ex) {
- response.setStatus(response.SC_INTERNAL_SERVER_ERROR);
- writer.print("{success: false}");
- log(OctetStreamReader.class.getName() + "has thrown an exception: " + ex.getMessage());
- } finally {
- try {
- fos.close();
- is.close();
- } catch (IOException ignored) {
- }
- }
-
- writer.flush();
- writer.close();
- }
-}
diff --git a/addon/js_upload/file-uploader/server/coldfusion/coldfusion.cfc b/addon/js_upload/file-uploader/server/coldfusion/coldfusion.cfc
deleted file mode 100644
index 4e07270d1..000000000
--- a/addon/js_upload/file-uploader/server/coldfusion/coldfusion.cfc
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/addon/js_upload/file-uploader/server/coldfusion/demo.cfm b/addon/js_upload/file-uploader/server/coldfusion/demo.cfm
deleted file mode 100644
index 98ab80030..000000000
--- a/addon/js_upload/file-uploader/server/coldfusion/demo.cfm
+++ /dev/null
@@ -1 +0,0 @@
-
To upload a file, click on the button below. Drag-and-drop is supported in FF, Chrome.
Progress-bar is supported in FF3.6+, Chrome6+, Safari4+
\ No newline at end of file
diff --git a/addon/js_upload/file-uploader/server/coldfusion/readme.txt b/addon/js_upload/file-uploader/server/coldfusion/readme.txt
deleted file mode 100644
index c974689aa..000000000
--- a/addon/js_upload/file-uploader/server/coldfusion/readme.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Coldfusion example by Sidney Maestre
-http://www.designovermatter.com/post.cfm/ajax-file-uploader-for-coldfusion
-
- 1. Unzip Andrew's AJAX Uploader into your web root.
- 2. Replace the demo.htm with demo.cfm in the "client" folder
- 3. Place coldfusion.cfc in the "server" folder
- 4. Browse to the demo.cfm file and try it out. The file should be written to the "server" folder.
-
-Questions? You can contact Sidney Maestreme by mail (sid.maestre(at)designovermatter.com) or Twitter @SidneyAllen
\ No newline at end of file
diff --git a/addon/js_upload/file-uploader/server/perl.cgi b/addon/js_upload/file-uploader/server/perl.cgi
deleted file mode 100644
index c66f1aa1a..000000000
--- a/addon/js_upload/file-uploader/server/perl.cgi
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/perl
-
- use strict;
- use CGI::Carp qw(fatalsToBrowser);
-
- use Digest::MD5;
-
- my $uploaddir = '/folder/to/save/in/ajax_upload/tmp_uploads';
-
- my $maxFileSize = 0.5 * 1024 * 1024; # 1/2mb max file size...
-
- use CGI;
- my $IN = new CGI;
-
- my $file = $IN->param('POSTDATA');
- my $temp_id = $IN->param('temp_id');
-
- # make a random filename, and we guess the file type later on...
- my $name = Digest::MD5::md5_base64( rand );
- $name =~ s/\+/_/g;
- $name =~ s/\//_/g;
-
- my $type;
- if ($file =~ /^GIF/) {
- $type = "gif";
- } elsif ($file =~ /PNG/) {
- $type = "png";
- } elsif ($file =~ /JFIF/) {
- $type = "jpg";
- }
-
- if (!$type) {
- print qq|{ "success": false, "error": "Invalid file type..." }|;
- print STDERR "file has been NOT been uploaded... \n";
- }
-
- print STDERR "Making dir: $uploaddir/$temp_id \n";
-
- mkdir("$uploaddir/$temp_id");
-
- open(WRITEIT, ">$uploaddir/$name.$type") or die "Cant write to $uploaddir/$name.$type. Reason: $!";
- print WRITEIT $file;
- close(WRITEIT);
-
- my $check_size = -s "$uploaddir/$name.$type";
-
- print STDERR qq|Main filesize: $check_size Max Filesize: $maxFileSize \n\n|;
-
- print $IN->header();
- if ($check_size < 1) {
- print STDERR "ooops, its empty - gonna get rid of it!\n";
- print qq|{ "success": false, "error": "File is empty..." }|;
- print STDERR "file has been NOT been uploaded... \n";
- } elsif ($check_size > $maxFileSize) {
- print STDERR "ooops, its too large - gonna get rid of it!\n";
- print qq|{ "success": false, "error": "File is too large..." }|;
- print STDERR "file has been NOT been uploaded... \n";
- } else {
- print qq|{ "success": true }|;
-
- print STDERR "file has been successfully uploaded... thank you.\n";
- }
\ No newline at end of file
diff --git a/addon/js_upload/file-uploader/server/php.php b/addon/js_upload/file-uploader/server/php.php
deleted file mode 100644
index 915c86c6e..000000000
--- a/addon/js_upload/file-uploader/server/php.php
+++ /dev/null
@@ -1,162 +0,0 @@
-getSize()){
- return false;
- }
-
- $target = fopen($path, "w");
- fseek($temp, 0, SEEK_SET);
- stream_copy_to_stream($temp, $target);
- fclose($target);
-
- return true;
- }
- function getName() {
- return $_GET['qqfile'];
- }
- function getSize() {
- if (isset($_SERVER["CONTENT_LENGTH"])){
- return (int)$_SERVER["CONTENT_LENGTH"];
- } else {
- throw new Exception('Getting content length is not supported.');
- }
- }
-}
-
-/**
- * Handle file uploads via regular form post (uses the $_FILES array)
- */
-class qqUploadedFileForm {
- /**
- * Save the file to the specified path
- * @return boolean TRUE on success
- */
- function save($path) {
- if(!move_uploaded_file($_FILES['qqfile']['tmp_name'], $path)){
- return false;
- }
- return true;
- }
- function getName() {
- return $_FILES['qqfile']['name'];
- }
- function getSize() {
- return $_FILES['qqfile']['size'];
- }
-}
-
-class qqFileUploader {
- private $allowedExtensions = array();
- private $sizeLimit = 10485760;
- private $file;
-
- function __construct(array $allowedExtensions = array(), $sizeLimit = 10485760){
- $allowedExtensions = array_map("strtolower", $allowedExtensions);
-
- $this->allowedExtensions = $allowedExtensions;
- $this->sizeLimit = $sizeLimit;
-
- $this->checkServerSettings();
-
- if (isset($_GET['qqfile'])) {
- $this->file = new qqUploadedFileXhr();
- } elseif (isset($_FILES['qqfile'])) {
- $this->file = new qqUploadedFileForm();
- } else {
- $this->file = false;
- }
- }
-
- private function checkServerSettings(){
- $postSize = $this->toBytes(ini_get('post_max_size'));
- $uploadSize = $this->toBytes(ini_get('upload_max_filesize'));
-
- if ($postSize < $this->sizeLimit || $uploadSize < $this->sizeLimit){
- $size = max(1, $this->sizeLimit / 1024 / 1024) . 'M';
- die("{'error':'increase post_max_size and upload_max_filesize to $size'}");
- }
- }
-
- private function toBytes($str){
- $val = trim($str);
- $last = strtolower($str[strlen($str)-1]);
- switch($last) {
- case 'g': $val *= 1024;
- case 'm': $val *= 1024;
- case 'k': $val *= 1024;
- }
- return $val;
- }
-
- /**
- * Returns array('success'=>true) or array('error'=>'error message')
- */
- function handleUpload($uploadDirectory, $replaceOldFile = FALSE){
- if (!is_writable($uploadDirectory)){
- return array('error' => "Server error. Upload directory isn't writable.");
- }
-
- if (!$this->file){
- return array('error' => 'No files were uploaded.');
- }
-
- $size = $this->file->getSize();
-
- if ($size == 0) {
- return array('error' => 'File is empty');
- }
-
- if ($size > $this->sizeLimit) {
- return array('error' => 'File is too large');
- }
-
- $pathinfo = pathinfo($this->file->getName());
- $filename = $pathinfo['filename'];
- //$filename = md5(uniqid());
- $ext = $pathinfo['extension'];
-
- if($this->allowedExtensions && !in_array(strtolower($ext), $this->allowedExtensions)){
- $these = implode(', ', $this->allowedExtensions);
- return array('error' => 'File has an invalid extension, it should be one of '. $these . '.');
- }
-
- if(!$replaceOldFile){
- /// don't overwrite previous files that were uploaded
- while (file_exists($uploadDirectory . $filename . '.' . $ext)) {
- $filename .= rand(10, 99);
- }
- }
-
- if ($this->file->save($uploadDirectory . $filename . '.' . $ext)){
- return array('success'=>true);
- } else {
- return array('error'=> 'Could not save uploaded file.' .
- 'The upload was cancelled, or server error encountered');
- }
-
- }
-}
-
-// list of valid extensions, ex. array("jpeg", "xml", "bmp")
-$allowedExtensions = array();
-// max file size in bytes
-$sizeLimit = 10 * 1024 * 1024;
-
-$uploader = new qqFileUploader($allowedExtensions, $sizeLimit);
-$result = $uploader->handleUpload('uploads/');
-// to pass data through iframe you will need to encode all html tags
-echo htmlspecialchars(json_encode($result), ENT_NOQUOTES);
diff --git a/addon/js_upload/file-uploader/server/readme.txt b/addon/js_upload/file-uploader/server/readme.txt
deleted file mode 100644
index 8363c0be6..000000000
--- a/addon/js_upload/file-uploader/server/readme.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-The server-side code should consist of two parts.
-
-1. For IE6-8, Opera, older versions of other browsers you get the file as
-you normally do with regular form-base uploads.
-
-2. For browsers which upload file with progress bar, you will need to get the raw
-post data and write it to the file.
-
-## Return values ##
-
-You should return json as a text/html, and escape all
-'<' as '<', '>' as '>', and '&' as '&'.
-
-Return
-{"success":true} when upload was successful
-{"error":"error message to display"} in case of error
-
-Send me a mail to andrew (at) valums.com, if you will have any questions.
\ No newline at end of file
diff --git a/addon/js_upload/file-uploader/server/uploads/.gitignore b/addon/js_upload/file-uploader/server/uploads/.gitignore
deleted file mode 100644
index c96a04f00..000000000
--- a/addon/js_upload/file-uploader/server/uploads/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!.gitignore
\ No newline at end of file
diff --git a/addon/js_upload/file-uploader/tests/action-acceptance.php b/addon/js_upload/file-uploader/tests/action-acceptance.php
deleted file mode 100644
index fc9583f21..000000000
--- a/addon/js_upload/file-uploader/tests/action-acceptance.php
+++ /dev/null
@@ -1,46 +0,0 @@
- 9 * 1024){
- die ('{error: "server-error file size is bigger than 9kB"}');
-}
-
-if (count($_GET)){
- array_merge($_GET, array('fileName'=>$fileName));
-
- $response = array_merge($_GET, array('success'=>true, 'fileName'=>$fileName));
-
- // to pass data through iframe you will need to encode all html tags
- echo htmlspecialchars(json_encode($response), ENT_NOQUOTES);
-} else {
- die ('{error: "server-error query params not passed"}');
-}
diff --git a/addon/js_upload/file-uploader/tests/action-handler-queue-test.php b/addon/js_upload/file-uploader/tests/action-handler-queue-test.php
deleted file mode 100644
index ff13576dd..000000000
--- a/addon/js_upload/file-uploader/tests/action-handler-queue-test.php
+++ /dev/null
@@ -1,31 +0,0 @@
-$fileName)));
-} else {
- die ('{error: "query params not passed"}');
-}
diff --git a/addon/js_upload/file-uploader/tests/action-slow-response.php b/addon/js_upload/file-uploader/tests/action-slow-response.php
deleted file mode 100644
index 15c38d8cf..000000000
--- a/addon/js_upload/file-uploader/tests/action-slow-response.php
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
-
-
-
-
Drag multiple files into input field. (Win7)
-
Result: One file is selected multiple times. Expected: Multiple files are selected.
-
-
\ No newline at end of file
diff --git a/addon/js_upload/file-uploader/tests/browser-bugs/safari-bug2.htm b/addon/js_upload/file-uploader/tests/browser-bugs/safari-bug2.htm
deleted file mode 100644
index 57f7bc013..000000000
--- a/addon/js_upload/file-uploader/tests/browser-bugs/safari-bug2.htm
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/addon/js_upload/file-uploader/tests/iframe-content-tests/application-javascript.php b/addon/js_upload/file-uploader/tests/iframe-content-tests/application-javascript.php
deleted file mode 100644
index a91c75f69..000000000
--- a/addon/js_upload/file-uploader/tests/iframe-content-tests/application-javascript.php
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/addon/js_upload/file-uploader/tests/iframe-content-tests/application-json.php b/addon/js_upload/file-uploader/tests/iframe-content-tests/application-json.php
deleted file mode 100644
index c1161256f..000000000
--- a/addon/js_upload/file-uploader/tests/iframe-content-tests/application-json.php
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/addon/js_upload/file-uploader/tests/iframe-content-tests/header-404.php b/addon/js_upload/file-uploader/tests/iframe-content-tests/header-404.php
deleted file mode 100644
index 17d807555..000000000
--- a/addon/js_upload/file-uploader/tests/iframe-content-tests/header-404.php
+++ /dev/null
@@ -1,2 +0,0 @@
-
-Not found!
\ No newline at end of file
diff --git a/addon/js_upload/file-uploader/tests/iframe-content-tests/somepage.php b/addon/js_upload/file-uploader/tests/iframe-content-tests/somepage.php
deleted file mode 100644
index f0a2575a1..000000000
--- a/addon/js_upload/file-uploader/tests/iframe-content-tests/somepage.php
+++ /dev/null
@@ -1 +0,0 @@
-I'm a page.
\ No newline at end of file
diff --git a/addon/js_upload/file-uploader/tests/iframe-content-tests/text-html-large.php b/addon/js_upload/file-uploader/tests/iframe-content-tests/text-html-large.php
deleted file mode 100644
index ac9682be9..000000000
--- a/addon/js_upload/file-uploader/tests/iframe-content-tests/text-html-large.php
+++ /dev/null
@@ -1,6 +0,0 @@
- "&a, to download means to receive data to a local system from a remote system, or to initiate such a data transfer. Examples of a remote system from which a download might be performed include a webserver, FTP server, email server, or other similar systems. A download can mean either any file that is offered for downloading or that has been downloaded, or the process of receiving such a file.The inverse operation, uploading, can refer to the sending of data from a local system to a remote system such as a server or another client with the intent that the remote system should store a copy of the data being transferred, or the initiation of such a process. The words first came into popular usage among computer users with the increased popularity of Bulletin Board Systems (BBSs), facilitated by the widespread distribution and implementation of dial-up access the in the 1970s",
- 'sub' => array('arr'=>array(10,20,30), 'boo'=>false)
- );
- echo htmlspecialchars(json_encode($data), ENT_NOQUOTES);
diff --git a/addon/js_upload/file-uploader/tests/iframe-content-tests/text-javascript.php b/addon/js_upload/file-uploader/tests/iframe-content-tests/text-javascript.php
deleted file mode 100644
index ee930d085..000000000
--- a/addon/js_upload/file-uploader/tests/iframe-content-tests/text-javascript.php
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/addon/js_upload/file-uploader/tests/iframe-content-tests/text-plain.php b/addon/js_upload/file-uploader/tests/iframe-content-tests/text-plain.php
deleted file mode 100644
index 90c1af0ee..000000000
--- a/addon/js_upload/file-uploader/tests/iframe-content-tests/text-plain.php
+++ /dev/null
@@ -1,2 +0,0 @@
-
-text
P tag
\ No newline at end of file
diff --git a/addon/js_upload/file-uploader/tests/jquery-1.4.2.min.js b/addon/js_upload/file-uploader/tests/jquery-1.4.2.min.js
deleted file mode 100644
index 7c2430802..000000000
--- a/addon/js_upload/file-uploader/tests/jquery-1.4.2.min.js
+++ /dev/null
@@ -1,154 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.4.2
- * http://jquery.com/
- *
- * Copyright 2010, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2010, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- *
- * Date: Sat Feb 13 22:33:48 2010 -0500
- */
-(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
-Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
-(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
-a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
-"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
-function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b