| 77 | | $result = $this->installSchema('schema.xml', '', "$old.xml"); |
|---|
| | 77 | if (version_compare($old, '0.8.0', '<')) { |
|---|
| | 78 | $result = $this->installSchema('schema.xml', '', "$old.xml"); |
|---|
| | 79 | if (Jaws_Error::IsError($result)) { |
|---|
| | 80 | return $result; |
|---|
| | 81 | } |
|---|
| | 82 | |
|---|
| | 83 | $result = $this->installSchema('insert.xml', '', 'schema.xml', true); |
|---|
| | 84 | if (Jaws_Error::IsError($result)) { |
|---|
| | 85 | return $result; |
|---|
| | 86 | } |
|---|
| | 87 | |
|---|
| | 88 | // ACL keys |
|---|
| | 89 | $GLOBALS['app']->ACL->NewKey('/ACL/gadgets/Poll/ManagePolls', 'true'); |
|---|
| | 90 | $GLOBALS['app']->ACL->NewKey('/ACL/gadgets/Poll/ManageGroups', 'true'); |
|---|
| | 91 | $GLOBALS['app']->ACL->NewKey('/ACL/gadgets/Poll/ViewReports', 'true'); |
|---|
| | 92 | $GLOBALS['app']->ACL->DeleteKey('/ACL/gadgets/Poll/AddPoll'); |
|---|
| | 93 | $GLOBALS['app']->ACL->DeleteKey('/ACL/gadgets/Poll/EditPoll'); |
|---|
| | 94 | $GLOBALS['app']->ACL->DeleteKey('/ACL/gadgets/Poll/DeletePoll'); |
|---|
| | 95 | $GLOBALS['app']->ACL->DeleteKey('/ACL/gadgets/Poll/UpdateProperties'); |
|---|
| | 96 | |
|---|
| | 97 | // Registry keys. |
|---|
| | 98 | $GLOBALS['app']->Registry->NewKey('/gadgets/Poll/cookie_period', '150'); |
|---|
| | 99 | } |
|---|
| | 100 | |
|---|
| | 101 | //rename layout action |
|---|
| | 102 | $layoutModel = $GLOBALS['app']->LoadGadget('Layout', 'AdminModel'); |
|---|
| | 103 | $result = $layoutModel->ChangeGadgetActionName('Poll', 'Display', 'ViewPoll'); |
|---|
| 81 | | |
|---|
| 82 | | $result = $this->installSchema('insert.xml', '', 'schema.xml', true); |
|---|
| 83 | | if (Jaws_Error::IsError($result)) { |
|---|
| 84 | | return $result; |
|---|
| 85 | | } |
|---|
| 86 | | |
|---|
| 87 | | // ACL keys |
|---|
| 88 | | $GLOBALS['app']->ACL->NewKey('/ACL/gadgets/Poll/ManagePolls', 'true'); |
|---|
| 89 | | $GLOBALS['app']->ACL->NewKey('/ACL/gadgets/Poll/ManageGroups', 'true'); |
|---|
| 90 | | $GLOBALS['app']->ACL->NewKey('/ACL/gadgets/Poll/ViewReports', 'true'); |
|---|
| 91 | | $GLOBALS['app']->ACL->DeleteKey('/ACL/gadgets/Poll/AddPoll'); |
|---|
| 92 | | $GLOBALS['app']->ACL->DeleteKey('/ACL/gadgets/Poll/EditPoll'); |
|---|
| 93 | | $GLOBALS['app']->ACL->DeleteKey('/ACL/gadgets/Poll/DeletePoll'); |
|---|
| 94 | | $GLOBALS['app']->ACL->DeleteKey('/ACL/gadgets/Poll/UpdateProperties'); |
|---|
| 95 | | |
|---|
| 96 | | // Registry keys. |
|---|
| 97 | | $GLOBALS['app']->Registry->NewKey('/gadgets/Poll/cookie_period', '150'); |
|---|