Hello!

I was looking at this code
http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/intersection/DynamicPageList.php?view=markup

and trying to figure out how to change this piece of code
----
    if ('lastedit' == $sOrderMethod)
        $sSqlWhere .= ' ORDER BY page_touched ';
    else
        $sSqlWhere .= ' ORDER BY c1.cl_timestamp ';

    $sSqlWhere .= $sSqlOrder;
----
in such way that the extension could order the list alphabetically.

I imagine it would be a simple change, like this:
----
    switch ($sOrderMethod)
    {
    case 'lastedit':
        $sSqlWhere .= ' ORDER BY page_touched ';
        break;
    case 'alphabetical':
        $sSqlWhere .= ' ORDER BY WHAT? ';
        break;
    case 'categoryadd':
    default:
        $sSqlWhere .= ' ORDER BY c1.cl_timestamp ';
        break;
    }
----

But I don't know what to use in the SQL instead of the "WHAT?".
Does anybody knows what should it be?

Thanks in advance!

Helder
_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to