aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFabio Comuni <fabio@krik.localdomain>2012-01-02 15:32:37 +0100
committerFabio Comuni <fabio@krik.localdomain>2012-01-02 15:32:37 +0100
commitbe2fd56aae51ee02b6e40dedd4383e1ebddc752e (patch)
tree1795fb34e182f51b6adc4f05204cea45da4bca69 /include
parent4b095665791424bd2f5c4c494a2d14ec6c07aeba (diff)
parent0dce36bdbce7482329105e2c1ef4f3c8b3043803 (diff)
downloadvolse-hubzilla-be2fd56aae51ee02b6e40dedd4383e1ebddc752e.tar.gz
volse-hubzilla-be2fd56aae51ee02b6e40dedd4383e1ebddc752e.tar.bz2
volse-hubzilla-be2fd56aae51ee02b6e40dedd4383e1ebddc752e.zip
Merge branch 'master' of github.com:fabrixxm/friendica
Diffstat (limited to 'include')
-rw-r--r--include/config.php12
-rw-r--r--include/conversation.php10
2 files changed, 17 insertions, 5 deletions
diff --git a/include/config.php b/include/config.php
index f565ab117..92694f519 100644
--- a/include/config.php
+++ b/include/config.php
@@ -145,8 +145,9 @@ function get_pconfig($uid,$family, $key, $instore = false) {
);
if(count($ret)) {
- $a->config[$uid][$family][$key] = $ret[0]['v'];
- return $ret[0]['v'];
+ $val = (preg_match("|^a:[0-9]+:{.*}$|", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']);
+ $a->config[$uid][$family][$key] = $val;
+ return $val;
}
else {
$a->config[$uid][$family][$key] = '!<unset>!';
@@ -177,20 +178,23 @@ function set_pconfig($uid,$family,$key,$value) {
global $a;
+ // manage array value
+ $dbvalue = (is_array($value)?serialize($value):$value);
+
if(get_pconfig($uid,$family,$key,true) === false) {
$a->config[$uid][$family][$key] = $value;
$ret = q("INSERT INTO `pconfig` ( `uid`, `cat`, `k`, `v` ) VALUES ( %d, '%s', '%s', '%s' ) ",
intval($uid),
dbesc($family),
dbesc($key),
- dbesc($value)
+ dbesc($dbvalue)
);
if($ret)
return $value;
return $ret;
}
$ret = q("UPDATE `pconfig` SET `v` = '%s' WHERE `uid` = %d AND `cat` = '%s' AND `k` = '%s' LIMIT 1",
- dbesc($value),
+ dbesc($dbvalue),
intval($uid),
dbesc($family),
dbesc($key)
diff --git a/include/conversation.php b/include/conversation.php
index fae57c565..f4dd01dde 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -856,13 +856,21 @@ function status_editor($a,$x, $notes_cid = 0) {
'$action' => 'item',
'$share' => (($x['button']) ? $x['button'] : t('Share')),
'$upload' => t('Upload photo'),
+ '$shortupload' => t('upload photo'),
'$attach' => t('Attach file'),
+ '$shortattach' => t('attach file'),
'$weblink' => t('Insert web link'),
+ '$shortweblink' => t('web link'),
'$video' => t('Insert video link'),
+ '$shortvideo' => t('video link'),
'$audio' => t('Insert audio link'),
+ '$shortaudio' => t('audio link'),
'$setloc' => t('Set your location'),
+ '$shortsetloc' => t('set location'),
'$noloc' => t('Clear browser location'),
- '$title' => t('Set title'),
+ '$shortnoloc' => t('clear location'),
+ '$title' => "",
+ '$placeholdertitle' => t('Set title'),
'$wait' => t('Please wait'),
'$permset' => t('Permission settings'),
'$ptyp' => (($notes_cid) ? 'note' : 'wall'),