X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fhtmloutputter.php;h=3409ff8f9252bd4473dca6db39b7cd10ca141e7f;hb=1194c47c5dfe17e188e4d2c3e1766755346ce02f;hp=b1aae16fad7a0819b634c4069b60d85837a92c52;hpb=fb9d32a8afdabd2a094f25fbba9c937bc9f0e7c5;p=quix0rs-gnu-social.git diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php index b1aae16fad..3409ff8f92 100644 --- a/lib/htmloutputter.php +++ b/lib/htmloutputter.php @@ -198,6 +198,14 @@ class HTMLOutputter extends XMLOutputter } $attrs['id'] = $id; $attrs['name'] = is_null($name) ? $id : $name; + if (array_key_exists('placeholder', $attrs) && (is_null($attrs['placeholder']) || $attrs['placeholder'] === '')) { + // If placeholder is type-aware equal to '' or null, unset it as we apparently don't want a placeholder value + unset($attrs['placeholder']); + } else { + // If the placeholder is set use it, or use the label as fallback. + $attrs['placeholder'] = isset($attrs['placeholder']) ? $attrs['placeholder'] : $label; + } + if (!is_null($value)) { // value can be 0 or '' $attrs['value'] = $value; } @@ -386,11 +394,11 @@ class HTMLOutputter extends XMLOutputter if (strpos($src, 'plugins/') === 0 || strpos($src, 'local/') === 0) { - $src = common_path($src, StatusNet::isHTTPS()) . '?version=' . GNUSOCIAL_VERSION; + $src = common_path($src, GNUsocial::isHTTPS()) . '?version=' . GNUSOCIAL_VERSION; } else { - if (StatusNet::isHTTPS()) { + if (GNUsocial::isHTTPS()) { $sslserver = common_config('javascript', 'sslserver'); @@ -493,7 +501,7 @@ class HTMLOutputter extends XMLOutputter if(file_exists(Theme::file($src,$theme))){ $src = Theme::path($src, $theme); }else{ - $src = common_path($src, StatusNet::isHTTPS()); + $src = common_path($src, GNUsocial::isHTTPS()); } $src.= '?version=' . GNUSOCIAL_VERSION; }