mirror of
https://github.com/danpros/htmly.git
synced 2026-04-18 03:26:20 +05:30
Bug fix #821
Fix category link on admin page if the category slug contains `category` string
This commit is contained in:
parent
9bac9bc6fd
commit
e106a971df
6 changed files with 6 additions and 6 deletions
|
|
@ -19,7 +19,7 @@ if (isset($_SESSION[site_url()]['user'])) {
|
|||
echo '<td>' . format_date($p->date) . '</td>';
|
||||
if (config("views.counter") == "true")
|
||||
echo '<td>' . $p->views . '</td>';
|
||||
echo '<td><a href="' . str_replace('category', 'admin/categories', $p->categoryUrl) . '">'. strip_tags($p->category) .'</a></td>';
|
||||
echo '<td><a href="' . site_url() . 'admin/categories/' . $p->categorySlug . '">'. $p->categoryTitle .'</a></td>';
|
||||
echo '<td>' . str_replace("rel=\"tag\"", "rel=\"tag\" class=\"badge badge-light text-primary font-weight-normal\"", $p->tag) . '</td>';
|
||||
echo '<td><a class="btn btn-primary btn-xs" href="' . $p->url . '/edit?destination=admin">' . i18n('Edit') . '</a> <a class="btn btn-danger btn-xs" href="' . $p->url . '/delete?destination=admin">' . i18n('Delete') . '</a></td>';
|
||||
echo '</tr>';
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<?php if (config("views.counter") == "true"): ?>
|
||||
<td><?php echo get_views('post_' . $p->slug); ?></td><?php endif; ?>
|
||||
<td><a target="_blank" href="<?php echo $p->authorUrl ?>"><?php echo $p->author ?></a></td>
|
||||
<td><a href="<?php echo str_replace('category', 'admin/categories', $p->categoryUrl); ?>"><?php echo strip_tags($p->category);?></a></td>
|
||||
<td><a href="<?php echo site_url() . 'admin/categories/' . $p->categorySlug; ?>"><?php echo $p->categoryTitle;?></a></td>
|
||||
<td><?php echo str_replace('rel="tag"', 'rel="tag" class="badge badge-light text-primary font-weight-normal"', $p->tag); ?></td>
|
||||
<td><a class="btn btn-primary btn-xs" href="<?php echo $p->url ?>/edit?destination=admin/posts"><?php echo i18n('Edit');?></a> <a
|
||||
class="btn btn-danger btn-xs" href="<?php echo $p->url ?>/delete?destination=admin/posts"><?php echo i18n('Delete');?></a></td>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<?php if (config("views.counter") == "true"): ?>
|
||||
<td><?php echo $p->views ?></td><?php endif; ?>
|
||||
<td><a target="_blank" href="<?php echo $p->authorUrl ?>"><?php echo $p->author ?></a></td>
|
||||
<td><a href="<?php echo str_replace('category', 'admin/categories', $p->categoryUrl); ?>"><?php echo strip_tags($p->category);?></a></td>
|
||||
<td><a href="<?php echo site_url() . 'admin/categories/' . $p->categorySlug; ?>"><?php echo $p->categoryTitle;?></a></td>
|
||||
<td><?php echo str_replace('rel="tag"', 'rel="tag" class="badge badge-light text-primary font-weight-normal"', $p->tag); ?></td>
|
||||
<td><a class="btn btn-primary btn-xs" href="<?php echo $p->url ?>/edit?destination=admin/posts"><?php echo i18n('Edit');?></a> <a
|
||||
class="btn btn-danger btn-xs" href="<?php echo $p->url ?>/delete?destination=admin/posts"><?php echo i18n('Delete');?></a></td>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<tr>
|
||||
<td><?php echo $p->title ?></td>
|
||||
<td><?php echo format_date($p->date, 'd F Y, H:i:s') ?></td>
|
||||
<td><a href="<?php echo str_replace('category', 'admin/categories', $p->categoryUrl); ?>"><?php echo strip_tags($p->category);?></a></td>
|
||||
<td><a href="<?php echo site_url() . 'admin/categories/' . $p->categorySlug; ?>"><?php echo $p->categoryTitle;?></a></td>
|
||||
<td><?php echo str_replace('rel="tag"', 'rel="tag" class="badge badge-light text-primary font-weight-normal"', $p->tag); ?></td>
|
||||
<td><a class="btn btn-primary btn-xs" href="<?php echo $p->url ?>/edit?destination=admin/scheduled"><?php echo i18n('Edit');?></a> <a class="btn btn-danger btn-xs" href="<?php echo $p->url ?>/delete?destination=admin/scheduled"><?php echo i18n('Delete');?></a></td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<tr>
|
||||
<td><?php echo $p->title ?></td>
|
||||
<td><?php echo format_date($p->date) ?></td>
|
||||
<td><a href="<?php echo str_replace('category', 'admin/categories', $p->categoryUrl); ?>"><?php echo strip_tags($p->category);?></a></td>
|
||||
<td><a href="<?php echo site_url() . 'admin/categories/' . $p->categorySlug; ?>"><?php echo $p->categoryTitle;?></a></td>
|
||||
<td><?php echo str_replace('rel="tag"', 'rel="tag" class="badge badge-light text-primary font-weight-normal"', $p->tag); ?></td>
|
||||
<td><a class="btn btn-primary btn-xs" href="<?php echo $p->url ?>/edit?destination=admin/draft"><?php echo i18n('Edit');?></a> <a class="btn btn-danger btn-xs" href="<?php echo $p->url ?>/delete?destination=admin/draft"><?php echo i18n('Delete');?></a></td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<?php if (config("views.counter") == "true"): ?>
|
||||
<td><?php echo $p->views ?></td>
|
||||
<?php endif; ?>
|
||||
<td><a href="<?php echo str_replace('category', 'admin/categories', $p->categoryUrl); ?>"><?php echo strip_tags($p->category);?></a></td>
|
||||
<td><a href="<?php echo site_url() . 'admin/categories/' . $p->categorySlug; ?>"><?php echo $p->categoryTitle;?></a></td>
|
||||
<td><?php echo str_replace('rel="tag"', 'rel="tag" class="badge badge-light text-primary font-weight-normal"', $p->tag); ?></td>
|
||||
<td><a class="btn btn-primary btn-xs" href="<?php echo $p->url ?>/edit?destination=admin/mine"><?php echo i18n('Edit');?></a> <a class="btn btn-danger btn-xs" href="<?php echo $p->url ?>/delete?destination=admin/mine"><?php echo i18n('Delete');?></a></td>
|
||||
</tr>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue