Skip to content

Commit

Permalink
only add head elements where they are actually used
Browse files Browse the repository at this point in the history
  • Loading branch information
flack committed Aug 19, 2018
1 parent 26ff445 commit 52cffbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 3 additions & 0 deletions lib/org/openpsa/documents/handler/document/view.php
Expand Up @@ -9,6 +9,7 @@
use midcom\datamanager\datamanager;
use midcom\grid\provider\client;
use midcom\grid\provider;
use midcom\grid\grid;

/**
* org.openpsa.documents document handler and viewer class.
Expand Down Expand Up @@ -160,6 +161,8 @@ public function _handler_view($handler_id, array $args, array &$data)

org_openpsa_widgets_ui::enable_ui_tab();
org_openpsa_widgets_contact::add_head_elements();
org_openpsa_widgets_tree::add_head_elements();
grid::add_head_elements();

midcom::get()->head->set_pagetitle($this->_document->title);

Expand Down
5 changes: 0 additions & 5 deletions lib/org/openpsa/documents/viewer.php
Expand Up @@ -6,8 +6,6 @@
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License
*/

use midcom\grid\grid;

/**
* org.openpsa.documents site interface class.
*
Expand All @@ -25,8 +23,5 @@ public function _on_handle($handler, array $args)

// Always run in uncached mode
midcom::get()->cache->content->no_cache();

grid::add_head_elements();
org_openpsa_widgets_tree::add_head_elements();
}
}

0 comments on commit 52cffbc

Please sign in to comment.