Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2fe1c0f26e | ||
|
|
25cc1ff3dc | ||
|
|
bd6a6a0e0e |
@@ -12,7 +12,7 @@ include 'menu.php';
|
||||
<div class="row typecho-page-main">
|
||||
<div class="col-mb-12 col-tb-8" role="main">
|
||||
<?php if ($attachment->attachment->isImage): ?>
|
||||
<p><img src="<?php $attachment->attachment->url(); ?>"
|
||||
<p><img src="<?php $attachment->attachment->url(); ?>?<?php $attachment->modified(); ?>"
|
||||
alt="<?php $attachment->attachment->name(); ?>" class="typecho-attachment-photo"/></p>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
@@ -187,7 +187,11 @@ $(document).ready(function() {
|
||||
cid = o.cid;
|
||||
draftId = o.draftId;
|
||||
idInput.val(cid);
|
||||
autoSave.text('<?php _e('已保存'); ?>' + ' (' + o.time + ')').effect('highlight', 1000);
|
||||
autoSave.text('<?php _e('已保存'); ?>' + ' (' + o.time + ')');
|
||||
|
||||
if (!$(document.body).hasClass('preview')) {
|
||||
autoSave.effect('highlight', 1000);
|
||||
}
|
||||
|
||||
cb && cb();
|
||||
};
|
||||
|
||||
@@ -187,7 +187,7 @@ class Request
|
||||
}
|
||||
} else {
|
||||
$exists = false;
|
||||
return $default;
|
||||
return $value ?? $default;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -545,7 +545,7 @@ class Request
|
||||
$validated = true;
|
||||
foreach ($params as $key => $val) {
|
||||
$param = $this->get($key, null, $exists);
|
||||
$validated = empty($val) ? $exists : ($val == $param);
|
||||
$validated = $val === '' ? $exists : ($val === $param);
|
||||
|
||||
if (!$validated) {
|
||||
break;
|
||||
|
||||
@@ -224,7 +224,7 @@ class Edit extends Metas implements ActionInterface
|
||||
$submit->input->setAttribute('class', 'btn primary');
|
||||
$form->addItem($submit);
|
||||
|
||||
if (isset($this->request->mid) && 'insert' != $action) {
|
||||
if ($this->request->is('mid') && 'insert' != $action) {
|
||||
/** 更新模式 */
|
||||
$meta = $this->db->fetchRow($this->select()
|
||||
->where('mid = ?', $this->request->mid)
|
||||
|
||||
@@ -316,7 +316,7 @@ class Upload extends Contents implements ActionInterface
|
||||
'allowFeed' => 1
|
||||
];
|
||||
|
||||
if (isset($this->request->cid)) {
|
||||
if ($this->request->is('cid')) {
|
||||
$cid = $this->request->filter('int')->get('cid');
|
||||
|
||||
if ($this->isWriteable($this->db->sql()->where('cid = ?', $cid))) {
|
||||
|
||||
@@ -1753,7 +1753,7 @@ class XmlRpc extends Contents implements ActionInterface, Hook
|
||||
throw new Exception(_t('请求的地址不存在'), 404);
|
||||
}
|
||||
|
||||
if (isset($this->request->rsd)) {
|
||||
if ($this->request->get('rsd') !== null) {
|
||||
echo
|
||||
<<<EOF
|
||||
<?xml version="1.0" encoding="{$this->options->charset}"?>
|
||||
@@ -1771,7 +1771,7 @@ class XmlRpc extends Contents implements ActionInterface, Hook
|
||||
</service>
|
||||
</rsd>
|
||||
EOF;
|
||||
} elseif (isset($this->request->wlw)) {
|
||||
} elseif ($this->request->get('wlw') !== null) {
|
||||
echo
|
||||
<<<EOF
|
||||
<?xml version="1.0" encoding="{$this->options->charset}"?>
|
||||
|
||||
Reference in New Issue
Block a user