[Phpbbkb-checkins] SF.net SVN: phpbbkb: [51] main/trunk
Status: Alpha
Brought to you by:
markthedaemon
|
From: <mar...@us...> - 2007-02-15 00:38:25
|
Revision: 51
http://svn.sourceforge.net/phpbbkb/?rev=51&view=rev
Author: markthedaemon
Date: 2007-02-14 16:38:22 -0800 (Wed, 14 Feb 2007)
Log Message:
-----------
Some changes:
- Added a "There are no articles in this category." message as per bug #9
- Committing the constants.php file with the KB page constant in it, not sure if I have committed this or not :\.
Modified Paths:
--------------
main/trunk/admin/admin_kb.php
main/trunk/includes/constants.php
main/trunk/kb.php
main/trunk/language/lang_english/lang_kb.php
main/trunk/templates/subSilver/images/Thumbs.db
main/trunk/templates/subSilver/images/lang_english/Thumbs.db
Modified: main/trunk/admin/admin_kb.php
===================================================================
--- main/trunk/admin/admin_kb.php 2007-02-14 04:48:07 UTC (rev 50)
+++ main/trunk/admin/admin_kb.php 2007-02-15 00:38:22 UTC (rev 51)
@@ -531,7 +531,7 @@
$sql = "SELECT cat_id, cat_title
FROM " . KB_CATEGORIES_TABLE . "
- WHERE cat_main = '0'
+ WHERE cat_main = '0'
ORDER BY cat_order ASC"; // At the moment only one level of subcats
if(!$result = $db->sql_query($sql))
{
Modified: main/trunk/includes/constants.php
===================================================================
--- main/trunk/includes/constants.php 2007-02-14 04:48:07 UTC (rev 50)
+++ main/trunk/includes/constants.php 2007-02-15 00:38:22 UTC (rev 51)
@@ -123,6 +123,7 @@
define('PAGE_PRIVMSGS', -10);
define('PAGE_GROUPCP', -11);
define('PAGE_TOPIC_OFFSET', 5000);
+define('PAGE_KB', -1345); // http://www.phpbb.com/kb/article.php?article_id=149
// Auth settings
@@ -180,4 +181,6 @@
define('VOTE_RESULTS_TABLE', $table_prefix.'vote_results');
define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');
+
+
?>
\ No newline at end of file
Modified: main/trunk/kb.php
===================================================================
--- main/trunk/kb.php 2007-02-14 04:48:07 UTC (rev 50)
+++ main/trunk/kb.php 2007-02-15 00:38:22 UTC (rev 51)
@@ -193,6 +193,9 @@
$subcats[] = $row;
}
+ if( ( $total_subcats = count($subcats) ) )
+ {
+
// Now articles, the LIKE handles multiple cats
// First handle the sorting
// default is by edit time, other options: -rating, -author, -title
@@ -240,12 +243,14 @@
{
$articles[] = $row;
}
+ $db->sql_freeresult($result);
+
// Start Page output
$page_title = $lang['kb_viewcat'] . ": " . $cat['cat_title'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
- if($cat['cat_main'] == "0")
+ if( $cat['cat_main'] == "0" )
{
create_navigation("viewcat", array(
0 => $cat['cat_id'],
@@ -323,7 +328,7 @@
{
$authorname = $articles[$i]['article_authorname'];
}
- $author = "<a href=\"profile." . $phpEx . "?mode=viewprofile&u=" . $articles[$i]['article_author'] . "\">$authorname</a>";
+ $author = "<a href=\"profile.$phpEx?mode=viewprofile&u=" . $articles[$i]['article_author'] . "\">$authorname</a>";
$sql = "SELECT username
FROM " . USERS_TABLE . "
@@ -348,6 +353,13 @@
}
}
+ }// if ... total_categories
+ else
+ {
+ message_die(GENERAL_MESSAGE, $lang['No_articles']);
+ }
+
+
//
// Generate the page
//
Modified: main/trunk/language/lang_english/lang_kb.php
===================================================================
--- main/trunk/language/lang_english/lang_kb.php 2007-02-14 04:48:07 UTC (rev 50)
+++ main/trunk/language/lang_english/lang_kb.php 2007-02-15 00:38:22 UTC (rev 51)
@@ -94,4 +94,6 @@
$lang['kbadm_sortcat_success'] = "The category has been moved as specified.";
$lang['No_kbadm_cats'] = "No knowledge base categories has been added. Click %shere%s to create a new one.";
+
+$lang['No_articles'] = "There are no articles in this category.";
?>
\ No newline at end of file
Modified: main/trunk/templates/subSilver/images/Thumbs.db
===================================================================
(Binary files differ)
Modified: main/trunk/templates/subSilver/images/lang_english/Thumbs.db
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|