Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Query.php |
— | — | @@ -55,11 +55,7 @@ |
56 | 56 | */ |
57 | 57 | public function __construct( $description = null, $inline = false, $concept = false ) { |
58 | 58 | global $smwgQMaxLimit, $smwgQMaxInlineLimit; |
59 | | - if ( $inline ) { |
60 | | - $this->m_limit = $smwgQMaxInlineLimit; |
61 | | - } else { |
62 | | - $this->m_limit = $smwgQMaxLimit; |
63 | | - } |
| 59 | + $this->m_limit = $inline ? $smwgQMaxInlineLimit : $smwgQMaxLimit; |
64 | 60 | $this->m_inline = $inline; |
65 | 61 | $this->m_concept = $concept; |
66 | 62 | $this->m_description = $description; |
— | — | @@ -145,12 +141,8 @@ |
146 | 142 | */ |
147 | 143 | public function setLimit( $limit, $restrictinline = true ) { |
148 | 144 | global $smwgQMaxLimit, $smwgQMaxInlineLimit; |
149 | | - if ( $this->m_inline && $restrictinline ) { |
150 | | - $maxlimit = $smwgQMaxInlineLimit; |
151 | | - } else { |
152 | | - $maxlimit = $smwgQMaxLimit; |
153 | | - } |
154 | | - $this->m_limit = min( $maxlimit - $this->m_offset, $limit ); |
| 145 | + $maxlimit = ( $this->m_inline && $restrictinline ) ? $smwgQMaxInlineLimit : $smwgQMaxLimit; |
| 146 | + $this->m_limit = min( $smwgQMaxLimit - $this->m_offset, $limit, $maxlimit ); |
155 | 147 | return $this->m_limit; |
156 | 148 | } |
157 | 149 | |