Skip to content

Commit

Permalink
#5139 Fix custom block manager plugin; remove extraneous code
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Oct 9, 2019
1 parent 5af8e97 commit a76bac7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion classes/install/Installer.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ function migrateSidebarBlocks() {
$sidebarSettings = [];
while (!$result->EOF) {
$row = $result->getRowAssoc(false);
if ($row['setting_value'] != BLOCK_CONTEXT_SIDEBAR) {
if ($row['setting_value'] != 1) { // BLOCK_CONTEXT_SIDEBAR
$result->MoveNext();
}
$seq = $pluginSettingsDao->getSetting($row['context_id'], $row['plugin_name'], 'seq');
Expand Down
13 changes: 0 additions & 13 deletions classes/plugins/BlockPlugin.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
* @brief Abstract class for block plugins
*/

define('BLOCK_CONTEXT_SIDEBAR', 0x00000001);
define('BLOCK_CONTEXT_HOMEPAGE', 0x00000003);

import('lib.pkp.classes.plugins.LazyLoadPlugin');

abstract class BlockPlugin extends LazyLoadPlugin {
Expand Down Expand Up @@ -43,16 +40,6 @@ function setEnabled($enabled, $contextId = null) {
$this->updateSetting(is_null($contextId) ? $this->getCurrentContextId() : $contextId, 'enabled', $enabled, 'bool');
}


/**
* Get the supported contexts (e.g. BLOCK_CONTEXT_...) for this block.
*
* @return array
*/
function getSupportedContexts() {
return array(BLOCK_CONTEXT_SIDEBAR);
}

/**
* Get the filename of the template block. (Default behavior may
* be overridden through some combination of this function and the
Expand Down

0 comments on commit a76bac7

Please sign in to comment.