summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorNaglfar <naglfar@tilde.institute>2021-01-12 00:19:44 +0100
committerNaglfar <naglfar@tilde.institute>2021-01-12 00:19:44 +0100
commitc8b552127946c1062010bf3b290939ec3c53e916 (patch)
tree2ab748a403b12e2ebf819e50ddedbc0c373b474e
parent1efc40bb5b5d5f902f283c769a824d7c8661e306 (diff)
downloadMightyWVMS-c8b552127946c1062010bf3b290939ec3c53e916.tar.gz
Checks if a parameter exists
-rw-r--r--php/rd-procedures.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/php/rd-procedures.php b/php/rd-procedures.php
index da53160..70ba50c 100644
--- a/php/rd-procedures.php
+++ b/php/rd-procedures.php
@@ -9,9 +9,8 @@ $vdata = explode('/', $_SERVER['REQUEST_URI']);
 
 /* 2 security check */
 if(!empty($vdata[1]))
-  foreach($vindex as $i => $value)
-    if($vdata[1] == $value)
-      $vid = $value;
+  if(in_array($vdata[1], $vindex))
+    $vid = $vdata[1];
 
 $vdata = file($dpath.$wsdata[4].'/toc/'.$vid, FILE_IGNORE_NEW_LINES);
 $cindex = file($dpath.$wsdata[4].'/'.$channel, FILE_IGNORE_NEW_LINES);