Skip to content

Commit

Permalink
Update edit.php interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick committed Jan 18, 2015
1 parent 498f8ec commit c778631
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
message($lang['Bad request'], false, '404 Not Found');

// Fetch some info about the post, the topic and the forum
$result = $db->query('SELECT f.id AS fid, f.forum_name, f.moderators, fp.post_replies, fp.post_topics, t.id AS tid, t.subject, t.posted, t.first_post_id, t.sticky, t.closed, p.poster, p.poster_id, p.message, p.hide_smilies FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'topics AS t ON t.id=p.topic_id INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$luna_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND p.id='.$id) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
$result = $db->query('SELECT f.id AS fid, f.forum_name, f.moderators, f.color, fp.post_replies, fp.post_topics, t.id AS tid, t.subject, t.posted, t.first_post_id, t.sticky, t.closed, p.poster, p.poster_id, p.message, p.hide_smilies FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'topics AS t ON t.id=p.topic_id INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$luna_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND p.id='.$id) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
if (!$db->num_rows($result))
message($lang['Bad request'], false, '404 Not Found');

Expand Down
2 changes: 1 addition & 1 deletion include/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Version {
const FORUM_VERSION = '0.3-dev';

// The Luna Core version
const FORUM_CORE_VERSION = '0.3.3667';
const FORUM_CORE_VERSION = '0.3.3670';

// The database version number, every change in the database requires this number to go one up
const FORUM_DB_VERSION = '87.14';
Expand Down
11 changes: 8 additions & 3 deletions style/Sunrise/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@
if (!defined('FORUM'))
exit;

?>
$jumbo_style = 'style="background:'.$cur_post['color'].';"';

<div class="btn-group btn-breadcrumb">
<a class="btn btn-primary" href="viewtopic.php?id=<?php echo $cur_post['tid'] ?>"><span class="fa fa-chevron-left"></span> <?php echo luna_htmlspecialchars($cur_post['subject']) ?></a>
?>
</div>
<div class="jumbotron<?php echo $item_status ?>"<?php echo $jumbo_style ?>>
<div class="container">
<h2>Edit "<?php echo luna_htmlspecialchars($cur_post['subject']) ?>"</h2><span class="pull-right"><a class="btn btn-danger" href="viewtopic.php?id=<?php echo $cur_post['tid'] ?>"><span class="fa fa-chevron-left"></span> Cancel</a></span>
</div>
</div>
<div class="container">
<?php draw_error_panel($errors); ?>
<?php draw_preview_panel($message); ?>

Expand Down

0 comments on commit c778631

Please sign in to comment.