Просмотр исходного кода

Fix Questions results stats page does not show minimum score - Refs #8121

José Loguercio 9 лет назад
Родитель
Сommit
821f12be35
1 измененных файлов с 6 добавлено и 5 удалено
  1. 6 5
      main/inc/lib/pear/HTML/Table/Storage.php

+ 6 - 5
main/inc/lib/pear/HTML/Table/Storage.php

@@ -769,17 +769,18 @@ class HTML_Table_Storage extends HTML_Common {
                     }
                     }
 
 
                     $typeContent = $tabs . $tab . $tab . $extraTab . "<$type" . $this->_getAttrString($attr) . '>';
                     $typeContent = $tabs . $tab . $tab . $extraTab . "<$type" . $this->_getAttrString($attr) . '>';
-
-                    if (empty($contents)) {
+                    
+                    if ($contents || is_numeric($contents)) {
+                        $typeContent .= $contents;
+                    } elseif (empty($contents)) {
                         if (isset($this->_autoFill) && $this->_autoFill) {
                         if (isset($this->_autoFill) && $this->_autoFill) {
                             $contents = $this->_autoFill;
                             $contents = $this->_autoFill;
                         }
                         }
-                    } else {
-                        $typeContent .= $contents;
                     }
                     }
+                    
                     $typeContent .= "</$type>" . $lnEnd;
                     $typeContent .= "</$type>" . $lnEnd;
 
 
-                    if (!empty($contents)) {
+                    if (!empty($contents) || is_numeric($contents)) {
                         $strHtml .= $typeContent;
                         $strHtml .= $typeContent;
                     }
                     }