includes/namespaces/default.php
changeset 1252 e34c23a35dc9
parent 1227 bdac73ed481e
child 1292 0e2e476e90e8
equal deleted inserted replaced
1251:d543689ed2eb 1252:e34c23a35dc9
   748 				do
   748 				do
   749 				{
   749 				{
   750 					$cid = sanitize_page_id($row['category_id']);
   750 					$cid = sanitize_page_id($row['category_id']);
   751 					$title = get_page_title_ns($cid, 'Category');
   751 					$title = get_page_title_ns($cid, 'Category');
   752 					$link = makeUrlNS('Category', $cid);
   752 					$link = makeUrlNS('Category', $cid);
   753 					$list[] = '<a href="' . $link . '">' . htmlspecialchars($title) . '</a>';
   753 					$exists = isPage("{$paths->nslist['Category']}$cid") ? '' : ' class="wikilink-nonexistent"';
       
   754 					$list[] = '<a href="' . $link . '"' . $exists . '>' . htmlspecialchars($title) . '</a>';
   754 				}
   755 				}
   755 				while ( $row = $db->fetchrow($q) );
   756 				while ( $row = $db->fetchrow($q) );
   756 				$html .= implode(', ', $list);
   757 				$html .= implode(', ', $list);
   757 			}
   758 			}
   758 			else
   759 			else
   930 			$cdata['urlname'] = $cdata['namespace'] . $ns_char . $cdata['urlname'];
   931 			$cdata['urlname'] = $cdata['namespace'] . $ns_char . $cdata['urlname'];
   931 		}
   932 		}
   932 		
   933 		
   933 		// add missing keys
   934 		// add missing keys
   934 		$defaults = array(
   935 		$defaults = array(
       
   936 			'name' => dirtify_page_id(str_replace('_', ' ', $cdata['urlname'])),
   935 			'special' => 0,
   937 			'special' => 0,
   936 			'visible' => 0,
   938 			'visible' => 0,
   937 			'comments_on' => 1,
   939 			'comments_on' => 1,
   938 			'protected' => 0,
   940 			'protected' => 0,
   939 			'delvotes' => 0,
   941 			'delvotes' => 0,