Skip to content

Commit

Permalink
Merge pull request Elgg#14525 from Elgg/5.x
Browse files Browse the repository at this point in the history
5.x to master
  • Loading branch information
jdalsem authored Nov 29, 2023
2 parents 6a2908a + d1aa033 commit 946a88c
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
php ./elgg-cli plugins:list --no-ansi
- name: Seed Elgg database
run: php ./elgg-cli database:seed --limit=5 --image_folder=./.scripts/seeder/images/ -vv --no-ansi
run: php ./elgg-cli database:seed --limit=5 --image_folder=./.scripts/seeder/images/ -vv --no-ansi --no-interaction

- name: Start Elgg webserver
# there is some weird issue with the PHP cli-server in PHP 8.1, so skipping this
Expand Down
2 changes: 1 addition & 1 deletion docs/pip-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
docutils<0.18
sphinxcontrib.phpdomain
sphinx_rtd_theme
sphinx_rtd_theme < 2.0
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
docutils<0.18
sphinxcontrib.phpdomain
sphinx-intl
sphinx_rtd_theme
sphinx_rtd_theme < 2.0
6 changes: 3 additions & 3 deletions engine/classes/Elgg/Database/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Elgg\Database;

use Doctrine\DBAL\Connection;
use Doctrine\DBAL\ArrayParameterType;
use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Query\Expression\CompositeExpression;
use Doctrine\DBAL\Query\QueryBuilder as DbalQueryBuilder;
Expand Down Expand Up @@ -165,9 +165,9 @@ public function param($value, $type = null, $key = null) {
$value = array_shift($value);
} else {
if ($type === ParameterType::INTEGER) {
$type = Connection::PARAM_INT_ARRAY;
$type = ArrayParameterType::INTEGER;
} elseif ($type === ParameterType::STRING) {
$type = Connection::PARAM_STR_ARRAY;
$type = ArrayParameterType::STRING;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
if (empty($entity_metadata)) {
$metadata_info = elgg_echo('notfound');
} else {
$md_columns = ['id', 'name', 'value', 'value_type', 'time_created', 'enabled'];
$md_columns = ['id', 'name', 'value', 'value_type', 'time_created'];

$metadata_info = '<table class="elgg-table">';
$metadata_info .= '<thead><tr>';
Expand Down
20 changes: 14 additions & 6 deletions mod/web_services/classes/ElggApiKey.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

/**
* Class to store API key information in
*
Expand All @@ -12,8 +11,7 @@ class ElggApiKey extends ElggObject {
const SUBTYPE = 'api_key';

/**
* {@inheritDoc}
* @see ElggEntity::initializeAttributes()
* {@inheritdoc}
*/
protected function initializeAttributes() {
parent::initializeAttributes();
Expand All @@ -24,13 +22,23 @@ protected function initializeAttributes() {
$this->attributes['container_guid'] = $site->guid;
$this->attributes['owner_guid'] = $site->guid;
$this->attributes['subtype'] = self::SUBTYPE;
}

/**
* {@inheritdoc}
*/
protected function create() {
$result = parent::create();

if ($result !== false) {
$this->generateKeys();
}

$this->generateKeys();
return $result;
}

/**
* {@inheritDoc}
* @see ElggEntity::delete()
* {@inheritdoc}
*/
public function delete(bool $recursive = true): bool {
$public_key = $this->public_key;
Expand Down
2 changes: 1 addition & 1 deletion views/default/forms/admin/security/security_txt.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,6 @@

$footer = elgg_view_field([
'#type' => 'submit',
'value' => elgg_echo('save'),
'text' => elgg_echo('save'),
]);
elgg_set_form_footer($footer);
2 changes: 1 addition & 1 deletion views/default/object/admin_notice.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
$delete = elgg_view('output/url', [
'href' => elgg_generate_action_url('entity/delete', ['guid' => $entity->guid]),
'text' => false,
'title' => elgg_echo('delete'),
'icon' => 'delete',
'class' => 'elgg-admin-notice-dismiss',
'is_trusted' => true,
]);

echo elgg_view_message('notice', $entity->description, ['title' => false, 'link' => $delete]);

0 comments on commit 946a88c

Please sign in to comment.