Skip to content
This repository has been archived by the owner on Oct 22, 2020. It is now read-only.

Commit

Permalink
SUP-73 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Hmayak Tigranyan committed Aug 27, 2013
1 parent 5273907 commit f8e3096
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mod/admin/lib_mt_customization.inc
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ function mt_customization_add_terms($mt_term) {
function mt_customization_add_new_taxonomy() {
global $global;
$term = str_replace(" ", "", strtolower($_POST['term']));
$term = str_replace("-", "_", $term);
$term = preg_replace('/[^A-Za-z0-9\-_]/', '', $term); // Removes special chars.
$term = trim($term);
if (!$term) {
Expand All @@ -200,6 +201,7 @@ function mt_customization_add_new_taxonomy() {

$dbQuery = new Browse();
try {

$dbQuery->ExecuteNonQuery("insert into mt_index(`no`,`term`) values(" . $code . ",'" . $term . "')");

$sql = "CREATE TABLE IF NOT EXISTS mt_" . $code . "_" . $term . "(
Expand Down

0 comments on commit f8e3096

Please sign in to comment.