Moved all SQL statements from PHP files into relevant *_db.inc files.
[fa-stable.git] / admin / printers.php
index cd44a8e13f7ce4d1951d5c18a1c9f7806db86484..3334d6b76c6d187c62e4e8e34d3263008e7574b7 100644 (file)
@@ -59,7 +59,7 @@ if ($Mode == 'Delete')
 {
        // PREVENT DELETES IF DEPENDENT RECORDS IN print_profiles
 
-       if (printer_has_profile($selected_id))
+       if (key_in_foreign_table($selected_id, 'print_profiles', 'printer'))
        {
                display_error(_("Cannot delete this printer definition, because print profile have been created using it."));
        }