aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@diekershoff.homeunix.net>2010-12-26 08:18:10 +0100
committerroot <root@diekershoff.homeunix.net>2010-12-26 08:18:10 +0100
commit3208d6afcbcf6e74ca5d0ac30be1559327e00bf9 (patch)
treec940d0870729dbeb70845a96f36a6a15926dd9f2
parentc6a93d5cec05e9282b2f2d26fdfbc93175ed2b06 (diff)
parent10dda88684331366b10967981e661acf5b229ac6 (diff)
downloadvolse-hubzilla-3208d6afcbcf6e74ca5d0ac30be1559327e00bf9.tar.gz
volse-hubzilla-3208d6afcbcf6e74ca5d0ac30be1559327e00bf9.tar.bz2
volse-hubzilla-3208d6afcbcf6e74ca5d0ac30be1559327e00bf9.zip
Merge branch 'master' of git://github.com/friendika/friendika
-rw-r--r--LICENSE13
-rw-r--r--addon/LICENSE5
-rw-r--r--include/items.php4
-rw-r--r--mod/dfrn_poll.php10
-rw-r--r--mod/directory.php9
-rw-r--r--mod/display.php8
-rw-r--r--mod/network.php8
-rw-r--r--mod/parse_url.php11
-rw-r--r--mod/profile.php7
-rw-r--r--mod/redir.php5
10 files changed, 63 insertions, 17 deletions
diff --git a/LICENSE b/LICENSE
index 38b32db22..01fe880bd 100644
--- a/LICENSE
+++ b/LICENSE
@@ -23,3 +23,16 @@
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Friendika incorporates other software which may be licensed under different
+terms and conditions. Some system libraries which are supplied with and
+incorporated into Friendika were provided by their respective authors under
+the LGPL (Lesser GNU Public License) and may result in legal encumberance if
+you make any code changes to these libraries.
+
+Addon or "plugin" modules (within the 'addon' directory) are licensed under
+terms provided by the respective software author or authors of those works,
+and MAY include copyleft licenses such as GPLv3, AGPL, and/or commercial
+licenses. For the purposes of licensing, addon modules are considered separate
+standalone works.
+
diff --git a/addon/LICENSE b/addon/LICENSE
index 7dd931e30..2e6e056e8 100644
--- a/addon/LICENSE
+++ b/addon/LICENSE
@@ -10,8 +10,3 @@ plugin.
Addons/plugins may be licensed under copyleft or other license terms. Although
these projects may require Friendika to operate, no addon or plugin may
mandate any changes to the Friendika project license.
-
-If no license terms are set on an addon/plugin project, the Friendika BSD
-project license will apply to the work, but with the project author as the
-license owner and copyright holder.
-
diff --git a/include/items.php b/include/items.php
index c00ec93ae..22d47d44f 100644
--- a/include/items.php
+++ b/include/items.php
@@ -499,7 +499,9 @@ function get_atom_elements($feed,$item) {
$res['target'] .= '</target>' . "\n";
}
-// call_hooks('parse_atom', array('feed' => $feed, 'item' => $item, 'result' => $res));
+ $arr = array('feed' => $feed, 'item' => $item, 'result' => $res);
+
+ call_hooks('parse_atom', $arr);
return $res;
}
diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php
index 22d2ee40f..52272efad 100644
--- a/mod/dfrn_poll.php
+++ b/mod/dfrn_poll.php
@@ -99,18 +99,18 @@ function dfrn_poll_init(&$a) {
dbesc($sec)
);
if(! count($r)) {
- xml_status(3);
+ xml_status(3, 'No ticket');
// NOTREACHED
}
$orig_id = $r[0]['dfrn_id'];
- if(strpos(':',$orig_id))
+ if(strpos($orig_id, ':'))
$orig_id = substr($orig_id,2);
$c = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1",
intval($r[0]['cid'])
);
if(! count($c)) {
- xml_status(3);
+ xml_status(3, 'No profile');
}
$contact = $c[0];
@@ -134,9 +134,9 @@ function dfrn_poll_init(&$a) {
$final_dfrn_id = substr($final_dfrn_id,2);
if($final_dfrn_id != $orig_id) {
-
+ logger('profile_check: ' . $final_dfrn_id . ' != ' . $orig_id, LOGGER_DEBUG);
// did not decode properly - cannot trust this site
- xml_status(3);
+ xml_status(3, 'Bad decryption');
}
header("Content-type: text/xml");
diff --git a/mod/directory.php b/mod/directory.php
index 49aac657c..062aae516 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -83,7 +83,7 @@ function directory_content(&$a) {
if(strlen($rr['gender']))
$details .= '<br />Gender: ' . $rr['gender'];
- $o .= replace_macros($tpl,array(
+ $entry = replace_macros($tpl,array(
'$id' => $rr['id'],
'$profile-link' => $profile_link,
'$photo' => $rr[$photo],
@@ -94,7 +94,14 @@ function directory_content(&$a) {
));
+ $arr = array('contact' => $rr, 'entry' => $entry);
+
+ call_hooks('directory_item', $arr);
+
+ $o .= $entry;
+
}
+
$o .= "<div class=\"directory-end\" ></div>\r\n";
$o .= paginate($a);
diff --git a/mod/display.php b/mod/display.php
index 990d0b431..fd845e608 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -241,7 +241,7 @@ function display_content(&$a) {
$indent .= ' shiny';
- $o .= replace_macros($template,array(
+ $tmp_item = replace_macros($template,array(
'$id' => $item['item_id'],
'$profile_url' => $profile_link,
'$name' => $profile_name,
@@ -264,6 +264,12 @@ function display_content(&$a) {
'$comment' => $comment
));
+ $arr = array('item' => $item, 'output' => $tmp_item);
+ call_hooks('display_item', $arr);
+
+ $o .= $arr['output'];
+
+
}
}
else {
diff --git a/mod/network.php b/mod/network.php
index 43c55b8e3..ad6db2d1e 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -284,7 +284,7 @@ function network_content(&$a, $update = 0) {
// Build the HTML
- $o .= replace_macros($template,array(
+ $tmp_item = replace_macros($template,array(
'$id' => $item['item_id'],
'$profile_url' => $profile_link,
'$name' => $profile_name,
@@ -306,6 +306,12 @@ function network_content(&$a, $update = 0) {
'$dislike' => $dislike,
'$comment' => $comment
));
+
+ $arr = array('item' => $item, 'output' => $tmp_item);
+ call_hooks('display_item', $arr);
+
+ $o .= $arr['output'];
+
}
}
diff --git a/mod/parse_url.php b/mod/parse_url.php
index 1561eb8a3..b3b42b6cb 100644
--- a/mod/parse_url.php
+++ b/mod/parse_url.php
@@ -11,6 +11,16 @@ function parse_url_content(&$a) {
$template = "<a href=\"%s\" >%s</a>%s";
+
+ $arr = array('url' => $url, 'text' => '');
+
+ call_hooks('parse_link', $arr);
+
+ if(strlen($arr['text'])) {
+ echo $arr['text'];
+ killme();
+ }
+
if($url)
$s = fetch_url($url);
else {
@@ -18,6 +28,7 @@ function parse_url_content(&$a) {
killme();
}
+
if(! $s) {
echo sprintf($template,$url,$url,'');
killme();
diff --git a/mod/profile.php b/mod/profile.php
index ffc412805..cc0debd99 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -342,7 +342,7 @@ function profile_content(&$a, $update = 0) {
if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
$indent .= ' shiny';
- $o .= replace_macros($template,array(
+ $tmp_item = replace_macros($template,array(
'$id' => $item['item_id'],
'$profile_url' => $profile_link,
'$name' => $profile_name,
@@ -360,6 +360,11 @@ function profile_content(&$a, $update = 0) {
'$dislike' => $dislike,
'$comment' => $comment
));
+
+ $arr = array('item' => $item, 'output' => $tmp_item);
+ call_hooks('display_item', $arr);
+
+ $o .= $arr['output'];
}
}
diff --git a/mod/redir.php b/mod/redir.php
index cc58b9cd1..ac21aa17e 100644
--- a/mod/redir.php
+++ b/mod/redir.php
@@ -6,7 +6,7 @@ function redir_init(&$a) {
goaway($a->get_baseurl());
$cid = $a->argv[1];
- $r = q("SELECT `network`, `issued-id`, `dfrn-id`, `duplex`, `poll` FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
+ $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval($cid),
intval(local_user())
);
@@ -36,8 +36,9 @@ function redir_init(&$a) {
intval(time() + 45)
);
+ logger('mod_redir: ' . $r[0]['name'] . ' ' . $sec, LOGGER_DEBUG);
+
goaway ($r[0]['poll'] . '?dfrn_id=' . $dfrn_id
-// . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&type=profile');
. '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&type=profile&sec=' . $sec);
}