Function Hook_import_phpbb3->fix_links

Definitions

sources/hooks/modules/admin_import/phpbb3.php

  • Convert phpBB URLs pasted in text fields into software ones.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$post string No No required parameter N/A N/A The text field text (e.g. a post)
$uid string No No required parameter N/A N/A Bbcode uid
$db object No No required parameter N/A N/A The database connector to import from
$table_prefix string No No required parameter N/A N/A The table prefix the target prefix is using
$post_id ?AUTO_LINK No No Null N/A N/A The ID of the post/message being imported (null: attachments not supported)
$is_pm boolean No No False N/A N/A Whether it is a personal message

Returns

  • The new text field text
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Convert phpBB URLs pasted in text fields into software ones.
 *
 * @param  string $post The text field text (e.g. a post)
 * @param  string $uid Bbcode uid
 * @param  object $db The database connector to import from
 * @param  string $table_prefix The table prefix the target prefix is using
 * @param  ?AUTO_LINK $post_id The ID of the post/message being imported (null: attachments not supported)
 * @param  boolean $is_pm Whether it is a personal message
 * @return string The new text field text
 */

public function fix_links(string $post, string $uid, object $db, string $table_prefix, ?int $post_id = null, bool $is_pm = false) : string