diff options
| author | Sem <sembrestels@riseup.net> | 2014-01-22 04:05:47 +0100 | 
|---|---|---|
| committer | Sem <sembrestels@riseup.net> | 2014-01-22 04:05:47 +0100 | 
| commit | 68614b769f4ae4f28c3f395f47b68baba7c48c64 (patch) | |
| tree | 2c5a744a3859d27883f92b72aef9cf81f1a947d0 /engine/classes/ElggWidget.php | |
| parent | 69e2d8c5d8732042c9319aef1fdea45a82b63e42 (diff) | |
| parent | c0295c275d6edbca6c6c8bb51dc199150d0d5fc3 (diff) | |
| download | elgg-68614b769f4ae4f28c3f395f47b68baba7c48c64.tar.gz elgg-68614b769f4ae4f28c3f395f47b68baba7c48c64.tar.bz2  | |
Merge branch 'release/1.8.1'
Diffstat (limited to 'engine/classes/ElggWidget.php')
| -rw-r--r-- | engine/classes/ElggWidget.php | 12 | 
1 files changed, 11 insertions, 1 deletions
diff --git a/engine/classes/ElggWidget.php b/engine/classes/ElggWidget.php index 99708f66a..66191bf47 100644 --- a/engine/classes/ElggWidget.php +++ b/engine/classes/ElggWidget.php @@ -7,6 +7,11 @@   *   * @package    Elgg.Core   * @subpackage Widgets + * + * @property-read string $handler internal, do not use + * @property-read string $column internal, do not use + * @property-read string $order internal, do not use + * @property-read string $context internal, do not use   */  class ElggWidget extends ElggObject { @@ -141,10 +146,15 @@ class ElggWidget extends ElggObject {  			}  		} +		$bottom_rank = count($widgets); +		if ($column == $this->column) { +			$bottom_rank--; +		} +		  		if ($rank == 0) {  			// top of the column  			$this->order = reset($widgets)->order - 10; -		} elseif ($rank == (count($widgets) - 1)) { +		} elseif ($rank == $bottom_rank) {  			// bottom of the column of active widgets  			$this->order = end($widgets)->order + 10;  		} else {  | 
