Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

Plugin follow-up from pkp/pkp-lib#3578. #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion controllers/grid/BaseLocaleFileGridHandler.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function authorize($request, &$args, $roleAssignments) {
}

/**
* @copydoc Gridhandler::initialize()
* @copydoc GridHandler::initialize()
*/
function initialize($request, $args = null) {
parent::initialize($request, $args);
Expand Down
6 changes: 3 additions & 3 deletions controllers/grid/EmailGridHandler.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ class EmailGridHandler extends BaseLocaleFileGridHandler {
// Overridden template methods
//
/**
* @copydoc Gridhandler::initialize()
* @copydoc BaseLocaleFileGridHandler::initialize()
*/
function initialize($request) {
parent::initialize($request);
function initialize($request, $args = null) {
parent::initialize($request, $args);

// Set the grid details.
$this->setTitle('plugins.generic.translator.emails');
Expand Down
4 changes: 2 additions & 2 deletions controllers/grid/EmailGridRow.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ function __construct($tabsSelector, $locale) {
/**
* @copydoc GridRow::initialize()
*/
function initialize($request) {
parent::initialize($request);
function initialize($request, $template = null) {
parent::initialize($request, $template);
$router = $request->getRouter();
$data = $this->getData();

Expand Down
6 changes: 3 additions & 3 deletions controllers/grid/LocaleFileGridHandler.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ class LocaleFileGridHandler extends BaseLocaleFileGridHandler {
// Overridden template methods
//
/**
* @copydoc Gridhandler::initialize()
* @copydoc BaseLocaleFileGridHandler::initialize()
*/
function initialize($request) {
parent::initialize($request);
function initialize($request, $args = null) {
parent::initialize($request, $args);

// Set the grid details.
$this->setTitle('plugins.generic.translator.localeFiles');
Expand Down
4 changes: 2 additions & 2 deletions controllers/grid/LocaleFileGridRow.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ function __construct($tabsSelector, $locale) {
/**
* @copydoc GridRow::initialize()
*/
function initialize($request) {
parent::initialize($request);
function initialize($request, $template = null) {
parent::initialize($request, $template);
$router = $request->getRouter();
$data = $this->getData();

Expand Down
2 changes: 1 addition & 1 deletion controllers/grid/LocaleGridHandler.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function authorize($request, &$args, $roleAssignments) {
}

/**
* @copydoc Gridhandler::initialize()
* @copydoc GridHandler::initialize()
*/
function initialize($request, $args = null) {
parent::initialize($request, $args);
Expand Down
4 changes: 2 additions & 2 deletions controllers/grid/LocaleGridRow.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ function __construct($tabsSelector) {
/**
* @copydoc GridRow::initialize()
*/
function initialize($request) {
parent::initialize($request);
function initialize($request, $template = null) {
parent::initialize($request, $template);
$router = $request->getRouter();

$actionArgs = array(
Expand Down
6 changes: 3 additions & 3 deletions controllers/grid/MiscTranslationFileGridHandler.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ class MiscTranslationFileGridHandler extends BaseLocaleFileGridHandler {
// Overridden template methods
//
/**
* @copydoc Gridhandler::initialize()
* @copydoc BaseLocaleFileGridHandler::initialize()
*/
function initialize($request) {
parent::initialize($request);
function initialize($request, $args = null) {
parent::initialize($request, $args);

// Set the grid details.
$this->setTitle('plugins.generic.translator.miscFiles');
Expand Down
10 changes: 5 additions & 5 deletions controllers/listbuilder/LocaleFileListbuilderHandler.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ function __construct() {
// Overridden template methods
//
/**
* @copydoc SetupListbuilderHandler::initialize()
* @copydoc ListbuilderHandler::initialize()
*/
function initialize($request) {
parent::initialize($request);
function initialize($request, $args = null) {
parent::initialize($request, $args);
$context = $request->getContext();

$this->setTitle('plugins.generic.translator.localeFileContents');
Expand Down Expand Up @@ -93,9 +93,9 @@ function initialize($request) {
}

/**
* @copydoc GridHandler::loadData()
* @copydoc ListbuilderHandler::loadData()
*/
function loadData($request) {
function loadData($request, $filter = null) {
import('lib.pkp.classes.file.EditableLocaleFile');
$referenceLocaleContents = EditableLocaleFile::load(str_replace($this->locale, MASTER_LOCALE, $this->filename));
$localeContents = file_exists($this->filename)?EditableLocaleFile::load($this->filename):array();
Expand Down