@@ 772-796 (lines=25) @@ | ||
769 | */ |
|
770 | Symphony::ExtensionManager()->notifyMembers('PagePreCreate', '/blueprints/pages/', array('fields' => &$fields)); |
|
771 | ||
772 | if (!$page_id = PageManager::add($fields)) { |
|
773 | $this->pageAlert( |
|
774 | __('Unknown errors occurred while attempting to save.') |
|
775 | . '<a href="' . SYMPHONY_URL . '/system/log/">' |
|
776 | . __('Check your activity log') |
|
777 | . '</a>.', |
|
778 | Alert::ERROR |
|
779 | ); |
|
780 | } else { |
|
781 | /** |
|
782 | * Just after the creation of a new page in `tbl_pages` |
|
783 | * |
|
784 | * @delegate PagePostCreate |
|
785 | * @since Symphony 2.2 |
|
786 | * @param string $context |
|
787 | * '/blueprints/pages/' |
|
788 | * @param integer $page_id |
|
789 | * The ID of the newly created Page |
|
790 | * @param array $fields |
|
791 | * An associative array of data that was just saved for this page |
|
792 | */ |
|
793 | Symphony::ExtensionManager()->notifyMembers('PagePostCreate', '/blueprints/pages/', array('page_id' => $page_id, 'fields' => &$fields)); |
|
794 | ||
795 | $redirect = "/blueprints/pages/edit/{$page_id}/created/{$parent_link_suffix}"; |
|
796 | } |
|
797 | ||
798 | // Update existing: |
|
799 | } else { |
|
@@ 816-840 (lines=25) @@ | ||
813 | */ |
|
814 | Symphony::ExtensionManager()->notifyMembers('PagePreEdit', '/blueprints/pages/', array('page_id' => $page_id, 'fields' => &$fields)); |
|
815 | ||
816 | if (!PageManager::edit($page_id, $fields, true)) { |
|
817 | return $this->pageAlert( |
|
818 | __('Unknown errors occurred while attempting to save.') |
|
819 | . '<a href="' . SYMPHONY_URL . '/system/log/">' |
|
820 | . __('Check your activity log') |
|
821 | . '</a>.', |
|
822 | Alert::ERROR |
|
823 | ); |
|
824 | } else { |
|
825 | /** |
|
826 | * Just after updating a page in `tbl_pages` |
|
827 | * |
|
828 | * @delegate PagePostEdit |
|
829 | * @since Symphony 2.2 |
|
830 | * @param string $context |
|
831 | * '/blueprints/pages/' |
|
832 | * @param integer $page_id |
|
833 | * The ID of the Page that was just updated |
|
834 | * @param array $fields |
|
835 | * An associative array of data that was just saved for this page |
|
836 | */ |
|
837 | Symphony::ExtensionManager()->notifyMembers('PagePostEdit', '/blueprints/pages/', array('page_id' => $page_id, 'fields' => $fields)); |
|
838 | ||
839 | $redirect = "/blueprints/pages/edit/{$page_id}/saved/{$parent_link_suffix}"; |
|
840 | } |
|
841 | } |
|
842 | } |
|
843 |