mirror of
https://github.com/friendica/friendica
synced 2025-05-17 07:04:12 +02:00
commit
ad02af4e8f
40 changed files with 747 additions and 359 deletions
|
@ -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)
|
||||
|
|
|
@ -813,8 +813,7 @@ function status_editor($a,$x, $notes_cid = 0) {
|
|||
'$audurl' => t("Please enter an audio link/URL:"),
|
||||
'$term' => t('Tag term:'),
|
||||
'$whereareu' => t('Where are you right now?'),
|
||||
'$title' => t('Enter a title for this item'),
|
||||
'$addtitle' => t('click here to add a title')
|
||||
'$title' => t('Enter a title for this item')
|
||||
));
|
||||
|
||||
|
||||
|
@ -858,15 +857,24 @@ 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'),
|
||||
'$shortpermset' => t('permissions'),
|
||||
'$ptyp' => (($notes_cid) ? 'note' : 'wall'),
|
||||
'$content' => '',
|
||||
'$post_id' => '',
|
||||
|
@ -882,8 +890,6 @@ function status_editor($a,$x, $notes_cid = 0) {
|
|||
'$acl' => $x['acl'],
|
||||
'$bang' => $x['bang'],
|
||||
'$profile_uid' => $x['profile_uid'],
|
||||
'$addtitle' => t('click here to add a title')
|
||||
|
||||
));
|
||||
|
||||
return $o;
|
||||
|
@ -958,4 +964,4 @@ function find_thread_parent_index($arr,$x) {
|
|||
if($v['id'] == $x['parent'])
|
||||
return $k;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue