import v1.1.0_RC2 | 2009-09-20

This commit is contained in:
2019-07-17 22:19:00 +02:00
parent 3b7ba80568
commit 38c146901c
2504 changed files with 101817 additions and 62316 deletions

View File

@ -57,7 +57,7 @@ class News_EditController extends CommunityID_Controller_Action
$news = new News_Model_News();
if ($this->_getParam('id')) {
if (!$article = $news->getRowInstance($this->_getParam('id'))) {
$this->_helper->FlashMessenger->addMessage('Article doesn\'t exist.');
$this->_helper->FlashMessenger->addMessage($this->view->translate('The article doesn\'t exist.'));
$this->_redirect('/news');
return;
}
@ -78,7 +78,7 @@ class News_EditController extends CommunityID_Controller_Action
$article->content = $cleanHtml;
$article->save();
$this->_helper->FlashMessenger->addMessage('The article has been saved.');
$this->_helper->FlashMessenger->addMessage($this->view->translate('The article has been saved.'));
$this->_redirect('/news');
}
@ -87,10 +87,10 @@ class News_EditController extends CommunityID_Controller_Action
{
$news = new News_Model_News();
if (!$article = $news->getRowInstance($this->_getParam('id'))) {
$this->_helper->FlashMessenger->addMessage('The article doesn\'t exist.');
$this->_helper->FlashMessenger->addMessage($this->view->translate('The article doesn\'t exist.'));
} else {
$article->delete();
$this->_helper->FlashMessenger->addMessage('The article has been deleted.');
$this->_helper->FlashMessenger->addMessage($this->view->translate('The article has been deleted.'));
}
$this->_redirect('/news');

View File

@ -1,5 +1,5 @@
<form method="post" action="<?php echo $this->base ?>/news/edit/save" class="formGrid">
<input type="hidden" name="id" value="<?= $this->articleId ?>" />
<input type="hidden" name="id" value="<?php echo $this->articleId ?>" />
<?php echo $this->articleForm->title ?>
<?php echo $this->articleForm->excerpt ?>
<?php echo $this->articleForm->date ?>

View File

@ -7,7 +7,7 @@
</div>
<?php endif ?>
<?php if (count($this->paginator) == 0): ?>
<div><?= $this->translate('There are no news articles yet') ?></div>
<div><?php echo $this->translate('There are no news articles yet') ?></div>
<?php else: ?>
<?php foreach ($this->paginator as $article): ?>
<div class="post">

View File

@ -1,4 +1,4 @@
<h2><?= $this->escape($this->article->title) ?></h2>
<h2><?php echo $this->escape($this->article->title) ?></h2>
<div class="article_date">
<?php echo $this->translate('Published on %s', $this->article->date) ?>
<?php if ($this->user->role == Users_Model_User::ROLE_ADMIN): ?>
@ -8,7 +8,7 @@
</div>
<?php endif ?>
</div>
<p><?= $this->escape($this->article->excerpt) ?></p>
<p><?php echo $this->escape($this->article->excerpt) ?></p>
<hr />
<div>
<?php echo $this->article->content ?>