Merge branch 'master' of git://github.com/friendika/friendika
This commit is contained in:
commit
3208d6afcb
10 changed files with 63 additions and 17 deletions
13
LICENSE
13
LICENSE
|
@ -23,3 +23,16 @@
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* 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
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* 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.
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,3 @@ plugin.
|
||||||
Addons/plugins may be licensed under copyleft or other license terms. Although
|
Addons/plugins may be licensed under copyleft or other license terms. Although
|
||||||
these projects may require Friendika to operate, no addon or plugin may
|
these projects may require Friendika to operate, no addon or plugin may
|
||||||
mandate any changes to the Friendika project license.
|
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.
|
|
||||||
|
|
||||||
|
|
|
@ -499,7 +499,9 @@ function get_atom_elements($feed,$item) {
|
||||||
$res['target'] .= '</target>' . "\n";
|
$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;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,18 +99,18 @@ function dfrn_poll_init(&$a) {
|
||||||
dbesc($sec)
|
dbesc($sec)
|
||||||
);
|
);
|
||||||
if(! count($r)) {
|
if(! count($r)) {
|
||||||
xml_status(3);
|
xml_status(3, 'No ticket');
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
}
|
}
|
||||||
$orig_id = $r[0]['dfrn_id'];
|
$orig_id = $r[0]['dfrn_id'];
|
||||||
if(strpos(':',$orig_id))
|
if(strpos($orig_id, ':'))
|
||||||
$orig_id = substr($orig_id,2);
|
$orig_id = substr($orig_id,2);
|
||||||
|
|
||||||
$c = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1",
|
$c = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1",
|
||||||
intval($r[0]['cid'])
|
intval($r[0]['cid'])
|
||||||
);
|
);
|
||||||
if(! count($c)) {
|
if(! count($c)) {
|
||||||
xml_status(3);
|
xml_status(3, 'No profile');
|
||||||
}
|
}
|
||||||
$contact = $c[0];
|
$contact = $c[0];
|
||||||
|
|
||||||
|
@ -134,9 +134,9 @@ function dfrn_poll_init(&$a) {
|
||||||
$final_dfrn_id = substr($final_dfrn_id,2);
|
$final_dfrn_id = substr($final_dfrn_id,2);
|
||||||
|
|
||||||
if($final_dfrn_id != $orig_id) {
|
if($final_dfrn_id != $orig_id) {
|
||||||
|
logger('profile_check: ' . $final_dfrn_id . ' != ' . $orig_id, LOGGER_DEBUG);
|
||||||
// did not decode properly - cannot trust this site
|
// did not decode properly - cannot trust this site
|
||||||
xml_status(3);
|
xml_status(3, 'Bad decryption');
|
||||||
}
|
}
|
||||||
|
|
||||||
header("Content-type: text/xml");
|
header("Content-type: text/xml");
|
||||||
|
|
|
@ -83,7 +83,7 @@ function directory_content(&$a) {
|
||||||
if(strlen($rr['gender']))
|
if(strlen($rr['gender']))
|
||||||
$details .= '<br />Gender: ' . $rr['gender'];
|
$details .= '<br />Gender: ' . $rr['gender'];
|
||||||
|
|
||||||
$o .= replace_macros($tpl,array(
|
$entry = replace_macros($tpl,array(
|
||||||
'$id' => $rr['id'],
|
'$id' => $rr['id'],
|
||||||
'$profile-link' => $profile_link,
|
'$profile-link' => $profile_link,
|
||||||
'$photo' => $rr[$photo],
|
'$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 .= "<div class=\"directory-end\" ></div>\r\n";
|
||||||
$o .= paginate($a);
|
$o .= paginate($a);
|
||||||
|
|
||||||
|
|
|
@ -241,7 +241,7 @@ function display_content(&$a) {
|
||||||
$indent .= ' shiny';
|
$indent .= ' shiny';
|
||||||
|
|
||||||
|
|
||||||
$o .= replace_macros($template,array(
|
$tmp_item = replace_macros($template,array(
|
||||||
'$id' => $item['item_id'],
|
'$id' => $item['item_id'],
|
||||||
'$profile_url' => $profile_link,
|
'$profile_url' => $profile_link,
|
||||||
'$name' => $profile_name,
|
'$name' => $profile_name,
|
||||||
|
@ -264,6 +264,12 @@ function display_content(&$a) {
|
||||||
'$comment' => $comment
|
'$comment' => $comment
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$arr = array('item' => $item, 'output' => $tmp_item);
|
||||||
|
call_hooks('display_item', $arr);
|
||||||
|
|
||||||
|
$o .= $arr['output'];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -284,7 +284,7 @@ function network_content(&$a, $update = 0) {
|
||||||
|
|
||||||
// Build the HTML
|
// Build the HTML
|
||||||
|
|
||||||
$o .= replace_macros($template,array(
|
$tmp_item = replace_macros($template,array(
|
||||||
'$id' => $item['item_id'],
|
'$id' => $item['item_id'],
|
||||||
'$profile_url' => $profile_link,
|
'$profile_url' => $profile_link,
|
||||||
'$name' => $profile_name,
|
'$name' => $profile_name,
|
||||||
|
@ -306,6 +306,12 @@ function network_content(&$a, $update = 0) {
|
||||||
'$dislike' => $dislike,
|
'$dislike' => $dislike,
|
||||||
'$comment' => $comment
|
'$comment' => $comment
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$arr = array('item' => $item, 'output' => $tmp_item);
|
||||||
|
call_hooks('display_item', $arr);
|
||||||
|
|
||||||
|
$o .= $arr['output'];
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,16 @@ function parse_url_content(&$a) {
|
||||||
|
|
||||||
$template = "<a href=\"%s\" >%s</a>%s";
|
$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)
|
if($url)
|
||||||
$s = fetch_url($url);
|
$s = fetch_url($url);
|
||||||
else {
|
else {
|
||||||
|
@ -18,6 +28,7 @@ function parse_url_content(&$a) {
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(! $s) {
|
if(! $s) {
|
||||||
echo sprintf($template,$url,$url,'');
|
echo sprintf($template,$url,$url,'');
|
||||||
killme();
|
killme();
|
||||||
|
|
|
@ -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)
|
if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
|
||||||
$indent .= ' shiny';
|
$indent .= ' shiny';
|
||||||
|
|
||||||
$o .= replace_macros($template,array(
|
$tmp_item = replace_macros($template,array(
|
||||||
'$id' => $item['item_id'],
|
'$id' => $item['item_id'],
|
||||||
'$profile_url' => $profile_link,
|
'$profile_url' => $profile_link,
|
||||||
'$name' => $profile_name,
|
'$name' => $profile_name,
|
||||||
|
@ -360,6 +360,11 @@ function profile_content(&$a, $update = 0) {
|
||||||
'$dislike' => $dislike,
|
'$dislike' => $dislike,
|
||||||
'$comment' => $comment
|
'$comment' => $comment
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$arr = array('item' => $item, 'output' => $tmp_item);
|
||||||
|
call_hooks('display_item', $arr);
|
||||||
|
|
||||||
|
$o .= $arr['output'];
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ function redir_init(&$a) {
|
||||||
goaway($a->get_baseurl());
|
goaway($a->get_baseurl());
|
||||||
$cid = $a->argv[1];
|
$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($cid),
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
);
|
);
|
||||||
|
@ -36,8 +36,9 @@ function redir_init(&$a) {
|
||||||
intval(time() + 45)
|
intval(time() + 45)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
logger('mod_redir: ' . $r[0]['name'] . ' ' . $sec, LOGGER_DEBUG);
|
||||||
|
|
||||||
goaway ($r[0]['poll'] . '?dfrn_id=' . $dfrn_id
|
goaway ($r[0]['poll'] . '?dfrn_id=' . $dfrn_id
|
||||||
// . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&type=profile');
|
|
||||||
. '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&type=profile&sec=' . $sec);
|
. '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&type=profile&sec=' . $sec);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue