Feature #347 - Some easy replacements for ereg*() calls.

skala
Ivan Tcholakov 15 years ago
parent f516648cfe
commit 29c31c40ba
  1. 2
      main/admin/session_import.php
  2. 8
      main/admin/settings.lib.php
  3. 2
      main/exercice/hotspot.inc.php
  4. 2
      main/exercice/hotspot_lang_conversion.php

@ -551,7 +551,7 @@ if ($_POST['formSent']) {
}
} else {
foreach ($enreg as $tag_name) {
$tag_names[] = api_eregi_replace('[^a-z0-9_-]', '', $tag_name);
$tag_names[] = api_preg_replace('/[^a-zA-Z0-9_\-]/', '', $tag_name);
}
if (!in_array('SessionName', $tag_names) || !in_array('DateStart', $tag_names) || !in_array('DateEnd', $tag_names)) {
$error_message = get_lang('NoNeededData');

@ -1,6 +1,6 @@
<?php
/*
* For licensing terms, see /license.txt
* For licensing terms, see /license.txt
*/
/**
==============================================================================
@ -334,7 +334,7 @@ function handle_stylesheets()
function upload_stylesheet($values,$picture)
{
// valid name for the stylesheet folder
$style_name = api_ereg_replace("[^A-Za-z0-9]", "", $values['name_stylesheet'] );
$style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
// create the folder if needed
if (!is_dir(api_get_path(SYS_CODE_PATH).'css/'.$style_name.'/'))
@ -856,9 +856,9 @@ function delete_template($id)
/**
* Returns the list of timezone identifiers used to populate the select
*
*
* @return array List of timezone identifiers
*
*
* @author Guillaume Viguier <guillaume.viguier@beeznest.com>
* @since Chamilo 1.8.7
*/

@ -37,7 +37,7 @@ foreach($file as $value)
$explode[1] = trim($explode[1]);
$explode[1] = substr($explode[1], 0, strlen($explode[1]) - 1);
$explode[1] = ereg_replace('"', '', $explode[1]);
$explode[1] = str_replace('"', '', $explode[1]);
$temp[] = $explode[0] . '=' . $explode[1];
}

@ -44,7 +44,7 @@ foreach($file as $value)
$explode[1] = trim($explode[1]);
$explode[1] = substr($explode[1], 0, strlen($explode[1]) - 1);
$explode[1] = ereg_replace('"', '', $explode[1]);
$explode[1] = str_replace('"', '', $explode[1]);
$temp[] = $explode[0] . '=' . $explode[1];
}

Loading…
Cancel
Save