projects
/
atutor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
182ad22
)
Fix the javascript error that occurs when no content folder in the course but the...
author
cindy li
<cli@ocad.ca>
Thu, 11 Nov 2010 20:05:56 +0000
(20:05 -0000)
committer
cindy li
<cli@ocad.ca>
Thu, 11 Nov 2010 20:05:56 +0000
(20:05 -0000)
docs/include/classes/ContentManager.class.php
patch
|
blob
|
history
diff --git
a/docs/include/classes/ContentManager.class.php
b/docs/include/classes/ContentManager.class.php
index
9c70bd7
..
30423e5
100644
(file)
--- a/
docs/include/classes/ContentManager.class.php
+++ b/
docs/include/classes/ContentManager.class.php
@@
-836,10
+836,12
@@
function initContentMenu() {
ORDER BY ordering
LIMIT 1";
$result = mysql_query($sql, $this->db);
- $row = mysql_fetch_assoc($result);
// print out javascript to expand the first content folder
- echo $this->get_js_expand_folder($row['content_id']);
+ if (mysql_num_rows($result)) {
+ $row = mysql_fetch_assoc($result);
+ echo $this->get_js_expand_folder($row['content_id']);
+ }
}
echo '}'; // end of javascript function initContentMenu()
}