Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2019-01-07 03:58:41 +0300
committernachoparker <nacho@ownyourbits.com>2019-01-07 04:43:09 +0300
commit1a056212f17a20cbfccb6a68fb7439088128d352 (patch)
treec1c3a27051566f5edf27740f7a6391f12e302ba2 /ncp-web/elements.php
parentbda1fc468d072c9cf94ef55dc4febd597b22748b (diff)
ncp-web: file type and case insensitive search
Diffstat (limited to 'ncp-web/elements.php')
-rw-r--r--ncp-web/elements.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/ncp-web/elements.php b/ncp-web/elements.php
index 0541db93..ab475784 100644
--- a/ncp-web/elements.php
+++ b/ncp-web/elements.php
@@ -36,7 +36,7 @@ HTML;
$class = '';
if (array_key_exists('type', $param) && ($param['type'] == 'directory' || $param['type'] == 'file'))
- $class = 'path';
+ $class = $param['type'];
$ret .= "<td>
<input type=\"text\"
@@ -54,9 +54,19 @@ HTML;
if (array_key_exists('type', $param) && $param['type'] == 'directory')
{
if (file_exists($param['value']))
- $ret .= "&nbsp;<span class=\"ok-field\">directory exists</span>";
+ $ret .= "&nbsp;<span class=\"ok-field\">path exists</span>";
else
- $ret .= "&nbsp;<span class=\"error-field\">directory doesn't exist</span>";
+ $ret .= "&nbsp;<span class=\"error-field\">path doesn't exist</span>";
+ }
+
+ if (array_key_exists('type', $param) && $param['type'] == 'file')
+ {
+ error_log($param['value']);
+ error_log(dirname($param['value']));
+ if (file_exists(dirname($param['value'])))
+ $ret .= "&nbsp;<span class=\"ok-field\">path exists</span>";
+ else
+ $ret .= "&nbsp;<span class=\"error-field\">path doesn't exist</span>";
}
$ret .= "</td>";