From fc279ece663d1219f0d4352f3c90fee50e239299 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 3 May 2016 19:59:50 -0400 Subject: [PATCH] Remove useless code --- lib/helpers.php | 55 ------------------------------------------------- 1 file changed, 55 deletions(-) diff --git a/lib/helpers.php b/lib/helpers.php index ee8231b..4c6c63b 100644 --- a/lib/helpers.php +++ b/lib/helpers.php @@ -7,9 +7,6 @@ function is_secure_connection() return ! empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'; } -/* - * get Version number from git archive output - */ function parse_app_version($refnames, $commithash) { $version = 'master'; @@ -29,9 +26,6 @@ function parse_app_version($refnames, $commithash) return $version; } -/* - * get Image extension from mime type - */ function favicon_extension($type) { $types = array( @@ -135,15 +129,6 @@ function summary($value, $min_length = 5, $max_length = 120, $end = '[...]') return $value; } -function in_list($id, array $listing) -{ - if (isset($listing[$id])) { - return escape($listing[$id]); - } - - return '?'; -} - function relative_time($timestamp, $fallback_date_format = '%e %B %Y %k:%M') { $diff = time() - $timestamp; @@ -220,12 +205,6 @@ function form_hidden($name, $values = array()) return ''; } -function form_default_select($name, array $options, $values = array(), array $errors = array(), $class = '') -{ - $options += array('' => '?'); - return form_select($name, $options, $values, $errors, $class); -} - function form_select($name, array $options, $values = array(), array $errors = array(), $class = '') { $html = ''.escape($label).''; @@ -275,19 +243,6 @@ function form_label($label, $name, $class = '') return ''; } -function form_textarea($name, $values = array(), array $errors = array(), array $attributes = array(), $class = '') -{ - $class .= error_class($errors, $name); - - $html = ''; - $html .= error_list($errors, $name); - - return $html; -} - function form_input($type, $name, $values = array(), array $errors = array(), array $attributes = array(), $class = '') { $class .= error_class($errors, $name); @@ -309,16 +264,6 @@ function form_password($name, $values = array(), array $errors = array(), array return form_input('password', $name, $values, $errors, $attributes, $class); } -function form_email($name, $values = array(), array $errors = array(), array $attributes = array(), $class = '') -{ - return form_input('email', $name, $values, $errors, $attributes, $class); -} - -function form_date($name, $values = array(), array $errors = array(), array $attributes = array(), $class = '') -{ - return form_input('date', $name, $values, $errors, $attributes, $class); -} - function form_number($name, $values = array(), array $errors = array(), array $attributes = array(), $class = '') { return form_input('number', $name, $values, $errors, $attributes, $class);