Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Drupal: panels module - Fixed old style PHP4 constructors. #2986

Merged
merged 2 commits into from
Jan 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,17 @@ class panels_allowed_layouts {
* as allowed or not allowed on the initial call to panels_allowed_layouts::set_allowed()
*
*/
function panels_allowed_layouts($start_allowed = TRUE) {
function __construct($start_allowed = TRUE) {
// TODO would be nice if there was a way to just fetch the names easily
foreach ($this->list_layouts() as $layout_name) {
$this->allowed_layout_settings[$layout_name] = $start_allowed ? 1 : 0;
}
}

function panels_allowed_layouts($start_allowed = TRUE) {
self::__construct($start_allowed);
}

/**
* Manage panels_common_set_allowed_layouts(), the FAPI code for selecting allowed layouts.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class panels_cache_object {
/**
* When constructed, take a snapshot of our existing out of band data.
*/
function panels_cache_object() {
function __construct() {
$this->head = drupal_set_html_head();
$this->css = drupal_add_css();
$this->tokens = ctools_set_page_token();
Expand All @@ -133,6 +133,9 @@ class panels_cache_object {
}
}

function panels_cache_object() {
self::__construct();
}
/**
* Add content to the cache. This assumes a pure stream;
* use set_content() if it's something else.
Expand Down
4 changes: 2 additions & 2 deletions drupal/sites/default/boinc/modules/contrib/panels/panels.info
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package = "Panels"
dependencies[] = ctools

; Information added by Drupal.org packaging script on 2016-02-25
version = "6.x-3.12-boinc-2-dev"
version = "6.x-3.12-boinc-3-dev"
core = "6.x"
project = "panels"
datestamp = "1494600716"
datestamp = "1548705400"

Original file line number Diff line number Diff line change
Expand Up @@ -594,12 +594,16 @@ class panels_display {
var $did = 'new';
var $renderer;

function panels_display() {
function __construct() {
// Set the default renderer to either the legacy or the standard renderer,
// depending on the legacy rendering state
$this->renderer = variable_get('panels_legacy_rendering_mode', TRUE) ? 'legacy' : 'standard';
}

function panels_display() {
self::__construct();
}

function add_pane(&$pane, $location = NULL) {
// If no location specified, use what's set in the pane.
if (empty($location)) {
Expand Down