瀏覽代碼

#40 - help text, reverse order in block log

Alex Trofimov 12 年之前
父節點
當前提交
34d1ffb902

+ 3 - 2
inc/classes/BxDolGrid.php

@@ -250,6 +250,7 @@ class BxDolGrid extends BxDol implements iBxDolFactoryObject {
 
     protected $_sObject;
     protected $_aOptions;
+    protected $_sDefaultSortingOrder = 'ASC';
 
     /**
      * Constructor
@@ -472,11 +473,11 @@ class BxDolGrid extends BxDol implements iBxDolFactoryObject {
         } elseif (!empty($this->_aOptions['field_order'])) { // order by "order" field
 
             if (false == strpos($this->_aOptions['field_order'], ',')) {
-                $sOrderClause = " ORDER BY `" . $this->_aOptions['field_order'] . "` ASC";
+                $sOrderClause = " ORDER BY `" . $this->_aOptions['field_order'] . "` " . $this->_sDefaultSortingOrder;
             } else {
                 $a = explode(',', $this->_aOptions['field_order']);                
                 foreach ($a as $sField)
-                    $sOrderClause .= "`" . trim($sField) . "` ASC, ";
+                    $sOrderClause .= "`" . trim($sField) . "` " . $this->_sDefaultSortingOrder . ", ";
                 if ($sOrderClause)
                     $sOrderClause = " ORDER BY " . trim($sOrderClause, ', ');
             }

+ 1 - 0
modules/boonex/antispam/classes/BxAntispamGridBlockLog.php

@@ -19,6 +19,7 @@ class BxAntispamGridBlockLog extends BxTemplGrid
     public function __construct ($aOptions, $oTemplate = false) 
     {
         parent::__construct ($aOptions, $oTemplate);
+        $this->_sDefaultSortingOrder = 'DESC';
     }
 
     protected function _getCellIp ($mixedValue, $sKey, $aField, $aRow) 

+ 9 - 1
modules/boonex/antispam/install/langs/en.xml

@@ -3,7 +3,15 @@
 
 	<string name="_bx_antispam"><![CDATA[Antispam]]></string>
     <string name="_bx_antispam_help"><![CDATA[Help]]></string>
-    <string name="_bx_antispam_help_text"><![CDATA[TODO: help text here]]></string>
+    <string name="_bx_antispam_help_text"><![CDATA[This module allows to limit spam on the site, there are different build-in tools for this:
+<ul>
+    <li><b>IP table</b> - manual IP blocking/whitelisting</li>
+    <li><b>DNSBL</b> - automatic blocking by IP from different block lists</li>
+    <li><b>URI DNSBL</b> - automatic blocking of spam content by spam URLs in the text</li>
+    <li><b>Akismet</b> - automatic spam content blocking using <a target="_blank" href="http://akismet.com">Akismet service</a></li>
+    <li><b>StopForumSpam</b> - automatic spam content blocking using <a target="_blank" href="http://www.stopforumspam.com">StopForumSpam service</a></li>
+</ul>
+]]></string>
     <string name="_bx_antispam_help_dnsbl"><![CDATA[
 DNSBL - <a href="http://en.wikipedia.org/wiki/DNSBL">Domain Name Service Block Lists</a>.
 This functionality allows to block by IP address if it exists in one of available blocklists.