preserve mimetype on page edits
This commit is contained in:
parent
6ad6aa307f
commit
a32d86f0a0
@ -1013,7 +1013,7 @@ function status_editor($a,$x,$popup=false) {
|
|||||||
if(feature_enabled(local_user(),'richtext'))
|
if(feature_enabled(local_user(),'richtext'))
|
||||||
$plaintext = false;
|
$plaintext = false;
|
||||||
|
|
||||||
$mimeselct = '';
|
$mimeselect = '';
|
||||||
if(array_key_exists('mimetype',$x) && $x['mimetype']) {
|
if(array_key_exists('mimetype',$x) && $x['mimetype']) {
|
||||||
if($x['mimetype'] != 'text/bbcode')
|
if($x['mimetype'] != 'text/bbcode')
|
||||||
$plaintext = true;
|
$plaintext = true;
|
||||||
@ -1021,9 +1021,10 @@ function status_editor($a,$x,$popup=false) {
|
|||||||
$mimeselect = mimetype_select($x['profile_uid']);
|
$mimeselect = mimetype_select($x['profile_uid']);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$mimeselect = '<input name="mimetype" value="' . $x['mimetype'] . '" />';
|
$mimeselect = '<input type="hidden" name="mimetype" value="' . $x['mimetype'] . '" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$webpage = ((x($x,'webpage')) ? $x['webpage'] : '');
|
||||||
|
|
||||||
$tpl = get_markup_template('jot-header.tpl');
|
$tpl = get_markup_template('jot-header.tpl');
|
||||||
|
|
||||||
@ -1055,7 +1056,7 @@ function status_editor($a,$x,$popup=false) {
|
|||||||
'$return_path' => $a->query_string,
|
'$return_path' => $a->query_string,
|
||||||
'$action' => $a->get_baseurl(true) . '/item',
|
'$action' => $a->get_baseurl(true) . '/item',
|
||||||
'$share' => (x($x,'button') ? $x['button'] : t('Share')),
|
'$share' => (x($x,'button') ? $x['button'] : t('Share')),
|
||||||
'$webpage' => (x($x,'webpage') ? $x['webpage'] : ''),
|
'$webpage' => $webpage,
|
||||||
'$placeholdpagetitle' => t('Page link title'),
|
'$placeholdpagetitle' => t('Page link title'),
|
||||||
'$pagetitle' => (x($x,'pagetitle') ? $x['pagetitle'] : ''),
|
'$pagetitle' => (x($x,'pagetitle') ? $x['pagetitle'] : ''),
|
||||||
'$upload' => t('Upload photo'),
|
'$upload' => t('Upload photo'),
|
||||||
@ -1074,7 +1075,7 @@ function status_editor($a,$x,$popup=false) {
|
|||||||
'$shortnoloc' => t('clear location'),
|
'$shortnoloc' => t('clear location'),
|
||||||
'$title' => "",
|
'$title' => "",
|
||||||
'$placeholdertitle' => t('Set title'),
|
'$placeholdertitle' => t('Set title'),
|
||||||
'$catsenabled' => ((feature_enabled($x['profile_uid'],'categories')) ? 'categories' : ''),
|
'$catsenabled' => ((feature_enabled($x['profile_uid'],'categories') && (! $webpage)) ? 'categories' : ''),
|
||||||
'$category' => "",
|
'$category' => "",
|
||||||
'$placeholdercategory' => t('Categories (comma-separated list)'),
|
'$placeholdercategory' => t('Categories (comma-separated list)'),
|
||||||
'$wait' => t('Please wait'),
|
'$wait' => t('Please wait'),
|
||||||
|
@ -65,6 +65,17 @@ function editwebpage_content(&$a) {
|
|||||||
if(feature_enabled(local_user(),'richtext'))
|
if(feature_enabled(local_user(),'richtext'))
|
||||||
$plaintext = false;
|
$plaintext = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$mimetype = $itm[0]['mimetype'];
|
||||||
|
|
||||||
|
$mimeselect = '';
|
||||||
|
|
||||||
|
if($mimetype != 'text/bbcode')
|
||||||
|
$plaintext = true;
|
||||||
|
$mimeselect = '<input type="hidden" name="mimetype" value="' . $mimetype . '" />';
|
||||||
|
|
||||||
|
|
||||||
$o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
|
$o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
|
||||||
'$title' => t('Edit post')
|
'$title' => t('Edit post')
|
||||||
));
|
));
|
||||||
@ -78,7 +89,7 @@ function editwebpage_content(&$a) {
|
|||||||
'$nickname' => $a->user['nickname']
|
'$nickname' => $a->user['nickname']
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
$tpl = get_markup_template("jot.tpl");
|
$tpl = get_markup_template("jot.tpl");
|
||||||
|
|
||||||
$jotplugins = '';
|
$jotplugins = '';
|
||||||
@ -118,6 +129,7 @@ function editwebpage_content(&$a) {
|
|||||||
'$pvisit' => 'none',
|
'$pvisit' => 'none',
|
||||||
'$public' => t('Public post'),
|
'$public' => t('Public post'),
|
||||||
'$jotnets' => $jotnets,
|
'$jotnets' => $jotnets,
|
||||||
|
'$mimeselect' => $mimeselect,
|
||||||
'$title' => htmlspecialchars($itm[0]['title']),
|
'$title' => htmlspecialchars($itm[0]['title']),
|
||||||
'$placeholdertitle' => t('Set title'),
|
'$placeholdertitle' => t('Set title'),
|
||||||
'$category' => '',
|
'$category' => '',
|
||||||
|
Reference in New Issue
Block a user