Fix blog history view
This commit is contained in:
parent
3ad4a6d08e
commit
41c1ea61b6
@ -120,8 +120,8 @@ switch ($controller->splitted_url[1]) {
|
||||
else {
|
||||
// Manage history of an article
|
||||
if($user->rankIsHigher("premium")) {
|
||||
$blogArticles_history = new Kabano\BlogArticles();
|
||||
$blogArticles_history->getHistory($controller->splitted_url[1]);
|
||||
$blogHistory = new Kabano\BlogArticles();
|
||||
$blogHistory->getHistory($controller->splitted_url[1]);
|
||||
}
|
||||
if (isset($controller->splitted_url[2]) && is_numeric($controller->splitted_url[2]))
|
||||
$blogArticle->checkPermalink($controller->splitted_url[1],$user->rankIsHigher("premium"),$controller->splitted_url[2]);
|
||||
|
@ -9,18 +9,18 @@
|
||||
|
||||
<section id="blog_article" <?=$blogArticle->is_archive=="t"||$blogArticle->is_public=="f"?'class="archive"':''?>>
|
||||
<h1><?=$blogArticle->name?>.</h1>
|
||||
<? if($user->rankIsHigher("premium")) { ?>
|
||||
<? if($user->rankIsHigher('premium')) { ?>
|
||||
<span class="subtitle">
|
||||
<? if(isset($blogArticles_history_list)) { ?>
|
||||
<? if(isset($blogHistory)) { ?>
|
||||
<select id="bloghistory">
|
||||
<? $i = 0;
|
||||
foreach ($blogArticles_history_list as $row) { ?>
|
||||
<option <?=$row->id==$blogArticle->id?'selected':''?> value="<?=$i?>"><?=$row->archive=="f"?'• ':''?><? echo strftime('%d/%m/%Y %H:%M:%S',strtotime($row->lastedit)) ?></option>
|
||||
foreach ($blogHistory->objs as $row) { ?>
|
||||
<option <?=$row->id==$blogArticle->id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'• ':''?><? echo strftime('%d/%m/%Y %H:%M:%S',strtotime($row->update_date)) ?></option>
|
||||
<? $i++;
|
||||
} ?>
|
||||
</select>
|
||||
<? }
|
||||
if ($user->rankIsHigher("moderator") && isset($blogArticles_history_list)) { ?>
|
||||
if ($user->rankIsHigher('moderator') && isset($blogHistory)) { ?>
|
||||
—
|
||||
<? }
|
||||
if ($user->rankIsHigher("moderator")) { ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user