diff --git a/docs/examples/example4/news_change.php b/docs/examples/example4/news_change.php index 0666ba1..56193a9 100644 --- a/docs/examples/example4/news_change.php +++ b/docs/examples/example4/news_change.php @@ -44,7 +44,7 @@ if (!empty($news)) { - if (!ereg('^[1-9][0-9]?$', $valid_to)) { + if (!preg_match('/^[1-9][0-9]?$/', $valid_to)) { $errorMsg = '

Only numbers between 1 and 99 are allowed here.

'; } else { // Form seems to be correct. Write data into the db. diff --git a/docs/examples/example4/news_new.php b/docs/examples/example4/news_new.php index fec6ec2..3b9c252 100644 --- a/docs/examples/example4/news_new.php +++ b/docs/examples/example4/news_new.php @@ -22,7 +22,7 @@ // If $news is not empty, we have something to work. if (!empty($news)) { - if (!ereg('^[1-9][0-9]?$', $valid_to)) { + if (!preg_match('/^[1-9][0-9]?$/', $valid_to)) { $tpl->setVariable('script_msg', '

Only numbers between 1 and 99 are allowed here.

'); } elseif (!$LU->checkRightLevel(RIGHT_NEWS_NEW, $LU->getProperty('perm_user_id'), $group)) { $tpl->setVariable('script_msg', '

You don\'t have the right to post news for this group.

');