Skip to content

Commit

Permalink
fix a few outstanding errors, prep for v1.2.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Krytic committed Nov 14, 2016
1 parent 2a028ae commit 5f5e29d
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 27 deletions.
3 changes: 2 additions & 1 deletion Upload/admin/modules/wiki/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@
else
{
$name = $db->escape_string($mybb->input['cat_title']);
$desc = $db->escape_string($mybb->input['cat_desc']);

$query = $db->write_query("INSERT INTO " . TABLE_PREFIX . "wiki_categories(title) VALUES('" . $name . "')");
$query = $db->write_query("INSERT INTO " . TABLE_PREFIX . "wiki_categories(title, description) VALUES('{$name}', '{$desc}')");

if(!$query)
{
Expand Down
1 change: 1 addition & 0 deletions Upload/inc/languages/english/wiki.lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
$l['wiki_talk_prefix'] = "Talk: ";
$l['wiki_categories_header'] = "Categories";
$l['wiki_view_all'] = "View All";
$l['wiki_now_viewing'] = "Now viewing: {1} — {2}";
/* --- Error Messages --- */
$l['oops'] = "The Wiki has been disabled!";
$l['invalid_article'] = "No article exists with that id.";
Expand Down
2 changes: 1 addition & 1 deletion Upload/inc/plugins/wiki.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function wiki_activate()
// And so the fun begins.

$ins = array(
"tid" => NULL,
"tid" => 0,
"title" => "wiki_" . $file->getBasename('.html'),
"template" => $db->escape_string(file_get_contents($file->getPathname())),
"sid" => "-2",
Expand Down
5 changes: 4 additions & 1 deletion Upload/inc/plugins/wiki/templates/category_desc.html
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
— {$category_desc}
<div class="alert-message">
<p>{$category_desc}</p>
<p>{$category_desc}</p>
</div>
4 changes: 1 addition & 3 deletions Upload/inc/plugins/wiki/templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@
</td>
</tr>
</table>
<div>
{$category_desc}
</div>
</div>
<div class="wiki_list">
{$category_desc}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="3"><span><strong>{$lang->wiki}</strong></span> <span style="float: right;"><a href="wiki.php?action=new">{$lang->new}</a>{$exportbit}</span></td>
Expand Down
33 changes: 20 additions & 13 deletions Upload/inc/plugins/wiki/templates/stylesheets/wiki.css
Original file line number Diff line number Diff line change
Expand Up @@ -84,21 +84,28 @@ ul.btn-group li a:active{
float: left;
}

/**
* From the bootstrap project
* http://getbootstrap.com
*/
.well {
min-height:10px;
padding:12px;
margin-bottom:20px;
background-color:#f5f5f5;
border:1px solid #e3e3e3;
border-radius:4px;
-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);
box-shadow:inset 0 1px 1px rgba(0,0,0,.05)
div.alert-message {
display: block;
padding: 13px 12px 12px;
font-weight: bold;
font-size: 14px;
color: white;
background-color: #2ba6cb;
border: 1px solid rgba(0, 0, 0, 0.1);
margin-bottom: 12px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
text-shadow: 0 -1px rgba(0, 0, 0, 0.3);
position: relative;
}
div.alert-message p {
margin: 0px;
}

#logo ul.top_links a.wiki {
background-image: url('../../../images/wiki_icon.png');
}

11 changes: 3 additions & 8 deletions Upload/wiki.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@
eval("\$protectedbit = \"".$templates->get("wiki_protectedbit")."\";");
}



add_breadcrumb($wiki['title']);

if($settings['wiki_mybbparser'])
Expand Down Expand Up @@ -386,11 +384,8 @@

$sql = $db->write_query(
sprintf(
"UPDATE `%swiki`
SET `content`='{$message}', `authors`='{$authors}', `lastauthor`='{$mybb->user['username']}', `lastauthorid`='{$mybb->user['uid']}', `notepad`='{$notes}'
WHERE `id`='{$id}'", TABLE_PREFIX
)
);
"UPDATE `%swiki`", TABLE_PREFIX) . "SET `content`='{$message}', `authors`='{$authors}', `lastauthor`='{$mybb->user['username']}', `lastauthorid`='{$mybb->user['uid']}', `notepad`='{$notes}'
WHERE `id`='{$id}'");

$sql = $db->write_query(sprintf("INSERT INTO %swiki_edits(`aid`,`author`,`revision`) VALUES('{$id}','{$mybb->user['uid']}','{$message}')", TABLE_PREFIX));

Expand Down Expand Up @@ -577,7 +572,7 @@

$wikilist = "";

$category_desc = $category_index[$cid]['description'];
$category_desc = $lang->sprintf($lang->wiki_now_viewing, $category_index[$cid]['title'], $category_index[$cid]['description']);
eval("\$category_desc = \"".$templates->get("wiki_category_desc")."\";");

if($db->num_rows($query) > 0)
Expand Down

0 comments on commit 5f5e29d

Please sign in to comment.