Use ACL instead of AXE for utilities
[gnucomo.git] / src / gcm_daemon / gcm_daemon.php
index 61062a8..17338a0 100755 (executable)
@@ -324,7 +324,7 @@ function process_log ()
        $local_sql = "UPDATE db_value SET setting_value = '"
                    . $local_upper_row ."' where setting = 'log_processing'";
        $dbms->query($local_sql);
-
+   
 
        // Update the statistics for the object-table
 
@@ -753,5 +753,19 @@ function expand_arguments($command, $args)
    return $command;
 }
 
+// ereg function are removed from PHP since version 7.0
+// These wrappers use the alternative preg functions.
+
+function ereg($pattern, $string, &$matches)
+{
+   $pattern = "#" . $pattern . "#";
+   return preg_match($pattern, $string, $matches);
+}
+
+function ereg_replace($pattern, $replacement, $string)
+{
+   $pattern = "#" . $pattern . "#";
+   return preg_replace($pattern, $replacement, $string);
+}
 ?>