Skip to content

Commit

Permalink
Merge branch 'main' into move_issue_id
Browse files Browse the repository at this point in the history
  • Loading branch information
Hafsa-Naeem committed Aug 25, 2024
2 parents 70fc656 + bcdfb43 commit 2f75396
Show file tree
Hide file tree
Showing 50 changed files with 2,556 additions and 559 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ temp
.php_cs.cache
.php-cs-fixer.cache
node_modules
js/build/
js/build.js
js/hot-updates
styles/build.css
Expand Down
5 changes: 3 additions & 2 deletions classes/install/Upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

use APP\core\Application;
use APP\template\TemplateManager;
use Illuminate\Support\Facades\Schema;
use PKP\db\DAORegistry;
use PKP\install\Installer;
use PKP\navigationMenu\NavigationMenuItemDAO;
Expand Down Expand Up @@ -90,7 +91,7 @@ public function clearCssCache()
*/
public function migrateStaticPagesToNavigationMenuItems()
{
if ($this->tableExists('static_pages')) {
if (Schema::hasTable('static_pages')) {
$contextDao = Application::getContextDAO();
$navigationMenuItemDao = DAORegistry::getDAO('NavigationMenuItemDAO'); /** @var NavigationMenuItemDAO $navigationMenuItemDao */

Expand Down Expand Up @@ -147,4 +148,4 @@ public function _fileStageToPath($fileStage)

if (!PKP_STRICT_MODE) {
class_alias('\APP\install\Upgrade', '\Upgrade');
}
}
2 changes: 1 addition & 1 deletion classes/migration/install/JournalsMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function up(): void
$table->comment('A list of all journals in the installation of OJS.');
$table->bigInteger('journal_id')->autoIncrement();
$table->string('path', 32);
$table->float('seq', 8, 2)->default(0)->comment('Used to order lists of journals');
$table->float('seq')->default(0)->comment('Used to order lists of journals');
$table->string('primary_locale', 28);
$table->smallInteger('enabled')->default(1)->comment('Controls whether or not the journal is considered "live" and will appear on the website. (Note that disabled journals may still be accessible, but only if the user knows the URL.)');
$table->unique(['path'], 'journals_path');
Expand Down
28 changes: 12 additions & 16 deletions classes/migration/install/MetricsMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,16 +219,14 @@ public function up(): void
$table->integer('metric_unique');

$table->index(['context_id', 'submission_id'], 'msgd_context_id_submission_id');
switch (DB::getDriverName()) {
case 'mysql':
match (DB::getDriverName()) {
'mysql', 'mariadb' =>
// See "Create a database table" here: https://db-ip.com/db/format/ip-to-city-lite/csv.html
// where city is defined as varchar(80)
$table->unique([DB::raw('load_id, context_id, submission_id, country, region, city(80), date')], 'msgd_uc_load_context_submission_c_r_c_date');
break;
case 'pgsql':
$table->unique(['load_id', 'context_id', 'submission_id', 'country', 'region', 'city', 'date'], 'msgd_uc_load_context_submission_c_r_c_date');
break;
}
$table->unique([DB::raw('load_id, context_id, submission_id, country, region, city(80), date')], 'msgd_uc_load_context_submission_c_r_c_date'),
'pgsql' =>
$table->unique(['load_id', 'context_id', 'submission_id', 'country', 'region', 'city', 'date'], 'msgd_uc_load_context_submission_c_r_c_date')
};
});

Schema::create('metrics_submission_geo_monthly', function (Blueprint $table) {
Expand All @@ -251,16 +249,14 @@ public function up(): void
$table->integer('metric_unique');

$table->index(['context_id', 'submission_id'], 'msgm_context_id_submission_id');
switch (DB::getDriverName()) {
case 'mysql':
match (DB::getDriverName()) {
'mysql', 'mariadb' =>
// See "Create a database table" here: https://db-ip.com/db/format/ip-to-city-lite/csv.html
// where city is defined as varchar(80)
$table->unique([DB::raw('context_id, submission_id, country, region, city(80), month')], 'msgm_uc_context_submission_c_r_c_month');
break;
case 'pgsql':
$table->unique(['context_id', 'submission_id', 'country', 'region', 'city', 'month'], 'msgm_uc_context_submission_c_r_c_month');
break;
}
$table->unique([DB::raw('context_id, submission_id, country, region, city(80), month')], 'msgm_uc_context_submission_c_r_c_month'),
'pgsql' =>
$table->unique(['context_id', 'submission_id', 'country', 'region', 'city', 'month'], 'msgm_uc_context_submission_c_r_c_month')
};
});

// Usage stats total item temporary records
Expand Down
3 changes: 1 addition & 2 deletions classes/migration/upgrade/v3_4_0/I6093_AddForeignKeys.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
namespace APP\migration\upgrade\v3_4_0;

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;

class I6093_AddForeignKeys extends \PKP\migration\upgrade\v3_4_0\I6093_AddForeignKeys
Expand Down Expand Up @@ -92,7 +91,7 @@ public function up(): void
});

// Attempt to drop the previous foreign key, which doesn't have the cascade rule
if (DB::getDoctrineSchemaManager()->introspectTable('publication_galleys')->hasForeignKey('publication_galleys_submission_file_id_foreign')) {
if ($this->hasForeignKey('publication_galleys', 'publication_galleys_submission_file_id_foreign')) {
Schema::table('publication_galleys', fn (Blueprint $table) => $table->dropForeign('publication_galleys_submission_file_id_foreign'));
}

Expand Down
28 changes: 12 additions & 16 deletions classes/migration/upgrade/v3_4_0/I9231_FixMetricsIndexes.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,21 @@ public function up(): void
// and create new ones using city column prefix for MySQL
Schema::table('metrics_submission_geo_daily', function (Blueprint $table) {
$table->dropUnique('msgd_uc_load_context_submission_c_r_c_date');
switch (DB::getDriverName()) {
case 'mysql':
$table->unique([DB::raw('load_id, context_id, submission_id, country, region, city(80), date')], 'msgd_uc_load_context_submission_c_r_c_date');
break;
case 'pgsql':
$table->unique(['load_id', 'context_id', 'submission_id', 'country', 'region', 'city', 'date'], 'msgd_uc_load_context_submission_c_r_c_date');
break;
}
match (DB::getDriverName()) {
'mysql', 'mariadb' =>
$table->unique([DB::raw('load_id, context_id, submission_id, country, region, city(80), date')], 'msgd_uc_load_context_submission_c_r_c_date'),
'pgsql' =>
$table->unique(['load_id', 'context_id', 'submission_id', 'country', 'region', 'city', 'date'], 'msgd_uc_load_context_submission_c_r_c_date'),
};
});
Schema::table('metrics_submission_geo_monthly', function (Blueprint $table) {
$table->dropUnique('msgm_uc_context_submission_c_r_c_month');
switch (DB::getDriverName()) {
case 'mysql':
$table->unique([DB::raw('context_id, submission_id, country, region, city(80), month')], 'msgm_uc_context_submission_c_r_c_month');
break;
case 'pgsql':
$table->unique(['context_id', 'submission_id', 'country', 'region', 'city', 'month'], 'msgm_uc_context_submission_c_r_c_month');
break;
}
match (DB::getDriverName()) {
'mysql', 'mariadb' =>
$table->unique([DB::raw('context_id, submission_id, country, region, city(80), month')], 'msgm_uc_context_submission_c_r_c_month'),
'pgsql' =>
$table->unique(['context_id', 'submission_id', 'country', 'region', 'city', 'month'], 'msgm_uc_context_submission_c_r_c_month'),
};
});
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

/**
* @file classes/migration/upgrade/v3_5_0/I9892_FloatToDecimalColumnTypeUpdate.php
*
* Copyright (c) 2024 Simon Fraser University
* Copyright (c) 2024 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* @class I9892_FloatToDecimalColumnTypeUpdate
*
* @brief Changes columns types from to float to decimal
*
* @see https://laravel.com/docs/11.x/upgrade#floating-point-types
*/

namespace APP\migration\upgrade\v3_5_0;

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class I9892_FloatToDecimalColumnTypeUpdate extends \PKP\migration\Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('subscription_types', function (Blueprint $table) {
$table->decimal('cost', 8, 2)->unsigned()->change();
});

Schema::table('completed_payments', function (Blueprint $table) {
$table->decimal('amount', 8, 2)->unsigned()->change();
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('subscription_types', function (Blueprint $table) {
$table->double('cost')->change();
});

Schema::table('completed_payments', function (Blueprint $table) {
$table->double('amount')->change();
});
}
}
2 changes: 1 addition & 1 deletion classes/payment/ojs/OJSPaymentManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public function fulfillQueuedPayment($request, $queuedPayment, $payMethodPluginN
}
}
$completedPaymentDao = DAORegistry::getDAO('OJSCompletedPaymentDAO'); /** @var OJSCompletedPaymentDAO $completedPaymentDao */
$completedPayment = $this->createCompletedPayment($queuedPayment, $payMethodPluginName, $request->getUser()->getId());
$completedPayment = $this->createCompletedPayment($queuedPayment, $payMethodPluginName, $queuedPayment->getUserId());
$completedPaymentDao->insertObject($completedPayment);

$queuedPaymentDao = DAORegistry::getDAO('QueuedPaymentDAO'); /** @var QueuedPaymentDAO $queuedPaymentDao */
Expand Down
2 changes: 1 addition & 1 deletion lib/pkp
Submodule pkp updated 180 files
14 changes: 7 additions & 7 deletions locale/bg/locale.po
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Cyril Kamburov <[email protected]>, 2021, 2022, 2023.
# Cyril Kamburov <[email protected]>, 2021, 2022, 2023, 2024.
# Albena Vassileva <[email protected]>, 2022.
msgid ""
msgstr ""
"PO-Revision-Date: 2023-02-27 07:59+0000\n"
"PO-Revision-Date: 2024-08-17 11:41+0000\n"
"Last-Translator: Cyril Kamburov <[email protected]>\n"
"Language-Team: Bulgarian <http://translate.pkp.sfu.ca/projects/ojs/locale/bg/"
">\n"
Expand All @@ -11,7 +11,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.13.1\n"
"X-Generator: Weblate 4.18.2\n"

msgid "user.authorization.journalDoesNotPublish"
msgstr "Това списание не публикува съдържанието си онлайн."
Expand Down Expand Up @@ -456,16 +456,16 @@ msgstr ""
"деактивирана."

msgid "user.role.manager"
msgstr "Раководител (мединжър) на списанието"
msgstr "Ръководител (мениджър) на списанието"

msgid "user.role.subEditor"
msgstr "Редактор на раздела (секцията)"

msgid "user.role.subscriptionManager"
msgstr "Отговорник за абонаментите"
msgstr "Мениджър на абонаментите"

msgid "user.role.managers"
msgstr "Раководители на списанието"
msgstr "Ръководители на списанието"

msgid "user.role.subEditors"
msgstr "Редактори на раздели"
Expand Down Expand Up @@ -1770,7 +1770,7 @@ msgid "about.subscriptions.institutional"
msgstr "Институционални абонаменти"

msgid "about.subscriptionsContact"
msgstr "Отговорник за абонаментите"
msgstr "Контакт за абонаментите"

msgid "about.subscriptionTypes.name"
msgstr "Име"
Expand Down
89 changes: 86 additions & 3 deletions locale/de/emails.po
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Jens Unkenholz <[email protected]>, 2023.
# Pia Piontkowitz <[email protected]>, 2023.
# Renate Voget <[email protected]>, 2024.
msgid ""
msgstr ""
"PO-Revision-Date: 2023-05-01 18:49+0000\n"
"Last-Translator: Pia Piontkowitz <pia.piontkowitz@rub.de>\n"
"PO-Revision-Date: 2024-08-14 16:52+0000\n"
"Last-Translator: Renate Voget <renate.voget@hbz-nrw.de>\n"
"Language-Team: German <http://translate.pkp.sfu.ca/projects/ojs/emails/de/>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.13.1\n"
"X-Generator: Weblate 4.18.2\n"

msgid "emails.passwordResetConfirm.subject"
msgstr "Bestätigung der Passwortzurücksetzung"
Expand Down Expand Up @@ -124,3 +125,85 @@ msgstr "Benachrichtigung über das Ablaufen eines Abonnements"

msgid "emails.subscriptionAfterExpiryLast.subject"
msgstr "Abonnement abgelaufen - Letzte Erinnerung"

msgid "emails.passwordResetConfirm.body"
msgstr ""
"Wir wurden aufgefordert, Ihr Passwort für die Webseite {$siteTitle} neu zu "
"setzen.<br />\n"
"<br />\n"
"Falls die Aufforderung nicht von Ihnen stammt, ignorieren Sie bitte diese E-"
"Mail und Ihr Passwort bleibt unverändert. Falls Sie Ihr Passwort neu setzen "
"möchten, klicken Sie bitte auf die folgende URL:<br />\n"
"<br />\n"
"Mein Passwort neu setzen: {$passwordResetUrl}<br />\n"
"<br />\n"
"{$siteContactName}"

msgid "emails.userRegister.body"
msgstr ""
"{$recipientName}<br />\n"
"<br />\n"
"Sie sind nun als neue/r Benutzer/in von {$contextName} registriert. Wir "
"haben Ihren Benutzer/innennamen und Ihr Passwort in dieser Mail aufgeführt, "
"beides wird für alle Arbeiten mit dieser Zeitschrift gebraucht. Sie können "
"sich zu jedem Zeitpunkt als Benutzer/in der Zeitschrift austragen lassen, "
"indem Sie mich kontaktieren.<br />\n"
"<br />\n"
"Benutzer/innenname: {$recipientUsername}<br />\n"
"Passwort: {$password}<br />\n"
"<br />\n"
"Vielen Dank <br />\n"
"{$signature}"

msgid "emails.issuePublishNotify.body"
msgstr ""
"<p>Guten Tag {$recipientName},</p><p> wir freuen uns Ihnen mitteilen zu "
"können, dass eine neue Ausgabe von {$contextName} veröffentlicht wurde: <a "
"href=\"{$issueUrl}\">{$issueIdentification}</a>. Wir laden Sie dazu ein, die "
"Ausgabe zu lesen und mit Anderen Ihrer wissenschaftlichen Community zu "
"teilen.</p><p>Vielen Dank an unsere Autor/innen, Gutachter/innen und "
"Redakteur/innen für ihre wertvollen Beiträge - und natürlich an unsere Leser/"
"innen für das anhaltende Interesse an unserer Arbeit.</p><p>Vielen "
"Dank</p>{$signature}"

msgid "emails.reviewerRegister.body"
msgstr ""
"<p>Guten Tag {$recipientName}, </p><p>angesichts Ihrer Expertise haben wir "
"uns erlaubt, Ihren Namen der Gutachter/innendatenbank von {$contextName} "
"hinzuzufügen. Dies verpflichtet Sie zu nichts, ermöglicht uns aber, Sie um "
"mögliche Gutachten für eine Einreichung zu bitten. Wenn Sie zu einem "
"Gutachten eingeladen werden, werden Sie Titel und Abstract des Beitrags "
"sehen können und werden stets selber entscheiden können, ob Sie der "
"Einladung folgen oder nicht. Sie können zu jedem Zeitpunkt Ihren Namen von "
"der Gutachter/innenliste entfernen lassen.</p><p>Wir senden Ihnen einen "
"Benutzer/innennamen und ein Passwort, die Sie in allen Schritten der "
"Zusammenarbeit mit der Zeitschrift über deren Website benötigen. Vielleicht "
"möchten Sie z.B. Ihr Profil inkl. Ihrer Begutachtungsinteressen "
"aktualisieren.</p><p>Benutzer/innenname: {$recipientUsername}<br />Passwort: "
"{$password}</p><p>Vielen Dank</p>{$signature}"

msgid "emails.userValidateContext.body"
msgstr ""
"{$recipientName}<br />\n"
"<br />\n"
"Sie haben ein Benutzer/innenkonto bei {$contextName} angelegt, aber bevor "
"Sie es benutzen können, müssen Sie Ihre E-Mail-Adresse bestätigen. Dazu "
"folgen Sie bitte einfach dem folgenden Link:<br />\n"
"<br />\n"
"{$activateUrl}<br />\n"
"<br />\n"
"Vielen Dank<br />\n"
"{$contextSignature}"

msgid "emails.userValidateSite.body"
msgstr ""
"{$recipientName}<br />\n"
"<br />\n"
"Sie haben ein Benutzer/innenkonto bei {$siteTitle} angelegt, aber bevor Sie "
"es benutzen können, müssen Sie Ihre E-Mail-Adresse bestätigen. Dazu folgen "
"Sie bitte einfach dem folgenden Link:<br />\n"
"<br />\n"
"{$activateUrl}<br />\n"
"<br />\n"
"Vielen Dank<br />\n"
"{$siteSignature}"
14 changes: 9 additions & 5 deletions locale/fa/author.po
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# Mehran Toreihi <[email protected]>, 2024.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-11-19T10:49:21+00:00\n"
"PO-Revision-Date: 2019-11-19T10:49:21+00:00\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fa_IR\n"
"PO-Revision-Date: 2024-08-08 14:36+0000\n"
"Last-Translator: Mehran Toreihi <[email protected]>\n"
"Language-Team: Persian <http://translate.pkp.sfu.ca/projects/ojs/author/fa/>"
"\n"
"Language: fa\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.18.2\n"

msgid "author.submit"
msgstr "مقاله ارسالی جدید"
Expand Down Expand Up @@ -65,7 +69,7 @@ msgid "author.submit.nextSteps"
msgstr "مرحله‌ی بعدی"

msgid "author.submit.notAccepting"
msgstr "این مجله در حال حاضر مقاله نمی‌پذیرد"
msgstr "این مجله در حال حاضر مقاله نمی‌پذیرد."

msgid "author.submit.requestWaiver"
msgstr "درخواست تخفیف"
Expand Down
Loading

0 comments on commit 2f75396

Please sign in to comment.