diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-11-22 14:08:20 -0800 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-11-22 14:08:20 -0800 |
commit | 6f27e8db38c148172017255f9fe442c15b6a843a (patch) | |
tree | 3fe23e767da49448be5d199c405ff1f5d6bf0f4d /include | |
parent | 292b02b58ccb18d10de948d30ccc0cc6ba345d5e (diff) | |
parent | 4c84a2ce615be12adfbeb1067b5c6652330027bb (diff) | |
download | volse-hubzilla-6f27e8db38c148172017255f9fe442c15b6a843a.tar.gz volse-hubzilla-6f27e8db38c148172017255f9fe442c15b6a843a.tar.bz2 volse-hubzilla-6f27e8db38c148172017255f9fe442c15b6a843a.zip |
Merge https://github.com/redmatrix/hubzilla into pending_merge
Conflicts:
version.inc
Diffstat (limited to 'include')
-rw-r--r-- | include/datetime.php | 4 | ||||
-rw-r--r-- | include/network.php | 25 | ||||
-rw-r--r-- | include/system_unavailable.php | 4 |
3 files changed, 26 insertions, 7 deletions
diff --git a/include/datetime.php b/include/datetime.php index b0167edb2..63287d023 100644 --- a/include/datetime.php +++ b/include/datetime.php @@ -198,7 +198,7 @@ function timesel($format, $h, $m, $id='timepicker') { * @todo Once browser support is better this could probably be replaced with * native HTML5 date picker. */ -function datetimesel($format, $min, $max, $default, $id = 'datetimepicker', $pickdate = true, $picktime = true, $minfrom = '', $maxfrom = '', $required = false) { +function datetimesel($format, $min, $max, $default, $id = 'datetimepicker', $pickdate = true, $picktime = true, $minfrom = '', $maxfrom = '', $required = false, $first_day = 0) { $o = ''; $dateformat = ''; @@ -234,7 +234,7 @@ function datetimesel($format, $min, $max, $default, $id = 'datetimepicker', $pic $o .= "<div class='date'><input type='text' placeholder='$readable_format' name='$id' id='$id' $input_text />"; $o .= (($required) ? '<span class="required" title="' . t('Required') . '" >*</span>' : ''); $o .= '</div>'; - $o .= "<script type='text/javascript'>\$(function () {var picker = \$('#$id').datetimepicker({step:5,format:'$dateformat' $minjs $maxjs $pickers $defaultdatejs}); $extra_js})</script>"; + $o .= "<script type='text/javascript'>\$(function () {var picker = \$('#$id').datetimepicker({step:5,format:'$dateformat' $minjs $maxjs $pickers $defaultdatejs,dayOfWeekStart:$first_day}); $extra_js})</script>"; return $o; } diff --git a/include/network.php b/include/network.php index 65599bd05..026f5ee0a 100644 --- a/include/network.php +++ b/include/network.php @@ -320,17 +320,18 @@ function xml_status($st, $message = '') { killme(); } + + /** - * @brief Send HTTP status header and exit. + * @brief Send HTTP status header * * @param int $val * integer HTTP status result value * @param string $msg * optional message - * @returns (does not return, process is terminated) + * @returns nil */ -function http_status_exit($val, $msg = '') { - +function http_status($val, $msg = '') { if ($val >= 400) $msg = (($msg) ? $msg : 'Error'); if ($val >= 200 && $val < 300) @@ -338,10 +339,26 @@ function http_status_exit($val, $msg = '') { logger('http_status_exit ' . $val . ' ' . $msg); header($_SERVER['SERVER_PROTOCOL'] . ' ' . $val . ' ' . $msg); +} + + + +/** + * @brief Send HTTP status header and exit. + * + * @param int $val + * integer HTTP status result value + * @param string $msg + * optional message + * @returns (does not return, process is terminated) + */ +function http_status_exit($val, $msg = '') { + http_status($val, $msg); killme(); } + // convert an XML document to a normalised, case-corrected array // used by webfinger diff --git a/include/system_unavailable.php b/include/system_unavailable.php index 00a73fc38..4e0e6717b 100644 --- a/include/system_unavailable.php +++ b/include/system_unavailable.php @@ -1,7 +1,9 @@ <?php /** @file */ +require_once("include/network.php"); + function system_down() { -header('HTTP/1.0 503 Service Unavailable'); +http_status(503, 'Service Unavailable'); echo <<< EOT <html> <head><title>System Unavailable</title></head> |