Merge remote-tracking branch 'upstream/master'

Conflicts:
	view/theme/redbasic/css/style.css
This commit is contained in:
Thomas Willingham 2012-12-18 16:59:08 +00:00
commit d9194fdb5a
16 changed files with 70 additions and 3893 deletions

BIN
images/red.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View file

@ -209,7 +209,7 @@ class Item extends BaseObject {
'type' => implode("",array_slice(explode("/",$item['verb']),-1)),
'tags' => $tags,
'body' => template_escape($body),
'body' => $body,
'text' => strip_tags(template_escape($body)),
'id' => $this->get_id(),
'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])),

View file

@ -703,6 +703,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') {
'$mode' => $mode,
'$user' => $a->user,
'$threads' => $threads,
'$wait' => t('Loading...'),
'$dropping' => ($page_dropping?t('Delete Selected Items'):False),
));

View file

@ -9,8 +9,8 @@ function network_query($a,$arr) {
$ordering = (($arr['order'] === 'post') ? "`created`" : "`commented`") . " DESC ";
$itemspage = get_pconfig($arr['uid'],'system','itemspage_network');
$a->set_pager_itemspage(((intval($itemspage_network)) ? $itemspage_network : 40));
$itemspage = get_pconfig($arr['uid'],'system','itemspage');
$a->set_pager_itemspage(((intval($itemspage)) ? $itemspage : 40));
$pager_sql = ((intval($arr['update'])) ? '' : sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage'])));

View file

@ -46,7 +46,7 @@
foreach($keys as $k) {
$val = (isset($val[$k]) ? $val[$k] : null);
}
return $val;
return template_escape($val);
}
/**
@ -196,12 +196,49 @@
* (subgrup 1), match close bracket
*/
if (preg_match_all('/\$(\[)?([a-zA-Z0-9-_]+\.?)+(?(1)\])/', $s,$m)){
foreach($m[0] as $var){
$varn = str_replace(array("[","]"), array("",""), $var);
$val = $this->_get_var($varn, true);
if ($val!=KEY_NOT_EXISTS)
$s = str_replace($var, $val, $s);
foreach($m[0] as $var){
$exp = str_replace(array("[", "]"), array("", ""), $var);
$exptks = explode("|", $exp);
$varn = $exptks[0];
unset($exptks[0]);
$val = $this->_get_var($varn, true);
if ($val != KEY_NOT_EXISTS) {
/* run filters */
/*
* Filter are in form of:
* filtername:arg:arg:arg
*
* "filtername" is function name
* "arg"s are optional, var value is appended to the end
* if one "arg"==='x' , is replaced with var value
*
* examples:
* $item.body|htmlspecialchars // escape html chars
* $item.body|htmlspecialchars|strtoupper // escape html and uppercase result
* $item.created|date:%Y %M %j // format date (created is a timestamp)
* $item.body|str_replace:cat:dog // replace all "cat" with "dog"
* $item.body|str_replace:cat:dog:x:1 // replace one "cat" with "dog"
*/
foreach ($exptks as $filterstr) {
$filter = explode(":", $filterstr);
$filtername = $filter[0];
unset($filter[0]);
$valkey = array_search("x", $filter);
if ($valkey === false) {
$filter[] = $val;
} else {
$filter[$valkey] = $val;
}
if (function_exists($filtername)) {
$val = call_user_func_array($filtername, $filter);
}
}
$s = str_replace($var, $val, $s);
}
}
}

View file

@ -462,7 +462,7 @@ function updateConvItems(mode,data) {
}
if(page_load)
$("#profile-jot-text-loading").show();
$("#page-spinner").show();
$.get(update_url,function(data) {
var update_mode = ((page_load) ? 'replace' : 'update');
@ -472,7 +472,7 @@ function updateConvItems(mode,data) {
scroll_next = false;
in_progress = false;
updateConvItems(update_mode,data);
$("#profile-jot-text-loading").hide();
$("#page-spinner").hide();
});

View file

@ -74,6 +74,9 @@ function channel_content(&$a, $update = 0, $load = false) {
$tab = 'posts';
$o = '';
$is_owner = (((local_user()) && ($a->profile['profile_uid'] == local_user())) ? true : false);
if($update) {
// Ensure we've got a profile owner if updating.
$a->profile['profile_uid'] = $update;

View file

@ -561,8 +561,8 @@ function network_content(&$a, $update = 0, $load = false) {
}
else {
$itemspage_network = get_pconfig(local_user(),'system','itemspage_network');
$a->set_pager_itemspage(((intval($itemspage_network)) ? $itemspage_network : 40));
$itemspage = get_pconfig(local_user(),'system','itemspage');
$a->set_pager_itemspage(((intval($itemspage)) ? $itemspage : 40));
$pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage']));
}

View file

@ -187,9 +187,9 @@ function settings_post(&$a) {
if($browser_update < 10000)
$browser_update = 10000;
$itemspage_network = ((x($_POST,'itemspage_network')) ? intval($_POST['itemspage_network']) : 40);
if($itemspage_network > 100)
$itemspage_network = 100;
$itemspage = ((x($_POST,'itemspage')) ? intval($_POST['itemspage']) : 40);
if($itemspage > 100)
$itemspage = 100;
if($mobile_theme !== '') {
@ -197,7 +197,7 @@ function settings_post(&$a) {
}
set_pconfig(local_user(),'system','update_interval', $browser_update);
set_pconfig(local_user(),'system','itemspage_network', $itemspage_network);
set_pconfig(local_user(),'system','itemspage', $itemspage);
set_pconfig(local_user(),'system','no_smilies',$nosmile);
@ -745,8 +745,8 @@ function settings_content(&$a) {
$browser_update = intval(get_pconfig(local_user(), 'system','update_interval'));
$browser_update = (($browser_update == 0) ? 40 : $browser_update / 1000); // default if not set: 40 seconds
$itemspage_network = intval(get_pconfig(local_user(), 'system','itemspage_network'));
$itemspage_network = (($itemspage_network > 0 && $itemspage_network < 101) ? $itemspage_network : 40); // default if not set: 40 items
$itemspage = intval(get_pconfig(local_user(), 'system','itemspage'));
$itemspage = (($itemspage > 0 && $itemspage < 101) ? $itemspage : 40); // default if not set: 40 items
$nosmile = get_pconfig(local_user(),'system','no_smilies');
$nosmile = (($nosmile===false)? '0': $nosmile); // default if not set: 0
@ -769,7 +769,7 @@ function settings_content(&$a) {
'$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes, 'preview'),
'$mobile_theme' => array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, ''),
'$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds, no maximum')),
'$itemspage_network' => array('itemspage_network', t("Number of items to display on the network page:"), $itemspage_network, t('Maximum of 100 items')),
'$itemspage' => array('itemspage', t("Maximum number of conversations to load at any time:"), $itemspage, t('Maximum of 100 items')),
'$nosmile' => array('nosmile', t("Don't show emoticons"), $nosmile, ''),
'$theme_config' => $theme_config,

View file

@ -1 +1 @@
2012-12-15.170
2012-12-16.171

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
<div id="contact-block">
<h4 class="contact-block-h4">$contacts</h4>
<div id="contact-block-numcontacts">$contacts</div>
{{ if $micropro }}
<a class="allcontact-link" href="viewcontacts/$nickname">$viewcontacts</a>
<div class='contact-block-content'>

View file

@ -9,3 +9,6 @@
</div>
<div id="item-delete-selected-end"></div>
{{ endif }}
<img id="page-spinner" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />

View file

@ -12,7 +12,7 @@ $js_strings
$head_js
<link rel="shortcut icon" href="$baseurl/images/fred-32.png" />
<link rel="shortcut icon" href="$baseurl/images/red.png" />
<link rel="search"
href="$baseurl/opensearch"
type="application/opensearchdescription+xml"

View file

@ -48,7 +48,7 @@
</div>
<div id="vcard-end"></div>
$contact_block

View file

@ -6,7 +6,7 @@
{{inc field_themeselect.tpl with $field=$theme }}{{endinc}}
{{inc field_themeselect.tpl with $field=$mobile_theme }}{{endinc}}
{{inc field_input.tpl with $field=$ajaxint }}{{endinc}}
{{inc field_input.tpl with $field=$itemspage_network }}{{endinc}}
{{inc field_input.tpl with $field=$itemspage }}{{endinc}}
{{inc field_checkbox.tpl with $field=$nosmile}}{{endinc}}