(no commit message)
authorjoel kronenberg <joel.kronenberg@utoronto.ca>
Fri, 9 Dec 2005 18:09:51 +0000 (18:09 -0000)
committerjoel kronenberg <joel.kronenberg@utoronto.ca>
Fri, 9 Dec 2005 18:09:51 +0000 (18:09 -0000)
docs/tools/links/categories.php

index 6ce61e4..0436153 100644 (file)
@@ -69,13 +69,15 @@ if ($row = mysql_fetch_assoc($result)) { ?>
                        $sql_cat        = "SELECT CatName FROM ".TABLE_PREFIX."resource_categories WHERE course_id=$_SESSION[course_id] AND CatID=".$row['CatParent'];\r
                        $result_cat = mysql_query($sql_cat, $db);\r
                        $row_cat = mysql_fetch_assoc($result_cat);\r
-                       $parent_cat_name = $row_cat['CatName'];\r
-               } \r
+                       $parent_cat_name = AT_print($row_cat['CatName'], 'resource_categories.catname');\r
+               } else {\r
+                       $parent_cat_name = '<em>'._AT('none').'</em>';\r
+               }\r
        ?>\r
                <tr onmousedown="document.form['m<?php echo $row['CatID']; ?>'].checked = true;rowselect(this);" id="r_<?php echo $row['CatID']; ?>">\r
                        <td width="10"><input type="radio" name="cat_id" value="<?php echo $row['CatID']; ?>" id="m<?php echo $row['CatID']; ?>" /></td>\r
                        <td><label for="m<?php echo $row['CatID']; ?>"><?php echo AT_print($row['CatName'], 'members.first_name'); ?></label></td>\r
-                       <td><?php echo AT_print($parent_cat_name, 'members.last_name'); ?></td>\r
+                       <td><?php echo $parent_cat_name; ?></td>\r
                </tr>\r
 <?php  } while ($row = mysql_fetch_assoc($result)); ?>\r
        </tbody>\r