Merge branch 'master' into tres
Conflicts: include/Contact.php include/ItemObject.php include/api.php include/attach.php include/diaspora.php include/dir_fns.php include/enotify.php include/event.php include/expire.php include/items.php include/notifier.php include/notify.php include/photos.php include/taxonomy.php include/text.php include/widgets.php include/zot.php mod/admin.php mod/channel.php mod/dirsearch.php mod/display.php mod/editwebpage.php mod/events.php mod/home.php mod/item.php mod/manage.php mod/mood.php mod/network.php mod/page.php mod/photos.php mod/ping.php mod/post.php mod/thing.php mod/viewsrc.php view/css/mod_events.css
This commit is contained in:
@@ -233,7 +233,6 @@ function widget_savedsearch($arr) {
|
||||
$srchurl = rtrim(preg_replace('/searchsave\=[^\&].*?(\&|$)/is','',$srchurl),'&');
|
||||
$hasq = ((strpos($srchurl,'?') !== false) ? true : false);
|
||||
$srchurl = rtrim(preg_replace('/searchremove\=[^\&].*?(\&|$)/is','',$srchurl),'&');
|
||||
$hasq = ((strpos($srchurl,'?') !== false) ? true : false);
|
||||
|
||||
$srchurl = rtrim(preg_replace('/search\=[^\&].*?(\&|$)/is','',$srchurl),'&');
|
||||
$srchurl = rtrim(preg_replace('/submit\=[^\&].*?(\&|$)/is','',$srchurl),'&');
|
||||
@@ -241,7 +240,10 @@ function widget_savedsearch($arr) {
|
||||
|
||||
|
||||
$hasq = ((strpos($srchurl,'?') !== false) ? true : false);
|
||||
$hasamp = ((strpos($srchurl,'&') !== false) ? true : false);
|
||||
|
||||
if(($hasamp) && (! $hasq))
|
||||
$srchurl = substr($srchurl,0,strpos($srchurl,'&')) . '?f=&' . substr($srchurl,strpos($srchurl,'&')+1);
|
||||
|
||||
$o = '';
|
||||
|
||||
@@ -257,8 +259,8 @@ function widget_savedsearch($arr) {
|
||||
$saved[] = array(
|
||||
'id' => $rr['tid'],
|
||||
'term' => $rr['term'],
|
||||
'dellink' => z_root() . '/' . $srchurl . (($hasq) ? '' : '?f=') . '&searchremove=1&search=' . urlencode($rr['term']),
|
||||
'srchlink' => z_root() . '/' . $srchurl . (($hasq) ? '' : '?f=') . '&search=' . urlencode($rr['term']),
|
||||
'dellink' => z_root() . '/' . $srchurl . (($hasq || $hasamp) ? '' : '?f=') . '&searchremove=1&search=' . urlencode($rr['term']),
|
||||
'srchlink' => z_root() . '/' . $srchurl . (($hasq || $hasamp) ? '' : '?f=') . '&search=' . urlencode($rr['term']),
|
||||
'displayterm' => htmlspecialchars($rr['term'], ENT_COMPAT,'UTF-8'),
|
||||
'encodedterm' => urlencode($rr['term']),
|
||||
'delete' => t('Remove term'),
|
||||
@@ -418,18 +420,35 @@ function widget_affinity($arr) {
|
||||
$cmin = ((x($_REQUEST,'cmin')) ? intval($_REQUEST['cmin']) : 0);
|
||||
$cmax = ((x($_REQUEST,'cmax')) ? intval($_REQUEST['cmax']) : 99);
|
||||
|
||||
|
||||
if(feature_enabled(local_channel(),'affinity')) {
|
||||
|
||||
$labels = array(
|
||||
t('Me'),
|
||||
t('Family'),
|
||||
t('Friends'),
|
||||
t('Acquaintances'),
|
||||
t('All')
|
||||
);
|
||||
call_hooks('affinity_labels',$labels);
|
||||
$label_str = '';
|
||||
|
||||
if($labels) {
|
||||
foreach($labels as $l) {
|
||||
if($label_str) {
|
||||
$label_str .= ", '|'";
|
||||
$label_str .= ", '" . $l . "'";
|
||||
}
|
||||
else
|
||||
$label_str .= "'" . $l . "'";
|
||||
}
|
||||
}
|
||||
|
||||
$tpl = get_markup_template('main_slider.tpl');
|
||||
$x = replace_macros($tpl,array(
|
||||
'$val' => $cmin . ',' . $cmax,
|
||||
'$refresh' => t('Refresh'),
|
||||
'$me' => t('Me'),
|
||||
'$intimate' => t('Best Friends'),
|
||||
'$friends' => t('Friends'),
|
||||
'$coworkers' => t('Co-workers'),
|
||||
'$oldfriends' => t('Former Friends'),
|
||||
'$acquaintances' => t('Acquaintances'),
|
||||
'$world' => t('Everybody')
|
||||
'$labels' => $label_str,
|
||||
));
|
||||
$arr = array('html' => $x);
|
||||
call_hooks('main_slider',$arr);
|
||||
@@ -605,9 +624,6 @@ function widget_vcard($arr) {
|
||||
* The following directory widgets are only useful on the directory page
|
||||
*/
|
||||
|
||||
function widget_dirsafemode($arr) {
|
||||
return dir_safe_mode();
|
||||
}
|
||||
|
||||
function widget_dirsort($arr) {
|
||||
return dir_sort_links();
|
||||
@@ -963,3 +979,12 @@ function widget_rating($arr) {
|
||||
return $o;
|
||||
|
||||
}
|
||||
|
||||
// used by site ratings pages to provide a return link
|
||||
function widget_pubsites() {
|
||||
if(get_app()->poi)
|
||||
return;
|
||||
return '<div class="widget"><ul class="nav nav-pills"><li><a href="pubsites">' . t('Public Hubs') . '</a></li></ul></div>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user