|
|
|
@ -46,12 +46,13 @@ class IntegerWeightSelector extends FieldPluginBase {
|
|
|
|
|
$options[$this->getValue($row)] = $this->getValue($row); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// If we were given some blank values we need to fill |
|
|
|
|
// If we were given some blank values, or less than the |
|
|
|
|
// total_rows for the view, we need to fill |
|
|
|
|
// out the option list from 1 through the result count |
|
|
|
|
// to make sure we have enough. (Blanks should only appear |
|
|
|
|
// at the beginning of the results list.) |
|
|
|
|
// Also, blank values will break the selector, remove it. |
|
|
|
|
if (array_key_exists('', $options)) { |
|
|
|
|
if (array_key_exists('', $options) || (count($options) < $this->view->total_rows)) { |
|
|
|
|
unset($options['']); |
|
|
|
|
for ($i = 1; $i <= $this->view->total_rows; $i++) { |
|
|
|
|
$options[$i] = $i; |
|
|
|
|