Created
July 25, 2012 17:55
-
-
Save betweenbrain/3177533 to your computer and use it in GitHub Desktop.
Add Last Updated option to DOCman Lister Module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: modules/mod_docman_lister/mod_docman_lister.php | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- modules/mod_docman_lister/mod_docman_lister.php (revision 8471095389776d5ccbf4e639ec0a9be1dc8bc55d) | |
+++ modules/mod_docman_lister/mod_docman_lister.php (revision ) | |
@@ -102,6 +102,11 @@ | |
$order = "name"; | |
$dir = "DESC"; | |
break; | |
+ case 6: | |
+ // Last updated | |
+ $order = "latest"; | |
+ $dir = "DESC"; | |
+ break; | |
} | |
$rows = DOCMAN_Docs::getDocsByUserAccess($cat_limit, $order, $dir, $limits); | |
\ No newline at end of file | |
Index: modules/mod_docman_lister/mod_docman_lister.xml | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- modules/mod_docman_lister/mod_docman_lister.xml (revision 8471095389776d5ccbf4e639ec0a9be1dc8bc55d) | |
+++ modules/mod_docman_lister/mod_docman_lister.xml (revision ) | |
@@ -54,6 +54,7 @@ | |
<option value="3">Oldest first</option> | |
<option value="4">Alphabetically</option> | |
<option value="5">Alphabetically, reverse</option> | |
+ <option value="6">Last updated</option> | |
</field> | |
<field name="cache" type="radio" default="0" label="Enable Cache" description="Select whether to cache the content of this module"> | |
<option value="0">No</option> | |
Index: administrator/components/com_docman/classes/DOCMAN_utils.class.php | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- administrator/components/com_docman/classes/DOCMAN_utils.class.php (revision 8471095389776d5ccbf4e639ec0a9be1dc8bc55d) | |
+++ administrator/components/com_docman/classes/DOCMAN_utils.class.php (revision ) | |
@@ -904,6 +904,8 @@ | |
break; | |
case 'hits' : $ordering = 'd.dmcounter'; | |
break; | |
+ case 'latest' : $ordering = 'd.dmlastupdateon'; | |
+ break; | |
default : | |
$ordering = 'd.dmname'; | |
} | |
\ No newline at end of file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment