Skip to content

Commit 69dcd65

Browse files
committed
Documentation: Add PHPDoc to api_replace_terms_in_content - refs BT#22302
1 parent 10794fc commit 69dcd65

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

main/inc/lib/api.lib.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10700,6 +10700,16 @@ function api_encrypt_hash($data, $secret)
1070010700
return base64_encode($iv).base64_encode($encrypted.$tag);
1070110701
}
1070210702

10703+
/**
10704+
* Replace a specific term by another in all course-related text elements in the database.
10705+
* Does not rename directories or replace content of files on disk. Check tests/scripts/replace_course_code.php if
10706+
* you are looking for this.
10707+
* The replacement can replace bits in larger strings, requiring the search string to be very specific to avoid
10708+
* excess replacements.
10709+
* @param string $search
10710+
* @param string $replace
10711+
* @return array The number of changes executed in each table
10712+
*/
1070310713
function api_replace_terms_in_content(string $search, string $replace): array
1070410714
{
1070510715
$replacements = [

0 commit comments

Comments
 (0)