Merge branch 'master' of git://github.com/friendika/friendika
This commit is contained in:
commit
3208d6afcb
13
LICENSE
13
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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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'];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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,
|
||||
|
@ -361,6 +361,11 @@ function profile_content(&$a, $update = 0) {
|
|||
'$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());
|
||||
$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);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user