[Koha-bugs] [Bug 16306] C4::Context->setCommandlineEnvironment() convenience function
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Apr 21 14:37:14 CEST 2016
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16306
Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #50454|0 |1
is obsolete| |
--- Comment #2 from Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi> ---
Created attachment 50501
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50501&action=edit
Bug 16306 - C4::Context->setCommandlineEnvironment() convenience function
There is no unified way to set the environment for commandline scripts,
even if the C4::Context->interface('commandline') explicitly allows setting
the cli interface.
This function wraps the complexity of environment setting in the command line.
Also a default user environment must be set.
To set the default user environment we need a default user. This patch
also makes sure that a default 'commandlineadmin' always exists in DB.
Usage:
use C4::Context;
BEGIN {
C4::Context->setCommandlineEnvironment();
}
... #Load other dependencies that might depend on the environment
or just:
...
use C4::Context;
C4::Context->setCommandlineEnvironment();
...
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list