Till Brehm
2016-02-09 277af431f5a2cc188d76febd2d0b95e80b8b4b46
interface/web/client/client_template_del.php
@@ -54,13 +54,13 @@
      global $app;
      // check new style
      $rec = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client_template_assigned WHERE client_template_id = ".$this->id);
      $rec = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client_template_assigned WHERE client_template_id = ?", $this->id);
      if($rec['number'] > 0) {
         $app->error($app->tform->lng('template_del_aborted_txt'));
      }
      // check old style
      $rec = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE template_master = ".$this->id." OR template_additional like '%/".$this->id."/%'");
      $rec = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE template_master = ? OR template_additional like ?", $this->id, '%/".$this->id."/%');
      if($rec['number'] > 0) {
         $app->error($app->tform->lng('template_del_aborted_txt'));
      }