summary refs log tree commit diff stats
path: root/php
diff options
context:
space:
mode:
authorNaglfar <naglfar@tilde.institute>2021-01-12 19:47:21 +0100
committerNaglfar <naglfar@tilde.institute>2021-01-12 19:47:21 +0100
commitf33dd412056f3ee762513d40030f134e7b8ccb9b (patch)
tree30909208870de010b19dbe8f4f90fd4b3dff9b70 /php
parent62caca0d8e0307e7a25ddbd0d560b13235ad19bf (diff)
downloadMightyWVMS-f33dd412056f3ee762513d40030f134e7b8ccb9b.tar.gz
Use video for title only on its own page
Diffstat (limited to 'php')
-rw-r--r--php/definitions.php1
-rw-r--r--php/rd-procedures.php3
-rw-r--r--php/wd-procedures.php5
3 files changed, 9 insertions, 0 deletions
diff --git a/php/definitions.php b/php/definitions.php
index f1909ed..ab82199 100644
--- a/php/definitions.php
+++ b/php/definitions.php
@@ -3,4 +3,5 @@ $dpath = 'data/';
 $common = 'common.mvms';  # common header/footer contents
 $channel = 'channel';	  # Channel index
 $cpath = 'mvms/';	  # Path of the contents
+$title = 0;
 ?>
diff --git a/php/rd-procedures.php b/php/rd-procedures.php
index 70ba50c..9f4d586 100644
--- a/php/rd-procedures.php
+++ b/php/rd-procedures.php
@@ -10,7 +10,10 @@ $vdata = explode('/', $_SERVER['REQUEST_URI']);
 /* 2 security check */
 if(!empty($vdata[1]))
   if(in_array($vdata[1], $vindex))
+  {
     $vid = $vdata[1];
+    $title = 1;
+  }
 
 $vdata = file($dpath.$wsdata[4].'/toc/'.$vid, FILE_IGNORE_NEW_LINES);
 $cindex = file($dpath.$wsdata[4].'/'.$channel, FILE_IGNORE_NEW_LINES);
diff --git a/php/wd-procedures.php b/php/wd-procedures.php
index 768a44d..d42de46 100644
--- a/php/wd-procedures.php
+++ b/php/wd-procedures.php
@@ -4,4 +4,9 @@ file_put_contents($dpath.$wsdata[4].'/toc/'.$vid, implode(PHP_EOL, $vdata));
 
 $vdata[1] = date('M j, Y', $vdata[1]);
 $vdata[] = file_get_contents($dpath.$wsdata[4].'/'.$cpath.$vid);
+
+if($title)
+  $title = $vdata[2];
+else
+  $title = $wsdata[5];
 ?>