Temporary fixes for php encoding library bugs ending with segfault.
[fa-stable.git] / dimensions / dimension_entry.php
index d5c4f2a9fab9b6daa1fe83bd1e4488477f2a7c84..f46be106cc12e50b266030a63fe69759cc6cba77 100644 (file)
@@ -14,7 +14,6 @@ $path_to_root = "..";
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
-include_once($path_to_root . "/includes/manufacturing.inc");
 include_once($path_to_root . "/includes/data_checks.inc");
 
 include_once($path_to_root . "/admin/db/tags_db.inc");
@@ -110,17 +109,8 @@ function can_process()
 
        if ($selected_id == -1) 
        {
-
-       if (!$Refs->is_valid($_POST['ref'])) 
-       {
-               display_error( _("The dimension reference must be entered."));
-                       set_focus('ref');
-               return false;
-       }
-
-       if (!is_new_reference($_POST['ref'], ST_DIMENSION)) 
+       if (!check_reference($_POST['ref'], ST_DIMENSION))
        {
-               display_error(_("The entered reference is already in use."));
                        set_focus('ref');
                return false;
        }
@@ -265,7 +255,7 @@ if ($selected_id != -1)
 else 
 {
        $_POST['dimension_tags'] = array();
-       ref_row(_("Dimension Reference:"), 'ref', '', $Refs->get_next(ST_DIMENSION));
+       ref_row(_("Dimension Reference:"), 'ref', '', $Refs->get_next(ST_DIMENSION), false, ST_DIMENSION);
 }
 
 text_row_ex(_("Name") . ":", 'name', 50, 75);