From e21c8812eaf35f5e3fad9521de4c918dd47a114f Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Thu, 9 Sep 2004 10:24:10 +0000 Subject: Tiny change to drupal_directory_page() in drupal.module to allow the site list to be sorted on any column (alphabetical is prone to abuse by prefixing the site name with quotes, dashes, hash, ...). --- modules/drupal/drupal.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/drupal') diff --git a/modules/drupal/drupal.module b/modules/drupal/drupal.module index b5f417f72..388b8dac6 100644 --- a/modules/drupal/drupal.module +++ b/modules/drupal/drupal.module @@ -111,8 +111,8 @@ function drupal_directory_ping($arguments) { * This function may be called from a custom page on sites that are * Drupal directory servers. */ -function drupal_directory_page() { - $result = db_query('SELECT * FROM {directory} ORDER BY name'); +function drupal_directory_page($sort = 'name') { + $result = db_query('SELECT * FROM {directory} ORDER BY '. $sort); while ($site = db_fetch_object($result)) { $output .= "link\">$site->name - $site->slogan
$site->mission

"; -- cgit v1.2.3