Эх сурвалжийг харах

Theme: Integrate settings to customize the style of edit form tables (label, field, heading and row cells).
Editor: Prevent / (slashes) in clip name.
Dialplan Editor: Code cleanup, and minor adjustments for theme compatibility.
Functions: Add option to check_str() to skip string trim.

reliberate 9 жил өмнө
parent
commit
cffdc92d6f
2 өөрчлөгдсөн 11 нэмэгдсэн , 2 устгасан
  1. 5 0
      clipadd.php
  2. 6 2
      clipupdate.php

+ 5 - 0
clipadd.php

@@ -48,6 +48,11 @@ if (count($_POST)>0) {
 	$clip_order = check_str($_POST["clip_order"]);
 	if (strlen($clip_order) == 0) { $clip_order = 0; }
 
+	//no slashes
+	$clip_name = str_replace('/', '|', $clip_name);
+	$clip_name = str_replace('\\', '|', $clip_name);
+
+	//sql insert
 	$sql = "insert into v_clips ";
 	$sql .= "(";
 	$sql .= "clip_uuid, ";

+ 6 - 2
clipupdate.php

@@ -42,11 +42,15 @@ if (count($_POST)>0) {
 	$clip_uuid = check_str($_POST["id"]);
 	$clip_name = check_str($_POST["clip_name"]);
 	$clip_folder = check_str($_POST["clip_folder"]);
-	$clip_text_start = check_str($_POST["clip_text_start"]);
-	$clip_text_end = check_str($_POST["clip_text_end"]);
+	$clip_text_start = check_str($_POST["clip_text_start"], false);
+	$clip_text_end = check_str($_POST["clip_text_end"], false);
 	$clip_desc = check_str($_POST["clip_desc"]);
 	$clip_order = check_str($_POST["clip_order"]);
 
+	//no slashes
+	$clip_name = str_replace('/', '|', $clip_name);
+	$clip_name = str_replace('\\', '|', $clip_name);
+
 	//sql update
 	$sql  = "update v_clips set ";
 	$sql .= "clip_name = '$clip_name', ";