Skip to content

Commit

Permalink
Removed unused transaction in external function and added global $USE…
Browse files Browse the repository at this point in the history
…R reference. Issue #25.
  • Loading branch information
st143971 committed Oct 12, 2024
1 parent 837e4ba commit c979396
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions classes/external/search_book_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static function execute_returns() {
* array of objects each describing one search term occurance with text snippet and location data.
*/
public static function execute($courseid, $searchstring, $contextlength) {
global $CFG, $DB;
global $USER;
require_once(__DIR__ . '/../../locallib.php');

// Validate parameter.
Expand All @@ -107,9 +107,6 @@ public static function execute($courseid, $searchstring, $contextlength) {
]
);

// If an exception is thrown in the below code, all DB queries in this code will be rollback.
$transaction = $DB->start_delegated_transaction();

$courseid = $params['courseid'];
$searchstring = $params['searchstring'];
$contextlength = $params['contextlength'];
Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
*/
defined('MOODLE_INTERNAL') || die();

$plugin->version = 2024101204; // The current plugin version (Date: YYYYMMDDHH).
$plugin->version = 2024101206; // The current plugin version (Date: YYYYMMDDHH).
$plugin->requires = 2020061510; // Requires this Moodle version.
$plugin->component = 'block_booksearch'; // Full name of the plugin (used for diagnostics).
$plugin->release = '3.2.1';
$plugin->release = '3.3';
$plugin->maturity = MATURITY_STABLE;

0 comments on commit c979396

Please sign in to comment.