summaryrefslogtreecommitdiffstats
path: root/apps/files_external/templates
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@karoshi.org.uk>2014-03-20 18:28:42 +0000
committerRobin McCorkell <rmccorkell@karoshi.org.uk>2014-03-20 18:28:42 +0000
commit7a0eccfc63e80ea27188032135560dbb45a1e5cb (patch)
tree0692f6e7cb295fd7a037693b8b52eb18f87fb352 /apps/files_external/templates
parented0c10a10b0b3a9d9d898a64461de707026cd6d3 (diff)
downloadnextcloud-server-7a0eccfc63e80ea27188032135560dbb45a1e5cb.tar.gz
nextcloud-server-7a0eccfc63e80ea27188032135560dbb45a1e5cb.zip
Correct field modifier checking
Existing code checks for the existence of a modifier ('&', '!', '#', '*') anywhere in the field name, but strips the first character regardless. This change makes it so that only modifiers at the beginning of the string are counted.
Diffstat (limited to 'apps/files_external/templates')
-rw-r--r--apps/files_external/templates/settings.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php
index 8e9355dd8a5..ecbde442de0 100644
--- a/apps/files_external/templates/settings.php
+++ b/apps/files_external/templates/settings.php
@@ -52,18 +52,18 @@
$placeholder = substr($placeholder, 1);
}
?>
- <?php if (strpos($placeholder, '*') !== false): ?>
+ <?php if (strpos($placeholder, '*') === 0): ?>
<input type="password"
<?php if ($is_optional): ?> class="optional"<?php endif; ?>
data-parameter="<?php p($parameter); ?>"
value="<?php p($value); ?>"
placeholder="<?php p(substr($placeholder, 1)); ?>" />
- <?php elseif (strpos($placeholder, '!') !== false): ?>
+ <?php elseif (strpos($placeholder, '!') === 0): ?>
<label><input type="checkbox"
data-parameter="<?php p($parameter); ?>"
<?php if ($value == 'true'): ?> checked="checked"<?php endif; ?>
/><?php p(substr($placeholder, 1)); ?></label>
- <?php elseif (strpos($placeholder, '#') !== false): ?>
+ <?php elseif (strpos($placeholder, '#') === 0): ?>
<input type="hidden"
data-parameter="<?php p($parameter); ?>"
value="<?php p($value); ?>" />