mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
allowing textcollector for non-admins in CLI-mode (needed for auto-updating)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44574 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a95efe833f
commit
dd71c53a4d
@ -1268,8 +1268,11 @@ class i18n extends Controller {
|
||||
* and write the resultant files in the lang folder of each module.
|
||||
*/
|
||||
public function textcollector() {
|
||||
|
||||
if (!Permission::check("ADMIN")) user_error("You must be an admin to enable text collector mode", E_USER_ERROR);
|
||||
// allows textcollector to run in CLI without admin-check
|
||||
if(!Permission::check("ADMIN") && !Director::is_cli()) {
|
||||
user_error("You must be an admin or use CLI-mode to enable text collector", E_USER_ERROR);
|
||||
}
|
||||
|
||||
echo "Collecting text...<br /><br />";
|
||||
|
||||
//Calculate base directory
|
||||
|
Loading…
x
Reference in New Issue
Block a user