[TikiWiki-commits] [Git][tikiwiki/tiki][master] [UPD] BigBlueButton: Complete migration to 'shared secret' terminology
Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <692805183c5d1_2b1d0099830037@gitlab-sidekiq-low-urgency-cpu-bound-v2-5df5c99858-p9j2j.mail> |
Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
57b329e7 by Espoir Baraka at 2025-11-27T07:52:30+00:00
[UPD] BigBlueButton: Complete migration to 'shared secret' terminology
---
* [UPD] BigBlueButton: Complete migration to 'shared secret' terminology
See merge request tikiwiki/tiki!9122
- - - - -
4 changed files:
- + installer/schema/20251123_bbb_rename_server_salt_to_shared_secret_tiki.php
- lib/bigbluebuttonlib.php
- lib/core/Exceptions/BigBlueButton/ServerSaltKeyException.php → lib/core/Exceptions/BigBlueButton/SharedSecretKeyException.php
- lib/wiki-plugins/wikiplugin_bigbluebutton.php
Changes:
=====================================
installer/schema/20251123_bbb_rename_server_salt_to_shared_secret_tiki.php
=====================================
@@ -0,0 +1,44 @@
+<?php
+
+// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
+//
+// All Rights Reserved. See copyright.txt for details and a complete list of authors.
+// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
+use Tiki\Installer\Installer;
+
+/**
+ * Migration script to rename bigbluebutton_server_salt preference to bigbluebutton_shared_secret
+ * This aligns with BigBlueButton's official terminology which uses "shared secret" instead of "server salt"
+ *
+ * @param Installer $installer
+ */
+function upgrade_20251123_bbb_rename_server_salt_to_shared_secret_tiki($installer)
+{
+ // Check if the old preference exists
+ $old_pref_value = $installer->getOne(
+ "SELECT value FROM `tiki_preferences` WHERE `name` = ?",
+ ['bigbluebutton_server_salt']
+ );
+
+ if (! empty($old_pref_value)) {
+ // Check if the new preference already exists
+ $new_pref_exists = $installer->getOne(
+ "SELECT value FROM `tiki_preferences` WHERE `name` = ?",
+ ['bigbluebutton_shared_secret']
+ );
+
+ if (empty($new_pref_exists)) {
+ // Rename the preference
+ $installer->queryException(
+ 'UPDATE `tiki_preferences` SET `name` = ? WHERE `name` = ?',
+ ['bigbluebutton_shared_secret', 'bigbluebutton_server_salt']
+ );
+ } else {
+ // If both exist, keep the new one and delete the old one
+ $installer->queryException(
+ 'DELETE FROM `tiki_preferences` WHERE `name` = ?',
+ ['bigbluebutton_server_salt']
+ );
+ }
+ }
+}
=====================================
lib/bigbluebuttonlib.php
=====================================
@@ -14,7 +14,7 @@ use BigBlueButton\Parameters\EndMeetingParameters;
use BigBlueButton\Responses\GetMeetingInfoResponse;
use BigBlueButton\Parameters\MetaParameters;
use BigBlueButton\Exception\BigBlueButtonException;
-use Tiki\Exceptions\BigBlueButton\ServerSaltKeyException;
+use Tiki\Exceptions\BigBlueButton\SharedSecretKeyException;
use BigBlueButton\Responses\ApiVersionResponse;
/**
@@ -321,7 +321,7 @@ class BigBlueButtonLib
$response = $this->bbb->getRecordings($recordingParams);
if (! $response || ! $response->getRawXml()) {
- throw new ServerSaltKeyException(tr('Invalid shared secret key entered. Please contact the site administrator to insert a valid shared secret key in the RTC > BigBlueButton control panel.'));
+ throw new SharedSecretKeyException(tr('Invalid shared secret key entered. Please contact the site administrator to insert a valid shared secret key in the RTC > BigBlueButton control panel.'));
}
$data = [];
=====================================
lib/core/Exceptions/BigBlueButton/ServerSaltKeyException.php → lib/core/Exceptions/BigBlueButton/SharedSecretKeyException.php
=====================================
@@ -4,6 +4,6 @@ namespace Tiki\Exceptions\BigBlueButton;
use Exception;
-class ServerSaltKeyException extends Exception
+class SharedSecretKeyException extends Exception
{
}
=====================================
lib/wiki-plugins/wikiplugin_bigbluebutton.php
=====================================
@@ -4,7 +4,7 @@
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
-use Tiki\Exceptions\BigBlueButton\ServerSaltKeyException;
+use Tiki\Exceptions\BigBlueButton\SharedSecretKeyException;
function wikiplugin_bigbluebutton_info()
{
@@ -159,7 +159,7 @@ function wikiplugin_bigbluebutton($data, $params)
// Won't display anything if recordings were not loaded
return $smarty->fetch('wiki-plugins/wikiplugin_bigbluebutton_view_recordings.tpl');
- } catch (ServerSaltKeyException $e) {
+ } catch (SharedSecretKeyException $e) {
return WikiParser_PluginOutput::internalError($e->getMessage());
} catch (Exception) {
return WikiParser_PluginOutput::internalError(tr('BigBlueButton is misconfigured or inaccessible.'));
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/57b329e7a54482ef74aa1d47c6cb244cefefd6a9
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/57b329e7a54482ef74aa1d47c6cb244cefefd6a9
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs