1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rainloop_ynh.git synced 2024-09-03 20:16:18 +02:00

Define ereg() if it does not exists

This commit is contained in:
Alexandre Aubin 2018-01-16 19:21:04 +01:00 committed by GitHub
parent 9d7250f240
commit e26b7e5823
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,12 @@
<?php
if (!function_exists('ereg')) {
function ereg($pattern, $subject, &$matches = array())
{
return preg_match('/'.$pattern.'/', $subject, $matches);
}
}
function arguments($argv) {
$_ARG = array();
foreach ($argv as $arg) {
@ -24,4 +31,4 @@ $oConfig = \RainLoop\Api::Config();
$oConfig->SetPassword($args['password']);
echo $oConfig->Save() ? 'Admin password updated' : 'Admin password not updated';
?>
?>