1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

Possible fix for cron descriptions containing single quotes not appearing in database correctly.

This commit is contained in:
Cameron
2018-11-07 16:32:19 -08:00
parent 5073dcd3bb
commit cc60ce0d68

View File

@@ -194,13 +194,15 @@ class cron_admin_ui extends e_admin_ui
/**
* Import Cron Settings into Database.
*/
public function cronImport($new_cron = FALSE)
public function cronImport($new_cron = array())
{
if(!$new_cron)
if(empty($new_cron))
{
return;
return null;
}
$tp = e107::getParser();
foreach($new_cron as $class => $ecron)
{
foreach($ecron as $val)
@@ -209,7 +211,7 @@ class cron_admin_ui extends e_admin_ui
'cron_id' => 0,
'cron_name' => $val['name'],
'cron_category' => $val['category'],
'cron_description' => $val['description'],
'cron_description' => $tp->toDB($val['description']),
'cron_function' => $class."::".$val['function'],
'cron_tab' => varset($val['tab'], '* * * * *'),
'cron_active' => varset($val['active'], '0'),