Merge remote branch 'friendica/master' into moveme
This commit is contained in:
commit
c51e057fe6
233 changed files with 20207 additions and 9274 deletions
|
@ -448,7 +448,7 @@ function admin_page_site(&$a) {
|
|||
|
||||
'$baseurl' => $a->get_baseurl(true),
|
||||
// name, label, value, help string, extra data...
|
||||
'$sitename' => array('sitename', t("Site name"), htmlentities($a->config['sitename'], ENT_QUOTES), ""),
|
||||
'$sitename' => array('sitename', t("Site name"), htmlentities($a->config['sitename'], ENT_QUOTES), 'UTF-8'),
|
||||
'$banner' => array('banner', t("Banner/Logo"), $banner, ""),
|
||||
'$language' => array('language', t("System language"), get_config('system','language'), "", $lang_choices),
|
||||
'$theme' => array('theme', t("System theme"), get_config('system','theme'), t("Default system theme - may be over-ridden by user profiles - <a href='#' id='cnftheme'>change theme settings</a>"), $theme_choices),
|
||||
|
|
|
@ -32,8 +32,6 @@ function community_content(&$a, $update = 0) {
|
|||
$o .= '<h3>' . t('Community') . '</h3>';
|
||||
if(! $update) {
|
||||
nav_set_selected('community');
|
||||
$o .= '<div id="live-community"></div>' . "\r\n";
|
||||
$o .= "<script> var profile_uid = -1; var netargs = '/?f='; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
|
||||
}
|
||||
|
||||
if(x($a->data,'search'))
|
||||
|
|
|
@ -14,7 +14,7 @@ function display_content(&$a) {
|
|||
require_once('include/acl_selectors.php');
|
||||
|
||||
|
||||
$o = '<div id="live-display"></div>' . "\r\n";
|
||||
$o = '';
|
||||
|
||||
$a->page['htmlhead'] .= get_markup_template('display-head.tpl');
|
||||
|
||||
|
@ -78,7 +78,7 @@ function display_content(&$a) {
|
|||
return;
|
||||
}
|
||||
|
||||
if ($is_owner)
|
||||
if ($is_owner) {
|
||||
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
|
||||
|
||||
$x = array(
|
||||
|
@ -93,7 +93,7 @@ function display_content(&$a) {
|
|||
'profile_uid' => local_user()
|
||||
);
|
||||
$o .= status_editor($a,$x,0,true);
|
||||
|
||||
}
|
||||
|
||||
$sql_extra = item_permissions_sql($a->profile['uid'],$remote_contact,$groups);
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
<?php
|
||||
|
||||
require_once('mod/friendica.php');
|
||||
|
||||
function friendika_init(&$a) {
|
||||
friendica_init($a);
|
||||
}
|
||||
|
||||
function friendika_content(&$a) {
|
||||
return friendica_content($a);
|
||||
}
|
|
@ -447,7 +447,7 @@ function check_htaccess(&$checks) {
|
|||
|
||||
|
||||
function manual_config(&$a) {
|
||||
$data = htmlentities($a->data['txt']);
|
||||
$data = htmlentities($a->data['txt'],ENT_COMPAT,'UTF-8');
|
||||
$o = t('The database configuration file ".htconfig.php" could not be written. Please use the enclosed text to create a configuration file in your web server root.');
|
||||
$o .= "<textarea rows=\"24\" cols=\"80\" >$data</textarea>";
|
||||
return $o;
|
||||
|
|
|
@ -23,7 +23,7 @@ function localtime_content(&$a) {
|
|||
|
||||
$o .= '<h3>' . t('Time Conversion') . '</h3>';
|
||||
|
||||
$o .= '<p>' . t('Friendika provides this service for sharing events with other networks and friends in unknown timezones.') . '</p>';
|
||||
$o .= '<p>' . t('Friendica provides this service for sharing events with other networks and friends in unknown timezones.') . '</p>';
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -24,8 +24,13 @@ function lockview_content(&$a) {
|
|||
if(! count($r))
|
||||
killme();
|
||||
$item = $r[0];
|
||||
if($item['uid'] != local_user())
|
||||
|
||||
call_hooks('lockview_content', $item);
|
||||
|
||||
if($item['uid'] != local_user()) {
|
||||
echo t('Remote privacy information not available.') . '<br />';
|
||||
killme();
|
||||
}
|
||||
|
||||
|
||||
if(($item['private'] == 1) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid']))
|
||||
|
|
|
@ -75,7 +75,10 @@ function manage_post(&$a) {
|
|||
if($limited_id)
|
||||
$_SESSION['submanage'] = $original_id;
|
||||
|
||||
goaway($a->get_baseurl(true) . '/profile/' . $a->user['nickname']);
|
||||
$ret = array();
|
||||
call_hooks('home_init',$ret);
|
||||
|
||||
goaway( $a->get_baseurl() . "/profile/" . $a->user['nickname'] );
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
|
|
|
@ -584,31 +584,6 @@ function network_content(&$a, $update = 0) {
|
|||
$o .= get_events();
|
||||
}
|
||||
|
||||
if(! $update) {
|
||||
// The special div is needed for liveUpdate to kick in for this page.
|
||||
// We only launch liveUpdate if you aren't filtering in some incompatible
|
||||
// way and also you aren't writing a comment (discovered in javascript).
|
||||
|
||||
$o .= '<div id="live-network"></div>' . "\r\n";
|
||||
$o .= "<script> var profile_uid = " . $_SESSION['uid']
|
||||
. "; var netargs = '" . substr($a->cmd,8)
|
||||
. '?f='
|
||||
. ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '')
|
||||
. ((x($_GET,'search')) ? '&search=' . $_GET['search'] : '')
|
||||
. ((x($_GET,'star')) ? '&star=' . $_GET['star'] : '')
|
||||
. ((x($_GET,'order')) ? '&order=' . $_GET['order'] : '')
|
||||
. ((x($_GET,'bmark')) ? '&bmark=' . $_GET['bmark'] : '')
|
||||
. ((x($_GET,'liked')) ? '&liked=' . $_GET['liked'] : '')
|
||||
. ((x($_GET,'conv')) ? '&conv=' . $_GET['conv'] : '')
|
||||
. ((x($_GET,'spam')) ? '&spam=' . $_GET['spam'] : '')
|
||||
. ((x($_GET,'nets')) ? '&nets=' . $_GET['nets'] : '')
|
||||
. ((x($_GET,'cmin')) ? '&cmin=' . $_GET['cmin'] : '')
|
||||
. ((x($_GET,'cmax')) ? '&cmax=' . $_GET['cmax'] : '')
|
||||
. ((x($_GET,'file')) ? '&file=' . $_GET['file'] : '')
|
||||
|
||||
. "'; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
|
||||
}
|
||||
|
||||
$sql_extra3 = '';
|
||||
|
||||
if($datequery) {
|
||||
|
@ -792,15 +767,24 @@ function network_content(&$a, $update = 0) {
|
|||
// level which items you've seen and which you haven't. If you're looking
|
||||
// at the top level network page just mark everything seen.
|
||||
|
||||
/* if((! $group) && (! $cid) && (! $star)) {
|
||||
|
||||
// The $update_unseen is a bit unreliable if you have stuff coming into your stream from a new contact -
|
||||
// and other feeds that bring in stuff from the past. One can't find it all.
|
||||
// I'm reviving this block to mark everything seen on page 1 of the network as a temporary measure.
|
||||
// The correct solution is to implement a network notifications box just like the system notifications popup
|
||||
// with the ability in the popup to "mark all seen".
|
||||
// Several people are complaining because there are unseen messages they can't find and as time goes
|
||||
// on they just get buried deeper. It has happened to me a couple of times also.
|
||||
|
||||
if((! $group) && (! $cid) && (! $star)) {
|
||||
$r = q("UPDATE `item` SET `unseen` = 0
|
||||
WHERE `unseen` = 1 AND `uid` = %d",
|
||||
intval(local_user())
|
||||
);
|
||||
}*/
|
||||
}
|
||||
|
||||
if($update_unseen)
|
||||
$r = q("UPDATE `item` SET `unseen` = 0 $update_unseen");
|
||||
// if($update_unseen)
|
||||
// $r = q("UPDATE `item` SET `unseen` = 0 $update_unseen");
|
||||
|
||||
// Set this so that the conversation function can find out contact info for our wall-wall items
|
||||
$a->page_contact = $a->contact;
|
||||
|
|
|
@ -66,10 +66,6 @@ function notes_content(&$a,$update = false) {
|
|||
|
||||
$o .= status_editor($a,$x,$a->contact['id']);
|
||||
|
||||
$o .= '<div id="live-notes"></div>' . "\r\n";
|
||||
$o .= "<script> var profile_uid = " . local_user()
|
||||
. "; var netargs = '/?f='; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
|
||||
|
||||
}
|
||||
|
||||
// Construct permissions
|
||||
|
|
|
@ -69,6 +69,9 @@ function notifications_content(&$a) {
|
|||
|
||||
nav_set_selected('notifications');
|
||||
|
||||
$json = (($a->argc > 1 && $a->argv[$a->argc - 1] === 'json') ? true : false);
|
||||
|
||||
|
||||
$o = '';
|
||||
$tabs = array(
|
||||
array(
|
||||
|
@ -211,7 +214,7 @@ function notifications_content(&$a) {
|
|||
}
|
||||
else
|
||||
info( t('No introductions.') . EOL);
|
||||
|
||||
|
||||
$o .= replace_macros($notif_tpl,array(
|
||||
'$notif_header' => t('Notifications'),
|
||||
'$tabs' => $tabs,
|
||||
|
@ -229,7 +232,7 @@ function notifications_content(&$a) {
|
|||
`item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object` as `object`,
|
||||
`pitem`.`author-name` as `pname`, `pitem`.`author-link` as `plink`
|
||||
FROM `item` INNER JOIN `item` as `pitem` ON `pitem`.`id`=`item`.`parent`
|
||||
WHERE `item`.`unseen` = 1 AND `item`.`visible` = 1 AND
|
||||
WHERE `item`.`unseen` = 1 AND `item`.`visible` = 1 AND `pitem`.`parent` != 0
|
||||
`item`.`deleted` = 0 AND `item`.`uid` = %d AND `item`.`wall` = 0 ORDER BY `item`.`created` DESC" ,
|
||||
intval(local_user())
|
||||
);
|
||||
|
|
|
@ -4,14 +4,18 @@ require_once('include/items.php');
|
|||
require_once('include/acl_selectors.php');
|
||||
require_once('include/bbcode.php');
|
||||
require_once('include/security.php');
|
||||
require_once('include/redir.php');
|
||||
|
||||
|
||||
function photos_init(&$a) {
|
||||
|
||||
if($a->argc > 1)
|
||||
auto_redir($a, $a->argv[1]);
|
||||
|
||||
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
|
||||
return;
|
||||
}
|
||||
|
||||
$o = '';
|
||||
|
||||
if($a->argc > 1) {
|
||||
|
@ -1443,6 +1447,7 @@ function photos_content(&$a) {
|
|||
'$myphoto' => $contact['thumb'],
|
||||
'$comment' => t('Comment'),
|
||||
'$submit' => t('Submit'),
|
||||
'$preview' => t('Preview'),
|
||||
'$sourceapp' => t($a->sourcename),
|
||||
'$ww' => ''
|
||||
));
|
||||
|
@ -1460,27 +1465,6 @@ function photos_content(&$a) {
|
|||
|
||||
$redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ;
|
||||
|
||||
if($can_post || can_write_wall($a,$owner_uid)) {
|
||||
|
||||
if($item['last-child']) {
|
||||
$comments .= replace_macros($cmnt_tpl,array(
|
||||
'$return_path' => '',
|
||||
'$jsreload' => $return_url,
|
||||
'$type' => 'wall-comment',
|
||||
'$id' => $item['item_id'],
|
||||
'$parent' => $item['parent'],
|
||||
'$profile_uid' => $owner_uid,
|
||||
'$mylink' => $contact['url'],
|
||||
'$mytitle' => t('This is you'),
|
||||
'$myphoto' => $contact['thumb'],
|
||||
'$comment' => t('Comment'),
|
||||
'$submit' => t('Submit'),
|
||||
'$sourceapp' => t($a->sourcename),
|
||||
'$ww' => ''
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(local_user() && ($item['contact-uid'] == local_user())
|
||||
&& ($item['network'] == 'dfrn') && (! $item['self'] )) {
|
||||
|
@ -1518,6 +1502,28 @@ function photos_content(&$a) {
|
|||
'$drop' => $drop,
|
||||
'$comment' => $comment
|
||||
));
|
||||
|
||||
if($can_post || can_write_wall($a,$owner_uid)) {
|
||||
|
||||
if($item['last-child']) {
|
||||
$comments .= replace_macros($cmnt_tpl,array(
|
||||
'$return_path' => '',
|
||||
'$jsreload' => $return_url,
|
||||
'$type' => 'wall-comment',
|
||||
'$id' => $item['item_id'],
|
||||
'$parent' => $item['parent'],
|
||||
'$profile_uid' => $owner_uid,
|
||||
'$mylink' => $contact['url'],
|
||||
'$mytitle' => t('This is you'),
|
||||
'$myphoto' => $contact['thumb'],
|
||||
'$comment' => t('Comment'),
|
||||
'$submit' => t('Submit'),
|
||||
'$preview' => t('Preview'),
|
||||
'$sourceapp' => t($a->sourcename),
|
||||
'$ww' => ''
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,8 +63,8 @@ function ping_init(&$a) {
|
|||
`item`.`contact-id`, `item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object`,
|
||||
`pitem`.`author-name` as `pname`, `pitem`.`author-link` as `plink`
|
||||
FROM `item` INNER JOIN `item` as `pitem` ON `pitem`.`id`=`item`.`parent`
|
||||
WHERE `item`.`unseen` = 1 AND `item`.`visible` = 1 AND
|
||||
`item`.`deleted` = 0 AND `item`.`uid` = %d
|
||||
WHERE `item`.`unseen` = 1 AND `item`.`visible` = 1 AND
|
||||
`item`.`deleted` = 0 AND `item`.`uid` = %d AND `pitem`.`parent` != 0
|
||||
ORDER BY `item`.`created` DESC",
|
||||
intval(local_user())
|
||||
);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
require_once('include/contact_widgets.php');
|
||||
require_once('include/redir.php');
|
||||
|
||||
|
||||
function profile_init(&$a) {
|
||||
|
@ -8,8 +9,6 @@ function profile_init(&$a) {
|
|||
if(! x($a->page,'aside'))
|
||||
$a->page['aside'] = '';
|
||||
|
||||
$blocked = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false);
|
||||
|
||||
if($a->argc > 1)
|
||||
$which = $a->argv[1];
|
||||
else {
|
||||
|
@ -30,9 +29,13 @@ function profile_init(&$a) {
|
|||
$which = $a->user['nickname'];
|
||||
$profile = $a->argv[1];
|
||||
}
|
||||
else {
|
||||
auto_redir($a, $which);
|
||||
}
|
||||
|
||||
profile_load($a,$which,$profile);
|
||||
|
||||
$blocked = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false);
|
||||
$userblock = (($a->profile['hidewall'] && (! local_user()) && (! remote_user())) ? true : false);
|
||||
|
||||
if((x($a->profile,'page-flags')) && ($a->profile['page-flags'] == PAGE_COMMUNITY)) {
|
||||
|
@ -309,16 +312,6 @@ function profile_content(&$a, $update = 0) {
|
|||
$o .= get_events();
|
||||
}
|
||||
|
||||
if((! $update) && ($tab === 'posts')) {
|
||||
|
||||
// This is ugly, but we can't pass the profile_uid through the session to the ajax updater,
|
||||
// because browser prefetching might change it on us. We have to deliver it with the page.
|
||||
|
||||
$o .= '<div id="live-profile"></div>' . "\r\n";
|
||||
$o .= "<script> var profile_uid = " . $a->profile['profile_uid']
|
||||
. "; var netargs = '?f='; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
|
||||
}
|
||||
|
||||
|
||||
if($is_owner) {
|
||||
$r = q("UPDATE `item` SET `unseen` = 0
|
||||
|
|
|
@ -7,8 +7,8 @@ function rsd_xml_content(&$a) {
|
|||
echo '<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
|
||||
<service>
|
||||
<engineName>Friendika</engineName>
|
||||
<engineLink>http://friendika.com/</engineLink>
|
||||
<engineName>Friendica</engineName>
|
||||
<engineLink>http://friendica.com/</engineLink>
|
||||
<apis>
|
||||
<api name="Twitter" preferred="true" apiLink="'.$a->get_baseurl().'/api/" blogID="">
|
||||
<settings>
|
||||
|
|
|
@ -9,13 +9,26 @@ function search_saved_searches() {
|
|||
);
|
||||
|
||||
if(count($r)) {
|
||||
$o .= '<div id="saved-search-list" class="widget">';
|
||||
$o .= '<h3>' . t('Saved Searches') . '</h3>' . "\r\n";
|
||||
$o .= '<ul id="saved-search-ul">' . "\r\n";
|
||||
$saved = array();
|
||||
foreach($r as $rr) {
|
||||
$o .= '<li class="saved-search-li clear"><a href="search/?f=&remove=1&search=' . $rr['term'] . '" class="icon drophide savedsearchdrop" title="' . t('Remove term') . '" onclick="return confirmDelete();" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a> <a href="search/?f=&search=' . $rr['term'] . '" class="savedsearchterm" >' . $rr['term'] . '</a></li>' . "\r\n";
|
||||
$saved[] = array(
|
||||
'id' => $rr['id'],
|
||||
'term' => $rr['term'],
|
||||
'encodedterm' => urlencode($rr['term']),
|
||||
'delete' => t('Remove term'),
|
||||
'selected' => ($search==$rr['term']),
|
||||
);
|
||||
}
|
||||
$o .= '</ul><div class="clear"></div></div>' . "\r\n";
|
||||
|
||||
|
||||
$tpl = get_markup_template("saved_searches_aside.tpl");
|
||||
|
||||
$o .= replace_macros($tpl, array(
|
||||
'$title' => t('Saved Searches'),
|
||||
'$add' => '',
|
||||
'$searchbox' => '',
|
||||
'$saved' => $saved,
|
||||
));
|
||||
}
|
||||
|
||||
return $o;
|
||||
|
@ -80,9 +93,7 @@ function search_content(&$a) {
|
|||
require_once('include/security.php');
|
||||
require_once('include/conversation.php');
|
||||
|
||||
$o = '<div id="live-search"></div>' . "\r\n";
|
||||
|
||||
$o .= '<h3>' . t('Search') . '</h3>';
|
||||
$o = '<h3>' . t('Search') . '</h3>';
|
||||
|
||||
if(x($a->data,'search'))
|
||||
$search = notags(trim($a->data['search']));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue