Skip to content
Permalink
Browse files

Migrate crumbs to a function

  • Loading branch information...
Quy committed Feb 22, 2019
1 parent 325adb9 commit db1b7d9b3f9c5db9becbf41a370c626b7f117dc5
Showing with 16 additions and 22 deletions.
  1. +16 −22 moderate.php
@@ -294,6 +294,12 @@
if ($pun_config['o_censoring'] == '1')
$cur_topic['subject'] = censor_words($cur_topic['subject']);
$crumbs = generate_crumbs(array(
array($lang_common['Index'], 'index.php'),
array(pun_htmlspecialchars($cur_topic['forum_name']), 'viewforum.php?id='.$fid),
array(pun_htmlspecialchars($cur_topic['subject']), 'viewtopic.php?id='.$tid),
$lang_misc['Moderate'],
));
$page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), pun_htmlspecialchars($cur_topic['forum_name']), pun_htmlspecialchars($cur_topic['subject']));
define('PUN_ACTIVE_PAGE', 'index');
@@ -302,12 +308,7 @@
?>
<div class="linkst">
<div class="inbox crumbsplus">
<ul class="crumbs">
<li><a href="index.php"><?php echo $lang_common['Index'] ?></a></li>
<li><span&#160;</span><a href="viewforum.php?id=<?php echo $fid ?>"><?php echo pun_htmlspecialchars($cur_topic['forum_name']) ?></a></li>
<li><span&#160;</span><a href="viewtopic.php?id=<?php echo $tid ?>"><?php echo pun_htmlspecialchars($cur_topic['subject']) ?></a></li>
<li><span&#160;</span><strong><?php echo $lang_misc['Moderate'] ?></strong></li>
</ul>
<?php echo $crumbs ?>
<div class="pagepost">
<p class="pagelink conl"><?php echo $paging_links ?></p>
</div>
@@ -403,12 +404,7 @@
<p class="conr modbuttons"><input type="submit" name="split_posts" value="<?php echo $lang_misc['Split'] ?>"<?php echo $button_status ?> /> <input type="submit" name="delete_posts" value="<?php echo $lang_misc['Delete'] ?>"<?php echo $button_status ?> /></p>
<div class="clearer"></div>
</div>
<ul class="crumbs">
<li><a href="index.php"><?php echo $lang_common['Index'] ?></a></li>
<li><span&#160;</span><a href="viewforum.php?id=<?php echo $fid ?>"><?php echo pun_htmlspecialchars($cur_topic['forum_name']) ?></a></li>
<li><span&#160;</span><a href="viewtopic.php?id=<?php echo $tid ?>"><?php echo pun_htmlspecialchars($cur_topic['subject']) ?></a></li>
<li><span&#160;</span><strong><?php echo $lang_misc['Moderate'] ?></strong></li>
</ul>
<?php echo $crumbs ?>
<div class="clearer"></div>
</div>
</div>
@@ -853,18 +849,20 @@
// Generate paging links
$paging_links = '<span class="pages-label">'.$lang_common['Pages'].' </span>'.paginate($num_pages, $p, 'moderate.php?fid='.$fid);
$crumbs = generate_crumbs(array(
array($lang_common['Index'], 'index.php'),
array(pun_htmlspecialchars($cur_forum['forum_name']), 'viewforum.php?id='.$fid),
$lang_misc['Moderate'],
));
$page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), pun_htmlspecialchars($cur_forum['forum_name']));
define('PUN_ACTIVE_PAGE', 'index');
require PUN_ROOT.'header.php';
?>
<div class="linkst">
<div class="inbox crumbsplus">
<ul class="crumbs">
<li><a href="index.php"><?php echo $lang_common['Index'] ?></a></li>
<li><span&#160;</span><a href="viewforum.php?id=<?php echo $fid ?>"><?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></a></li>
<li><span&#160;</span><strong><?php echo $lang_misc['Moderate'] ?></strong></li>
</ul>
<?php echo $crumbs ?>
<div class="pagepost">
<p class="pagelink conl"><?php echo $paging_links ?></p>
</div>
@@ -1016,11 +1014,7 @@
<p class="conr modbuttons"><input type="submit" name="move_topics" value="<?php echo $lang_misc['Move'] ?>"<?php echo $button_status ?> /> <input type="submit" name="delete_topics" value="<?php echo $lang_misc['Delete'] ?>"<?php echo $button_status ?> /> <input type="submit" name="merge_topics" value="<?php echo $lang_misc['Merge'] ?>"<?php echo $button_status ?> /> <input type="submit" name="open" value="<?php echo $lang_misc['Open'] ?>"<?php echo $button_status ?> /> <input type="submit" name="close" value="<?php echo $lang_misc['Close'] ?>"<?php echo $button_status ?> /></p>
<div class="clearer"></div>
</div>
<ul class="crumbs">
<li><a href="index.php"><?php echo $lang_common['Index'] ?></a></li>
<li><span&#160;</span><a href="viewforum.php?id=<?php echo $fid ?>"><?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></a></li>
<li><span&#160;</span><strong><?php echo $lang_misc['Moderate'] ?></strong></li>
</ul>
<?php echo $crumbs ?>
<div class="clearer"></div>
</div>
</div>

0 comments on commit db1b7d9

Please sign in to comment.
You can’t perform that action at this time.