diff options
-rw-r--r-- | core/models/item.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/models/item.php b/core/models/item.php index 4481a3a9..99a9c32a 100644 --- a/core/models/item.php +++ b/core/models/item.php @@ -184,8 +184,12 @@ class Item_Model extends ORM_MPTT { public function __get($column) { if (substr($column, -5) == "_edit") { $real_column = substr($column, 0, strlen($column) - 5); - return "<span class=\"gInPlaceEdit gEditField-{$this->id}-{$real_column}\">" . - "{$this->$real_column}</span>"; + if (Session::instance()->get("user", false)) { + return "<span class=\"gInPlaceEdit gEditField-{$this->id}-{$real_column}\">" . + "{$this->$real_column}</span>"; + } else { + return parent::__get($real_column); + } } else if ($column == "owner") { // This relationship depends on an outside module, which may not be present so handle // failures gracefully. |