Umil.umil end
From phpBB Development Wiki
umil::umil_end –– A function that is run almost every time a Core function from the Umil Library is ran.
This is much like the Umil.umil_start function, but instead of preparing the command, this prepares the result.
If any SQL Error occured since umil_start was last run, that error will be put in $umil->result.
Contents |
Description
string umil::umil_start ()
Parameters
The parameters for umil_end are special. If a parameter is sent, the first one us used for the name of the result. Any following that will be used in vsprintf on the name of the result. For more information see the examples.
Return Values
'<strong>' . $this->command . '</strong><br />' . $this->result
Examples
Example #1
Set the result to 'FAIL' or $user->lang['FAIL'] if it is set.
$umil->umil_end('FAIL')
Example #2
Set $umil->result to $user->lang['CONFIG_ALREADY_EXISTS'] if it exists, otherwise 'CONFIG_ALREADY_EXISTS'. Will also run vsprintf($umil->result, $config_name)
Assuming the stand-alone version is not being run, $user->lang['CONFIG_ALREADY_EXISTS'] should be:
'Adding new config variable: %sERROR: Config variable %s already exists.'
After running vsprintf on it, it would look like the following, although with $config_name being replaced with whatever the $config_name was:
'ERROR: Config variable $config_name already exists.'
$umil->umil_end('CONFIG_ALREADY_EXISTS', $config_name)
See Also

