diff options
author | zottel <github@zottel.net> | 2012-05-09 09:27:23 +0200 |
---|---|---|
committer | zottel <github@zottel.net> | 2012-05-09 09:27:23 +0200 |
commit | d92be9d93cc6a9b90572cd46e982e24f57c43ffc (patch) | |
tree | e74e7d4d0baf59d7922696717604d2447f391597 /include | |
parent | 78429926bcf1ab7e8a4d35d0093ba666b3568708 (diff) | |
parent | 70a07086ad186e3f0cd978dd3f52e78fb92494cf (diff) | |
download | volse-hubzilla-d92be9d93cc6a9b90572cd46e982e24f57c43ffc.tar.gz volse-hubzilla-d92be9d93cc6a9b90572cd46e982e24f57c43ffc.tar.bz2 volse-hubzilla-d92be9d93cc6a9b90572cd46e982e24f57c43ffc.zip |
Merge remote branch 'upstream/master'
Diffstat (limited to 'include')
-rw-r--r-- | include/contact_widgets.php | 3 | ||||
-rw-r--r-- | include/expire.php | 6 | ||||
-rw-r--r-- | include/text.php | 6 |
3 files changed, 13 insertions, 2 deletions
diff --git a/include/contact_widgets.php b/include/contact_widgets.php index 42d3afdee..ce1cdbad5 100644 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -183,7 +183,8 @@ function common_friends_visitor_widget($profile_uid) { '$desc' => sprintf( tt("%d contact in common", "%d contacts in common", $t), $t), '$base' => $a->get_baseurl(), '$uid' => $profile_uid, - '$cid' => $cid, + '$cid' => (($cid) ? $cid : '0'), + '$linkmore' => (($t > 5) ? 'true' : ''), '$more' => t('show more'), '$items' => $r )); diff --git a/include/expire.php b/include/expire.php index 5fa0ec758..755cd2494 100644 --- a/include/expire.php +++ b/include/expire.php @@ -32,7 +32,11 @@ function expire_run($argv, $argc){ // physically remove anything that has been deleted for more than two months $r = q("delete from item where deleted = 1 and changed < UTC_TIMESTAMP() - INTERVAL 60 DAY"); - q("optimize table item"); + + // make this optional as it could have a performance impact on large sites + + if(intval(get_config('system','optimize_items'))) + q("optimize table item"); logger('expire: start'); diff --git a/include/text.php b/include/text.php index 1b5b0afd4..e3c683338 100644 --- a/include/text.php +++ b/include/text.php @@ -1524,3 +1524,9 @@ function fix_mce_lf($s) { $s = str_replace("\n\n","\n",$s); return $s; } + + +function protect_sprintf($s) { + return(str_replace('%','%%',$s)); +} + |