aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichael Vogel <icarus@dabo.de>2012-04-07 18:35:29 +0200
committerMichael Vogel <icarus@dabo.de>2012-04-07 18:35:29 +0200
commitcb05801a9031254f5882038de07a3ee4d5f89dd0 (patch)
tree186d9d1a4c591ec23e0e5bbebd08301143b5c157 /include
parent7308dbae282194356c2e95936aecc15ea059f356 (diff)
parent0fa3b7f348c3deeb85cb5f5f9bd35ba47b0e92ee (diff)
downloadvolse-hubzilla-cb05801a9031254f5882038de07a3ee4d5f89dd0.tar.gz
volse-hubzilla-cb05801a9031254f5882038de07a3ee4d5f89dd0.tar.bz2
volse-hubzilla-cb05801a9031254f5882038de07a3ee4d5f89dd0.zip
Merge commit 'upstream/master'
Diffstat (limited to 'include')
-rw-r--r--[-rwxr-xr-x]include/Contact.php0
-rw-r--r--[-rwxr-xr-x]include/EmailNotification.php0
-rw-r--r--[-rwxr-xr-x]include/Photo.php0
-rw-r--r--[-rwxr-xr-x]include/Scrape.php0
-rw-r--r--[-rwxr-xr-x]include/acl_selectors.php0
-rw-r--r--[-rwxr-xr-x]include/api.php0
-rw-r--r--[-rwxr-xr-x]include/attach.php0
-rw-r--r--[-rwxr-xr-x]include/auth.php0
-rw-r--r--[-rwxr-xr-x]include/bb2diaspora.php0
-rw-r--r--[-rwxr-xr-x]include/cache.php0
-rw-r--r--[-rwxr-xr-x]include/contact_selectors.php0
-rw-r--r--[-rwxr-xr-x]include/contact_widgets.php0
-rw-r--r--[-rwxr-xr-x]include/conversation.php0
-rw-r--r--[-rwxr-xr-x]include/cronhooks.php0
-rw-r--r--[-rwxr-xr-x]include/crypto.php0
-rw-r--r--[-rwxr-xr-x]include/datetime.php0
-rw-r--r--[-rwxr-xr-x]include/dba.php0
-rw-r--r--[-rwxr-xr-x]include/delivery.php0
-rw-r--r--[-rwxr-xr-x]include/diaspora.php0
-rw-r--r--[-rwxr-xr-x]include/directory.php0
-rw-r--r--[-rwxr-xr-x]include/email.php0
-rw-r--r--[-rwxr-xr-x]include/enotify.php0
-rw-r--r--[-rwxr-xr-x]include/event.php0
-rw-r--r--[-rwxr-xr-x]include/expire.php0
-rw-r--r--[-rwxr-xr-x]include/fcontact.php0
-rw-r--r--[-rwxr-xr-x]include/group.php0
-rw-r--r--[-rwxr-xr-x]include/html2bbcode.php0
-rw-r--r--[-rwxr-xr-x]include/items.php0
-rw-r--r--[-rwxr-xr-x]include/message.php0
-rw-r--r--[-rwxr-xr-x]include/nav.php0
-rw-r--r--[-rwxr-xr-x]include/network.php0
-rw-r--r--[-rwxr-xr-x]include/notifier.php0
-rw-r--r--[-rwxr-xr-x]include/oauth.php0
-rw-r--r--[-rwxr-xr-x]include/oembed.php0
-rw-r--r--[-rwxr-xr-x]include/pgettext.php0
-rw-r--r--[-rwxr-xr-x]include/plugin.php9
-rw-r--r--[-rwxr-xr-x]include/poller.php0
-rw-r--r--[-rwxr-xr-x]include/profile_advanced.php0
-rw-r--r--[-rwxr-xr-x]include/profile_selectors.php0
-rw-r--r--[-rwxr-xr-x]include/profile_update.php0
-rw-r--r--[-rwxr-xr-x]include/queue.php0
-rw-r--r--[-rwxr-xr-x]include/queue_fn.php0
-rw-r--r--[-rwxr-xr-x]include/remoteupdate.php0
-rw-r--r--[-rwxr-xr-x]include/salmon.php0
-rw-r--r--[-rwxr-xr-x]include/security.php0
-rw-r--r--[-rwxr-xr-x]include/session.php0
-rw-r--r--[-rwxr-xr-x]include/socgraph.php0
-rw-r--r--[-rwxr-xr-x]include/system_unavailable.php0
-rw-r--r--[-rwxr-xr-x]include/template_processor.php4
-rw-r--r--include/text.php3
50 files changed, 14 insertions, 2 deletions
diff --git a/include/Contact.php b/include/Contact.php
index d9949b1ef..d9949b1ef 100755..100644
--- a/include/Contact.php
+++ b/include/Contact.php
diff --git a/include/EmailNotification.php b/include/EmailNotification.php
index 8861e8f5d..8861e8f5d 100755..100644
--- a/include/EmailNotification.php
+++ b/include/EmailNotification.php
diff --git a/include/Photo.php b/include/Photo.php
index 4d02b5c65..4d02b5c65 100755..100644
--- a/include/Photo.php
+++ b/include/Photo.php
diff --git a/include/Scrape.php b/include/Scrape.php
index 9c237916b..9c237916b 100755..100644
--- a/include/Scrape.php
+++ b/include/Scrape.php
diff --git a/include/acl_selectors.php b/include/acl_selectors.php
index a5f5aff53..a5f5aff53 100755..100644
--- a/include/acl_selectors.php
+++ b/include/acl_selectors.php
diff --git a/include/api.php b/include/api.php
index 065f14cff..065f14cff 100755..100644
--- a/include/api.php
+++ b/include/api.php
diff --git a/include/attach.php b/include/attach.php
index 6d611cec0..6d611cec0 100755..100644
--- a/include/attach.php
+++ b/include/attach.php
diff --git a/include/auth.php b/include/auth.php
index 1341f3bb8..1341f3bb8 100755..100644
--- a/include/auth.php
+++ b/include/auth.php
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index 8487f845a..8487f845a 100755..100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
diff --git a/include/cache.php b/include/cache.php
index 3c8a3f713..3c8a3f713 100755..100644
--- a/include/cache.php
+++ b/include/cache.php
diff --git a/include/contact_selectors.php b/include/contact_selectors.php
index 4b3ca987a..4b3ca987a 100755..100644
--- a/include/contact_selectors.php
+++ b/include/contact_selectors.php
diff --git a/include/contact_widgets.php b/include/contact_widgets.php
index e0f37f078..e0f37f078 100755..100644
--- a/include/contact_widgets.php
+++ b/include/contact_widgets.php
diff --git a/include/conversation.php b/include/conversation.php
index df92a40ed..df92a40ed 100755..100644
--- a/include/conversation.php
+++ b/include/conversation.php
diff --git a/include/cronhooks.php b/include/cronhooks.php
index 37541f013..37541f013 100755..100644
--- a/include/cronhooks.php
+++ b/include/cronhooks.php
diff --git a/include/crypto.php b/include/crypto.php
index 0feb45c24..0feb45c24 100755..100644
--- a/include/crypto.php
+++ b/include/crypto.php
diff --git a/include/datetime.php b/include/datetime.php
index 6d395fe3f..6d395fe3f 100755..100644
--- a/include/datetime.php
+++ b/include/datetime.php
diff --git a/include/dba.php b/include/dba.php
index 76cc0bc7b..76cc0bc7b 100755..100644
--- a/include/dba.php
+++ b/include/dba.php
diff --git a/include/delivery.php b/include/delivery.php
index 794b8f27a..794b8f27a 100755..100644
--- a/include/delivery.php
+++ b/include/delivery.php
diff --git a/include/diaspora.php b/include/diaspora.php
index 06df9c24a..06df9c24a 100755..100644
--- a/include/diaspora.php
+++ b/include/diaspora.php
diff --git a/include/directory.php b/include/directory.php
index cae78adb4..cae78adb4 100755..100644
--- a/include/directory.php
+++ b/include/directory.php
diff --git a/include/email.php b/include/email.php
index b43ae0dc1..b43ae0dc1 100755..100644
--- a/include/email.php
+++ b/include/email.php
diff --git a/include/enotify.php b/include/enotify.php
index 8385bdec5..8385bdec5 100755..100644
--- a/include/enotify.php
+++ b/include/enotify.php
diff --git a/include/event.php b/include/event.php
index 29202badd..29202badd 100755..100644
--- a/include/event.php
+++ b/include/event.php
diff --git a/include/expire.php b/include/expire.php
index 5fa0ec758..5fa0ec758 100755..100644
--- a/include/expire.php
+++ b/include/expire.php
diff --git a/include/fcontact.php b/include/fcontact.php
index 8821a985f..8821a985f 100755..100644
--- a/include/fcontact.php
+++ b/include/fcontact.php
diff --git a/include/group.php b/include/group.php
index 4a35912e5..4a35912e5 100755..100644
--- a/include/group.php
+++ b/include/group.php
diff --git a/include/html2bbcode.php b/include/html2bbcode.php
index 69ccf41b7..69ccf41b7 100755..100644
--- a/include/html2bbcode.php
+++ b/include/html2bbcode.php
diff --git a/include/items.php b/include/items.php
index ee6960534..ee6960534 100755..100644
--- a/include/items.php
+++ b/include/items.php
diff --git a/include/message.php b/include/message.php
index 377d7c715..377d7c715 100755..100644
--- a/include/message.php
+++ b/include/message.php
diff --git a/include/nav.php b/include/nav.php
index 2c9c643a9..2c9c643a9 100755..100644
--- a/include/nav.php
+++ b/include/nav.php
diff --git a/include/network.php b/include/network.php
index 38d0980d5..38d0980d5 100755..100644
--- a/include/network.php
+++ b/include/network.php
diff --git a/include/notifier.php b/include/notifier.php
index ca7c7b92e..ca7c7b92e 100755..100644
--- a/include/notifier.php
+++ b/include/notifier.php
diff --git a/include/oauth.php b/include/oauth.php
index 2724dcf7c..2724dcf7c 100755..100644
--- a/include/oauth.php
+++ b/include/oauth.php
diff --git a/include/oembed.php b/include/oembed.php
index 1f45d2814..1f45d2814 100755..100644
--- a/include/oembed.php
+++ b/include/oembed.php
diff --git a/include/pgettext.php b/include/pgettext.php
index 83e76ba9d..83e76ba9d 100755..100644
--- a/include/pgettext.php
+++ b/include/pgettext.php
diff --git a/include/plugin.php b/include/plugin.php
index e37ae8435..8196e8756 100755..100644
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -17,7 +17,12 @@ function uninstall_plugin($plugin){
}}
if (! function_exists('install_plugin')){
-function install_plugin($plugin){
+function install_plugin($plugin) {
+
+ // silently fail if plugin was removed
+
+ if(! file_exists('addon/' . $plugin . '/' . $plugin . '.php'))
+ return false;
logger("Addons: installing " . $plugin);
$t = @filemtime('addon/' . $plugin . '/' . $plugin . '.php');
@include_once('addon/' . $plugin . '/' . $plugin . '.php');
@@ -32,9 +37,11 @@ function install_plugin($plugin){
intval($t),
$plugin_admin
);
+ return true;
}
else {
logger("Addons: FAILED installing " . $plugin);
+ return false;
}
}}
diff --git a/include/poller.php b/include/poller.php
index 499483d00..499483d00 100755..100644
--- a/include/poller.php
+++ b/include/poller.php
diff --git a/include/profile_advanced.php b/include/profile_advanced.php
index 004a58524..004a58524 100755..100644
--- a/include/profile_advanced.php
+++ b/include/profile_advanced.php
diff --git a/include/profile_selectors.php b/include/profile_selectors.php
index 92579f64a..92579f64a 100755..100644
--- a/include/profile_selectors.php
+++ b/include/profile_selectors.php
diff --git a/include/profile_update.php b/include/profile_update.php
index 61eaee75d..61eaee75d 100755..100644
--- a/include/profile_update.php
+++ b/include/profile_update.php
diff --git a/include/queue.php b/include/queue.php
index 7e92705be..7e92705be 100755..100644
--- a/include/queue.php
+++ b/include/queue.php
diff --git a/include/queue_fn.php b/include/queue_fn.php
index 3c1087f4e..3c1087f4e 100755..100644
--- a/include/queue_fn.php
+++ b/include/queue_fn.php
diff --git a/include/remoteupdate.php b/include/remoteupdate.php
index 9effc9b6e..9effc9b6e 100755..100644
--- a/include/remoteupdate.php
+++ b/include/remoteupdate.php
diff --git a/include/salmon.php b/include/salmon.php
index 3d525f51a..3d525f51a 100755..100644
--- a/include/salmon.php
+++ b/include/salmon.php
diff --git a/include/security.php b/include/security.php
index 66622fd33..66622fd33 100755..100644
--- a/include/security.php
+++ b/include/security.php
diff --git a/include/session.php b/include/session.php
index 6c32e299f..6c32e299f 100755..100644
--- a/include/session.php
+++ b/include/session.php
diff --git a/include/socgraph.php b/include/socgraph.php
index 3f5194049..3f5194049 100755..100644
--- a/include/socgraph.php
+++ b/include/socgraph.php
diff --git a/include/system_unavailable.php b/include/system_unavailable.php
index bd7196cdf..bd7196cdf 100755..100644
--- a/include/system_unavailable.php
+++ b/include/system_unavailable.php
diff --git a/include/template_processor.php b/include/template_processor.php
index 4c317efe1..46252c355 100755..100644
--- a/include/template_processor.php
+++ b/include/template_processor.php
@@ -13,12 +13,14 @@
var $debug=false;
private function _preg_error(){
+
switch(preg_last_error()){
case PREG_INTERNAL_ERROR: echo('PREG_INTERNAL_ERROR'); break;
case PREG_BACKTRACK_LIMIT_ERROR: echo('PREG_BACKTRACK_LIMIT_ERROR'); break;
case PREG_RECURSION_LIMIT_ERROR: echo('PREG_RECURSION_LIMIT_ERROR'); break;
case PREG_BAD_UTF8_ERROR: echo('PREG_BAD_UTF8_ERROR'); break;
- case PREG_BAD_UTF8_OFFSET_ERROR: echo('PREG_BAD_UTF8_OFFSET_ERROR'); break;
+// This is only valid for php > 5.3, not certain how to code around it for unit tests
+// case PREG_BAD_UTF8_OFFSET_ERROR: echo('PREG_BAD_UTF8_OFFSET_ERROR'); break;
default:
//die("Unknown preg error.");
return;
diff --git a/include/text.php b/include/text.php
index 5456b5ad3..aced9e0a8 100644
--- a/include/text.php
+++ b/include/text.php
@@ -80,6 +80,9 @@ function escape_tags($string) {
if(! function_exists('autoname')) {
function autoname($len) {
+ if($len <= 0)
+ return '';
+
$vowels = array('a','a','ai','au','e','e','e','ee','ea','i','ie','o','ou','u');
if(mt_rand(0,5) == 4)
$vowels[] = 'y';