mirror of
https://github.com/friendica/friendica
synced 2024-11-13 01:42:59 +00:00
Remove unused param in datetimesel()
This commit is contained in:
parent
3b4625ebdd
commit
659d637b5a
3 changed files with 10 additions and 26 deletions
|
@ -180,10 +180,6 @@ function datetime_convert($from = 'UTC', $to = 'UTC', $s = 'now', $fmt = "Y-m-d
|
||||||
function dob($dob) {
|
function dob($dob) {
|
||||||
list($year,$month,$day) = sscanf($dob,'%4d-%2d-%2d');
|
list($year,$month,$day) = sscanf($dob,'%4d-%2d-%2d');
|
||||||
|
|
||||||
$f = Config::get('system', 'birthday_input_format');
|
|
||||||
if (! $f) {
|
|
||||||
$f = 'ymd';
|
|
||||||
}
|
|
||||||
if ($dob <= '0001-01-01') {
|
if ($dob <= '0001-01-01') {
|
||||||
$value = '';
|
$value = '';
|
||||||
} else {
|
} else {
|
||||||
|
@ -228,15 +224,14 @@ function dob($dob) {
|
||||||
*
|
*
|
||||||
* @return string Parsed HTML output.
|
* @return string Parsed HTML output.
|
||||||
*/
|
*/
|
||||||
function datesel($format, $min, $max, $default, $id = 'datepicker') {
|
function datesel($min, $max, $default, $id = 'datepicker')
|
||||||
return datetimesel($format, $min, $max, $default, '', $id, true, false, '', '');
|
{
|
||||||
|
return datetimesel($min, $max, $default, '', $id, true, false, '', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns a time selector
|
* @brief Returns a time selector
|
||||||
*
|
*
|
||||||
* @param string $format
|
|
||||||
* Format string, e.g. 'ymd' or 'mdy'. Not currently supported
|
|
||||||
* @param $h
|
* @param $h
|
||||||
* Already selected hour
|
* Already selected hour
|
||||||
* @param $m
|
* @param $m
|
||||||
|
@ -246,15 +241,14 @@ function datesel($format, $min, $max, $default, $id = 'datepicker') {
|
||||||
*
|
*
|
||||||
* @return string Parsed HTML output.
|
* @return string Parsed HTML output.
|
||||||
*/
|
*/
|
||||||
function timesel($format, $h, $m, $id = 'timepicker') {
|
function timesel($h, $m, $id = 'timepicker')
|
||||||
return datetimesel($format, new DateTime(), new DateTime(), new DateTime("$h:$m"), '', $id, false, true);
|
{
|
||||||
|
return datetimesel(new DateTime(), new DateTime(), new DateTime("$h:$m"), '', $id, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns a datetime selector.
|
* @brief Returns a datetime selector.
|
||||||
*
|
*
|
||||||
* @param string $format
|
|
||||||
* format string, e.g. 'ymd' or 'mdy'. Not currently supported
|
|
||||||
* @param string $min
|
* @param string $min
|
||||||
* unix timestamp of minimum date
|
* unix timestamp of minimum date
|
||||||
* @param string $max
|
* @param string $max
|
||||||
|
@ -278,8 +272,8 @@ function timesel($format, $h, $m, $id = 'timepicker') {
|
||||||
* @todo Once browser support is better this could probably be replaced with
|
* @todo Once browser support is better this could probably be replaced with
|
||||||
* native HTML5 date picker.
|
* native HTML5 date picker.
|
||||||
*/
|
*/
|
||||||
function datetimesel($format, $min, $max, $default, $label, $id = 'datetimepicker', $pickdate = true, $picktime = true, $minfrom = '', $maxfrom = '', $required = false) {
|
function datetimesel($min, $max, $default, $label, $id = 'datetimepicker', $pickdate = true, $picktime = true, $minfrom = '', $maxfrom = '', $required = false)
|
||||||
|
{
|
||||||
// First day of the week (0 = Sunday)
|
// First day of the week (0 = Sunday)
|
||||||
$firstDay = PConfig::get(local_user(), 'system', 'first_day_of_week', 0);
|
$firstDay = PConfig::get(local_user(), 'system', 'first_day_of_week', 0);
|
||||||
|
|
||||||
|
|
|
@ -475,11 +475,6 @@ function events_content(App $a) {
|
||||||
$fhour = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'H') : 0);
|
$fhour = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'H') : 0);
|
||||||
$fminute = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'i') : 0);
|
$fminute = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'i') : 0);
|
||||||
|
|
||||||
$f = Config::get('system','event_input_format');
|
|
||||||
if (! $f) {
|
|
||||||
$f = 'ymd';
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once 'include/acl_selectors.php' ;
|
require_once 'include/acl_selectors.php' ;
|
||||||
|
|
||||||
$perms = get_acl_permissions($orig_event);
|
$perms = get_acl_permissions($orig_event);
|
||||||
|
@ -511,11 +506,11 @@ function events_content(App $a) {
|
||||||
'$title' => t('Event details'),
|
'$title' => t('Event details'),
|
||||||
'$desc' => t('Starting date and Title are required.'),
|
'$desc' => t('Starting date and Title are required.'),
|
||||||
'$s_text' => t('Event Starts:') . ' <span class="required" title="' . t('Required') . '">*</span>',
|
'$s_text' => t('Event Starts:') . ' <span class="required" title="' . t('Required') . '">*</span>',
|
||||||
'$s_dsel' => datetimesel($f, new DateTime(), DateTime::createFromFormat('Y', $syear+5), DateTime::createFromFormat('Y-m-d H:i', "$syear-$smonth-$sday $shour:$sminute"), t('Event Starts:'), 'start_text', true, true, '', '', true),
|
'$s_dsel' => datetimesel(new DateTime(), DateTime::createFromFormat('Y', $syear+5), DateTime::createFromFormat('Y-m-d H:i', "$syear-$smonth-$sday $shour:$sminute"), t('Event Starts:'), 'start_text', true, true, '', '', true),
|
||||||
'$n_text' => t('Finish date/time is not known or not relevant'),
|
'$n_text' => t('Finish date/time is not known or not relevant'),
|
||||||
'$n_checked' => $n_checked,
|
'$n_checked' => $n_checked,
|
||||||
'$f_text' => t('Event Finishes:'),
|
'$f_text' => t('Event Finishes:'),
|
||||||
'$f_dsel' => datetimesel($f, new DateTime(), DateTime::createFromFormat('Y', $fyear+5), DateTime::createFromFormat('Y-m-d H:i', "$fyear-$fmonth-$fday $fhour:$fminute"), t('Event Finishes:'), 'finish_text', true, true, 'start_text'),
|
'$f_dsel' => datetimesel(new DateTime(), DateTime::createFromFormat('Y', $fyear+5), DateTime::createFromFormat('Y-m-d H:i', "$fyear-$fmonth-$fday $fhour:$fminute"), t('Event Finishes:'), 'finish_text', true, true, 'start_text'),
|
||||||
'$a_text' => t('Adjust for viewer timezone'),
|
'$a_text' => t('Adjust for viewer timezone'),
|
||||||
'$a_checked' => $a_checked,
|
'$a_checked' => $a_checked,
|
||||||
'$d_text' => t('Description:'),
|
'$d_text' => t('Description:'),
|
||||||
|
|
|
@ -655,11 +655,6 @@ function profiles_content(App $a) {
|
||||||
|
|
||||||
$detailled_profile = (PConfig::get(local_user(), 'system', 'detailled_profile') AND $personal_account);
|
$detailled_profile = (PConfig::get(local_user(), 'system', 'detailled_profile') AND $personal_account);
|
||||||
|
|
||||||
$f = Config::get('system', 'birthday_input_format');
|
|
||||||
if (! $f) {
|
|
||||||
$f = 'ymd';
|
|
||||||
}
|
|
||||||
|
|
||||||
$is_default = (($r[0]['is-default']) ? 1 : 0);
|
$is_default = (($r[0]['is-default']) ? 1 : 0);
|
||||||
$tpl = get_markup_template("profile_edit.tpl");
|
$tpl = get_markup_template("profile_edit.tpl");
|
||||||
$o .= replace_macros($tpl, array(
|
$o .= replace_macros($tpl, array(
|
||||||
|
|
Loading…
Reference in a new issue