Commit e21c8812 authored by Steven Wittens's avatar Steven Wittens
Browse files

Tiny change to drupal_directory_page() in drupal.module to allow the site list...

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, ...).
parent b84b6e42
......@@ -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 .= "<a href=\"$site->link\">$site->name</a> - $site->slogan<div style=\"padding-left: 20px;\">$site->mission</div><br />";
......
......@@ -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 .= "<a href=\"$site->link\">$site->name</a> - $site->slogan<div style=\"padding-left: 20px;\">$site->mission</div><br />";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment