0.8.0.1
This commit is contained in:
58
web/rtc.php
58
web/rtc.php
@@ -4,7 +4,7 @@
|
||||
// Yuba RTC Browser
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
$browser_version = "0.7.13.2";
|
||||
$browser_version = "0.8.0.1";
|
||||
|
||||
require "togggle.php";
|
||||
require "lib/ref/ref.php";
|
||||
@@ -25,7 +25,7 @@ $hidefiles = array(".DS_Store");
|
||||
<meta charset='UTF-8'>
|
||||
<style>
|
||||
|
||||
html { font-family: Helvetica; word-wrap: break-all; word-break: break-all; }
|
||||
html { font-family: Helvetica; word-wrap: break; word-break: break; }
|
||||
|
||||
table.outlined tbody > tr > td > div { outline: 1px solid purple; }
|
||||
table.outlined tbody > tr > td > div > div { outline: 1px solid orange; }
|
||||
@@ -346,7 +346,7 @@ function mb_shortlabel($filename, $max = 40) {
|
||||
}
|
||||
|
||||
function findicon($filename) {
|
||||
$ext = pathinfo($filename)['extension'];
|
||||
$ext = @pathinfo($filename)['extension'];
|
||||
$good = "yicons/null.png";
|
||||
foreach (glob("yicons/*.png") as $file) {
|
||||
if (pathinfo($file)['filename'] == $ext) {
|
||||
@@ -379,16 +379,14 @@ if ($db_file) {
|
||||
$zpath = $dbo->query("SELECT zpath FROM _skim")->fetch()['zpath'];
|
||||
$skim_version = $dbo->query("SELECT version FROM _skim")->fetch()['version'];
|
||||
|
||||
$spotlight_status = $dbo->query("SELECT mdutil FROM _skim")->fetch()['mdutil'];
|
||||
|
||||
// Check for initial view
|
||||
|
||||
$view = $dbo->query("SELECT * FROM _skim")->fetch();
|
||||
$myopts = $view['opts'] = unserialize($view['opts']);
|
||||
|
||||
if (!$pid) {
|
||||
$pid = $dbo->query("SELECT pid FROM family WHERE (rowid=2)")->fetch()['pid'];
|
||||
// handle special strings
|
||||
$view['opts'] = unserialize($view['opts']);
|
||||
if (is_serial($view['qlmanage'])) {
|
||||
$view['qlmanage'] = unserialize($view['qlmanage']);
|
||||
} else {
|
||||
@@ -420,7 +418,7 @@ if ($db_file) {
|
||||
if (is_serial($view['stat'])) {
|
||||
$view['stat'] = unserialize($view['stat']);
|
||||
}
|
||||
if (!strpos($spotlight_status,"disabled")) {
|
||||
if ($myopts['spotlight']) {
|
||||
$dirmdls = $dbo->query("SELECT rowid, * FROM mdls WHERE (rowid='".$view['rowid']."')")->fetch();
|
||||
}
|
||||
}
|
||||
@@ -477,7 +475,6 @@ if ($db_file) {
|
||||
// File view
|
||||
|
||||
$skim_version = $dbo->query("SELECT version FROM _skim")->fetch()['version'];
|
||||
$spotlight_status = $dbo->query("SELECT mdutil FROM _skim")->fetch()['mdutil'];
|
||||
|
||||
$row_a = $dbo->query("SELECT rowid, * FROM files WHERE (pid='".$pid."')")->fetch();
|
||||
if (!$row_a) { // this file doesn't exist in this version of the db
|
||||
@@ -491,7 +488,7 @@ if ($db_file) {
|
||||
$row_a['stat'] = unserialize($row_a['stat']);
|
||||
}
|
||||
|
||||
if (!strpos($spotlight_status,"disabled")) {
|
||||
if ($myopts['spotlight']) {
|
||||
|
||||
$row_b = $dbo->query("SELECT * FROM mdls WHERE (rowid='".$row_a['rowid']."')")->fetch();
|
||||
$row_e = @$dbo->query("SELECT * FROM milk WHERE (rowid='".$row_a['rowid']."')")->fetch();
|
||||
@@ -551,7 +548,7 @@ if ($db_file) {
|
||||
$qlm = unserialize($qlm);
|
||||
$mytype = @$qlm['plugins'][@$row_b['ContentType']];
|
||||
if (!empty($mytype)) {
|
||||
echo "<br><br>QLGenerator used = ".$mytype."<br><br>";
|
||||
echo "<br><br>QLGenerator delegate = ".$mytype."<br><br>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -674,9 +671,8 @@ if ($db_file) {
|
||||
//echo "<table class='dir outlined'><tr><td valign='top'>";
|
||||
echo "<table class='dir'><tr><td valign='top'>";
|
||||
echo "<div class='container'>";
|
||||
|
||||
$spotlight_status = $dbo->query("SELECT mdutil FROM _skim")->fetch()['mdutil'];
|
||||
if (!strpos($spotlight_status,"disabled")) {
|
||||
|
||||
if ($myopts['spotlight']) {
|
||||
|
||||
$sql = "SELECT mdls.*, files.*, milk.* FROM files ";
|
||||
$sql .= "LEFT JOIN mdls ON (files.rowid = mdls.rowid) ";
|
||||
@@ -711,20 +707,10 @@ if ($db_file) {
|
||||
$visibility = "unhidden";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////
|
||||
// hack to preview mixed icon/thumb view
|
||||
$opts = unserialize($dbo->query("SELECT opts FROM _skim")->fetch()['opts']);
|
||||
//$skipicon = array("jpg","png","JPG","jpeg","tif","tiff","DNG","dng","NEF");
|
||||
$skipicon = array();
|
||||
if($item['icon_filename'] && !in_array($item['Extension'],$skipicon)) {
|
||||
$item['thumb_filename'] = $item['icon_filename'];
|
||||
$item['thumb_width'] = $opts['thumb_size'];
|
||||
$item['thumb_height'] = $opts['thumb_size'];
|
||||
$item['thumb_tool'] = "qltool";
|
||||
}
|
||||
////////////////////////////////////////////////
|
||||
|
||||
if ($item['thumb_filename']) {
|
||||
if (@$item['icon_filename']) {
|
||||
$realfile = dirname($db_file).$item['icon_filename'];
|
||||
$icon = "<img class='lazyload' data-src='".$realfile."' width='".$icon_size."' height='".$icon_size."' data-width='".$icon_size."' data-height='".$icon_size."'>";
|
||||
} elseif (@$item['thumb_filename']) {
|
||||
$aspect = $item['thumb_width']/$item['thumb_height'];
|
||||
if ($aspect > 1) {
|
||||
$width = $icon_size;
|
||||
@@ -733,22 +719,8 @@ if ($db_file) {
|
||||
$width = $icon_size*$aspect;
|
||||
$height = $icon_size;
|
||||
}
|
||||
if ($item['Type'] == "dir") {
|
||||
$width = $width/2;
|
||||
$height = $height/2;
|
||||
}
|
||||
$realfile = dirname($db_file).$item['thumb_filename'];
|
||||
if (array_key_exists("thumb_tool",$item)) {
|
||||
if (in_array($item['thumb_tool'], $border_tools) && $item['Type'] != "dir") {
|
||||
// put a border around images that are not icons
|
||||
$border = "id='thumb'";
|
||||
} else {
|
||||
$border = "";
|
||||
}
|
||||
} else {
|
||||
$border = "id='thumb'";
|
||||
}
|
||||
$icon = "<img ".$border." class='lazyload' data-src='".$realfile."' width='".$width."' height='".$height."' data-width='".$width."' data-height='".$height."'>";
|
||||
$icon = "<img id='thumb' class='lazyload' data-src='".$realfile."' width='".$width."' height='".$height."' data-width='".$width."' data-height='".$height."'>";
|
||||
} elseif ($item['Type'] == "dir") {
|
||||
$icon = "<img src='/yicons/directory.png' width='".$icon_size."' height='".$icon_size."' data-width='".$icon_size."' data-height='".$icon_size."'>";
|
||||
} else {
|
||||
@@ -907,7 +879,7 @@ if ($db_file) {
|
||||
echo number_format($info['passed_total'])." files, ";
|
||||
if ($info['image_file']) { echo $info['image_file'].", "; }
|
||||
echo $status;
|
||||
if (strpos($info['mdutil'],"disabled")) { echo " (no spotlight)"; }
|
||||
if (strpos($info['mdutil'],"disabled")) { echo " (volume has spotlight disabled)"; }
|
||||
echo "</div>";
|
||||
}
|
||||
echo "</div>";
|
||||
|
||||
Reference in New Issue
Block a user