edit post not working after plaintext editor fixes, missing some recent editor template changes
This commit is contained in:
parent
795e02aa14
commit
7b0a005441
|
@ -1486,7 +1486,8 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
|
||||||
|
|
||||||
if(count($r)) {
|
if(count($r)) {
|
||||||
if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) {
|
if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) {
|
||||||
$r = q("UPDATE `item` SET `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
$r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
||||||
|
dbesc($datarray['title']),
|
||||||
dbesc($datarray['body']),
|
dbesc($datarray['body']),
|
||||||
dbesc(datetime_convert('UTC','UTC',$datarray['edited'])),
|
dbesc(datetime_convert('UTC','UTC',$datarray['edited'])),
|
||||||
dbesc($item_id),
|
dbesc($item_id),
|
||||||
|
@ -1616,7 +1617,8 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
|
||||||
|
|
||||||
if(count($r)) {
|
if(count($r)) {
|
||||||
if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) {
|
if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) {
|
||||||
$r = q("UPDATE `item` SET `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
$r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
||||||
|
dbesc($datarray['title']),
|
||||||
dbesc($datarray['body']),
|
dbesc($datarray['body']),
|
||||||
dbesc(datetime_convert('UTC','UTC',$datarray['edited'])),
|
dbesc(datetime_convert('UTC','UTC',$datarray['edited'])),
|
||||||
dbesc($item_id),
|
dbesc($item_id),
|
||||||
|
@ -2167,7 +2169,8 @@ function local_delivery($importer,$data) {
|
||||||
|
|
||||||
if(count($r)) {
|
if(count($r)) {
|
||||||
if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) {
|
if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) {
|
||||||
$r = q("UPDATE `item` SET `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
$r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
||||||
|
dbesc($datarray['title']),
|
||||||
dbesc($datarray['body']),
|
dbesc($datarray['body']),
|
||||||
dbesc(datetime_convert('UTC','UTC',$datarray['edited'])),
|
dbesc(datetime_convert('UTC','UTC',$datarray['edited'])),
|
||||||
dbesc($item_id),
|
dbesc($item_id),
|
||||||
|
@ -2309,7 +2312,8 @@ function local_delivery($importer,$data) {
|
||||||
|
|
||||||
if(count($r)) {
|
if(count($r)) {
|
||||||
if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) {
|
if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) {
|
||||||
$r = q("UPDATE `item` SET `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
$r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
||||||
|
dbesc($datarray['title']),
|
||||||
dbesc($datarray['body']),
|
dbesc($datarray['body']),
|
||||||
dbesc(datetime_convert('UTC','UTC',$datarray['edited'])),
|
dbesc(datetime_convert('UTC','UTC',$datarray['edited'])),
|
||||||
dbesc($item_id),
|
dbesc($item_id),
|
||||||
|
@ -2805,7 +2809,7 @@ function drop_item($id,$interactive = true) {
|
||||||
|
|
||||||
// delete the item
|
// delete the item
|
||||||
|
|
||||||
$r = q("UPDATE `item` SET `deleted` = 1, `body` = '', `edited` = '%s', `changed` = '%s' WHERE `id` = %d LIMIT 1",
|
$r = q("UPDATE `item` SET `deleted` = 1, `title` = '', `body` = '', `edited` = '%s', `changed` = '%s' WHERE `id` = %d LIMIT 1",
|
||||||
dbesc(datetime_convert()),
|
dbesc(datetime_convert()),
|
||||||
dbesc(datetime_convert()),
|
dbesc(datetime_convert()),
|
||||||
intval($item['id'])
|
intval($item['id'])
|
||||||
|
@ -2838,7 +2842,7 @@ function drop_item($id,$interactive = true) {
|
||||||
// If it's the parent of a comment thread, kill all the kids
|
// If it's the parent of a comment thread, kill all the kids
|
||||||
|
|
||||||
if($item['uri'] == $item['parent-uri']) {
|
if($item['uri'] == $item['parent-uri']) {
|
||||||
$r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', `body` = ''
|
$r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', `body` = '' , `title` = ''
|
||||||
WHERE `parent-uri` = '%s' AND `uid` = %d ",
|
WHERE `parent-uri` = '%s' AND `uid` = %d ",
|
||||||
dbesc(datetime_convert()),
|
dbesc(datetime_convert()),
|
||||||
dbesc(datetime_convert()),
|
dbesc(datetime_convert()),
|
||||||
|
|
|
@ -35,6 +35,7 @@ function editpost_content(&$a) {
|
||||||
|
|
||||||
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => $a->get_baseurl(),
|
||||||
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||||
'$geotag' => $geotag,
|
'$geotag' => $geotag,
|
||||||
'$nickname' => $a->user['nickname']
|
'$nickname' => $a->user['nickname']
|
||||||
|
@ -108,11 +109,14 @@ function editpost_content(&$a) {
|
||||||
'$emailcc' => t('CC: email addresses'),
|
'$emailcc' => t('CC: email addresses'),
|
||||||
'$public' => t('Public post'),
|
'$public' => t('Public post'),
|
||||||
'$jotnets' => $jotnets,
|
'$jotnets' => $jotnets,
|
||||||
|
'$title' => $itm[0]['title'],
|
||||||
|
'$placeholdertitle' => t('Set title'),
|
||||||
'$emtitle' => t('Example: bob@example.com, mary@example.com'),
|
'$emtitle' => t('Example: bob@example.com, mary@example.com'),
|
||||||
'$lockstate' => $lockstate,
|
'$lockstate' => $lockstate,
|
||||||
'$acl' => '', // populate_acl((($group) ? $group_acl : $a->user), $celeb),
|
'$acl' => '', // populate_acl((($group) ? $group_acl : $a->user), $celeb),
|
||||||
'$bang' => (($group) ? '!' : ''),
|
'$bang' => (($group) ? '!' : ''),
|
||||||
'$profile_uid' => $_SESSION['uid'],
|
'$profile_uid' => $_SESSION['uid'],
|
||||||
|
'$preview' => t('Preview'),
|
||||||
'$jotplugins' => $jotplugins,
|
'$jotplugins' => $jotplugins,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -649,7 +649,8 @@ function item_post(&$a) {
|
||||||
|
|
||||||
|
|
||||||
if($orig_post) {
|
if($orig_post) {
|
||||||
$r = q("UPDATE `item` SET `body` = '%s', `edited` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
$r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
||||||
|
dbesc($title),
|
||||||
dbesc($body),
|
dbesc($body),
|
||||||
dbesc(datetime_convert()),
|
dbesc(datetime_convert()),
|
||||||
intval($post_id),
|
intval($post_id),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user