Permalink
Browse files

kittens and sunshine

  • Loading branch information...
r04r committed Jan 5, 2016
1 parent 07952d3 commit f02538653856b5338202fa74a7d475e0d21682fd
Showing with 17 additions and 3 deletions.
  1. +1 −1 deleted_topics.php
  2. +14 −0 includes/functions.php
  3. +2 −2 topic.php
View
@@ -72,7 +72,7 @@
replies($topic_id, $topic_replies),
format_number($topic_visits),
'<span class="help" title="'.format_date($trash_time).'">'.calculate_age($trash_time).'</span>',
'<a href="'.DOMAIN.'profile/'.$mod_uid.'">'.modname($mod_uid).'</a>',
'<a href="'.DOMAIN.'profile/'.sanitize('uid', $mod_uid).'">'.modname($mod_uid).'</a>',
'<a href="'.DOMAIN.'undelete_topic/'.$topic_id.'">Undelete</a>',
);
$table->row($values);
View
@@ -46,6 +46,20 @@
'image_macro' => 'Creating an image macro.',
);
function sanitize($type, $val)
{
switch($type) {
case 'uid':
case 'profile':
if(!allowed('open_profile')) return null;
break;
case 'ip':
if(!allowed('open_ip')) return null;
break;
}
return $val;
}
$permission_list = array(
'delete', 'delete_image', 'ban_uid', 'ban_ip', 'lock_topic', 'stick_topic', 'edit_post', 'post_html',
'open_profile', 'open_ip', 'open_modlog', 'mod_hyperlink', 'mod_pm', 'watch',
View
@@ -147,7 +147,7 @@ function create_no_link($var)
$time = $topic_time;
}
echo "<div class='body'>";
echo "This topic was deleted <a class='help' title='".format_date($time)."'>".calculate_age($time)."</a> ago by <a href='".DOMAIN.'profile/'.$mod_uid."'>".$mod_name."</a> with the ip address <a href='".DOMAIN.'IP_address/'.$mod_ip."'>".$mod_ip.'</a>';
echo "This topic was deleted <a class='help' title='".format_date($time)."'>".calculate_age($time)."</a> ago by <a href='".DOMAIN.'profile/'.sanitize('uid', $mod_uid)."'>".$mod_name."</a> with the ip address <a href='".DOMAIN.'IP_address/'.sanitize('ip', $mod_ip)."'>".sanitize('ip', $mod_ip).'</a>';
echo '</div>';
}
@@ -625,7 +625,7 @@ function preg_replace_anchors($data)
$delete_time = $reply_time;
}
$styleHidden = 'style="display:none" ';
echo '<h3 id="reply_'.$reply_id.'_info" class="highlighted"><center>Reply #'.$reply_id.' from '.$out['author'].' deleted by <b><a href="'.DOMAIN.'profile/'.$deleter.'">'.$deleter_name.'</a></b>, <strong><span class="help" title="'.format_date($delete_time).'">'.calculate_age($delete_time).' ago</span></strong> <a href="#reply_'.$reply_id.'" onClick="showDeleted('.$reply_id.', this);return false;" id="reply_button_'.$reply_id.'">[show]</a></center></h3>';
echo '<h3 id="reply_'.$reply_id.'_info" class="highlighted"><center>Reply #'.$reply_id.' from '.$out['author'].' deleted by <b><a href="'.DOMAIN.'profile/'.sanitize('uid', $deleter).'">'.$deleter_name.'</a></b>, <strong><span class="help" title="'.format_date($delete_time).'">'.calculate_age($delete_time).' ago</span></strong> <a href="#reply_'.$reply_id.'" onClick="showDeleted('.$reply_id.', this);return false;" id="reply_button_'.$reply_id.'">[show]</a></center></h3>';
} elseif ($reply_hidden) {
$styleHidden = 'style="display:none" ';
echo '<h3 id="reply_'.$reply_id.'_info" class="highlighted"><center>Reply #'.$reply_id.' from '.$out['author'].' was hidden <a href="#reply_'.$reply_id.'" onClick="showDeleted('.$reply_id.', this);return false;" id="reply_button_'.$reply_id.'">[show]</a></center></h3>';

0 comments on commit f025386

Please sign in to comment.