include/utils/db_utils.php
Functions
db_concat(
$table, $fields
)
:
void
Parameters
Details
| Name | Type | Description |
|---|---|---|
| $table | ||
| $fields |
- Deprecated
- use DBManager::concat() instead.
db_convert(
$string, $type, $additional_parameters
=
array(), $additional_parameters_oracle_only
=
array()
)
:
void
Parameters
Details
| Name | Type | Description |
|---|---|---|
| $string | ||
| $type | ||
| $additional_parameters | ||
| $additional_parameters_oracle_only |
- Deprecated
- use DBManager::convert() instead.
from_db_convert(
$string, $type
)
:
void
Parameters
Details
| Name | Type | Description |
|---|---|---|
| $string | ||
| $type |
- Deprecated
- use DBManager::fromConvert() instead.
from_html(
string $string, bool $encode
=
true
)
:
stringReplaces specific HTML entity values with the true characters
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $string | string | String to check/replace |
| $encode | bool | Default true |
| Type | Description |
|---|---|
| string |
getValidDBName(
$name, $ensureUnique
=
false, $maxLen
=
30
)
:
void
Parameters
| Name | Type | Description |
|---|---|---|
| $name | ||
| $ensureUnique | ||
| $maxLen |
isValidDBName(
string $name, string $dbType
)
:
boolisValidDBName
Utility to perform the check during install to ensure a database name entered by the user is valid based on the type of database server
| Name | Type | Description |
|---|---|---|
| $name | string | Proposed name for the DB |
| $dbType | string | Type of database server |
| Type | Description |
|---|---|
| bool | true or false based on the validity of the DB name |
to_html(
string $string, bool $encode
=
true
)
:
stringReplaces specific characters with their HTML entity values
Parameters
Returns
Details
| Name | Type | Description |
|---|---|---|
| $string | string | String to check/replace |
| $encode | bool | Default true |
| Type | Description |
|---|---|
| string |
- Todo
- Make this utilize the external caching mechanism after re-testing (see log on r25320). Bug 49489 - removed caching of to_html strings as it was consuming memory and never releasing it