Skip to content

Commit

Permalink
Rename plugin and use GPL3
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnyga committed Mar 10, 2020
1 parent 92a3aff commit 9c3c340
Show file tree
Hide file tree
Showing 6 changed files with 710 additions and 153 deletions.
791 changes: 671 additions & 120 deletions LICENSE

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Returning Author Screening Plugin

For OPS 3.2.0 or higher

Rules: Authors can only publish if they have prior publications on the same server.

Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php
/**
* @file plugins/generic/defaultScreening/DefaultScreeningPlugin.inc.php
* @file plugins/generic/returningAuthorScreening/ReturningAuthorScreeningPlugin.inc.php
*
* Copyright (c) 2017-2019 Simon Fraser University
* Copyright (c) 2017-2019 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
* Copyright (c) 2014-2020 Simon Fraser University
* Copyright (c) 2017-2020 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* @class DefaultScreeningPlugin
* @ingroup plugins_generic_defaultScreening
* @class ReturningAuthorScreeningPlugin
* @ingroup plugins_generic_returningAuthorScreening
*
* @brief Plugin class for the DefaultScreening plugin.
*/
import('lib.pkp.classes.plugins.GenericPlugin');
class DefaultScreeningPlugin extends GenericPlugin {
class ReturningAuthorScreeningPlugin extends GenericPlugin {

/**
* @copydoc GenericPlugin::register()
Expand Down Expand Up @@ -51,7 +51,7 @@ public function register($category, $path, $mainContextId = NULL) {
* @return string
*/
public function getDisplayName() {
return __('plugins.generic.defaultScreening.displayName');
return __('plugins.generic.returningAuthorScreening.displayName');
}

/**
Expand All @@ -63,7 +63,7 @@ public function getDisplayName() {
* @return string
*/
public function getDescription() {
return __('plugins.generic.defaultScreening.description');
return __('plugins.generic.returningAuthorScreening.description');
}

/**
Expand All @@ -88,7 +88,7 @@ function listRules($hookName, $args) {
$rules =& $args[0];
$pluginRules['hasPublishedBefore'] =
"<p>" . $this->getDisplayName() . "<br />\n" .
__('plugins.generic.defaultScreening.required.publishedBefore') . "</p>\n";
__('plugins.generic.returningAuthorScreening.required.publishedBefore') . "</p>\n";
$rules = array_merge($rules, $pluginRules);
return $rules;
}
Expand Down Expand Up @@ -154,7 +154,7 @@ function applyRules($userId, $contextId, $submissionId) {
$errors = [];
// Check that user has published before
if (!$this->_hasPublishedBefore($userId, $contextId)) {
$errors['hasPublishedBefore'] = __('plugins.generic.defaultScreening.required.publishedBefore');
$errors['hasPublishedBefore'] = __('plugins.generic.returningAuthorScreening.required.publishedBefore');
}
return $errors;
}
Expand Down
18 changes: 9 additions & 9 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?php
/**
* @defgroup plugins_generic_defaultScreening
* @defgroup plugins_generic_returningAuthorScreening
*/
/**
* @file plugins/generic/defaultScreening/index.php
* @file plugins/generic/returningAuthorScreening/index.php
*
* Copyright (c) 2014-2019 Simon Fraser University
* Copyright (c) 2003-2019 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
* Copyright (c) 2014-2020 Simon Fraser University
* Copyright (c) 2003-2029 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* @ingroup plugins_generic_defaultScreening
* @brief Wrapper for the Default Screening plugin.
* @ingroup plugins_generic_returningAuthorScreening
* @brief Wrapper for the Returning Author Screening plugin.
*
*/
require_once('DefaultScreeningPlugin.inc.php');
return new DefaultScreeningPlugin();
require_once('ReturningAuthorScreeningPlugin.inc.php');
return new ReturningAuthorScreeningPlugin();
14 changes: 7 additions & 7 deletions locale/en_US/locale.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE locale SYSTEM "../../../../../lib/pkp/dtd/locale.dtd">
<!--
* plugins/generic/defaultScreening/locale/en_US/locale.xml
* plugins/generic/returningAuthorScreening/locale/en_US/locale.xml
*
* Copyright (c) 2017-2019 Simon Fraser University
* Copyright (c) 2017-2019 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
* Copyright (c) 2014-2020 Simon Fraser University
* Copyright (c) 2017-2020 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
* Localization information: https://pkp.sfu.ca/wiki/index.php?title=Translating_OxS
-->
<locale name="en_US" full_name="U.S. English">
<message key="plugins.generic.defaultScreening.displayName">Default Screening Plugin</message>
<message key="plugins.generic.defaultScreening.description">Rules: Authors can only publish if they have prior publications on the same server.</message>
<message key="plugins.generic.defaultScreening.required.publishedBefore">You need to have at least one published publication on this server.</message>
<message key="plugins.generic.returningAuthorScreening.displayName">Returning Author Screening Plugin</message>
<message key="plugins.generic.returningAuthorScreening.description">Rules: Authors can only publish if they have prior publications on the same server.</message>
<message key="plugins.generic.returningAuthorScreening.required.publishedBefore">You need to have at least one published publication on this server.</message>
</locale>
12 changes: 6 additions & 6 deletions version.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE version SYSTEM "../../../lib/pkp/dtd/pluginVersion.dtd">
<!--
* plugins/generic/defaultScreening/version.xml
* plugins/generic/returningAuthorScreening/version.xml
*
* Copyright (c) 2017-2019 Simon Fraser University
* Copyright (c) 2014-2020 Simon Fraser University
* Copyright (c) 2017-2019 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* Plugin version information.
-->
<version>
<application>defaultScreening</application>
<application>returningAuthorScreening</application>
<type>plugins.generic</type>
<release>1.0.0.0</release>
<date>2019-11-01</date>
<date>2020-03-10</date>
<lazy-load>1</lazy-load>
<class>DefaultScreeningPlugin</class>
<class>ReturningAuthorScreeningPlugin</class>
</version>

0 comments on commit 9c3c340

Please sign in to comment.