mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-30 15:52:17 +09:00
Merge branch 'develop' into pr/new-config-format
Conflicts: common/legacy.php
This commit is contained in:
commit
e55504e1f4
7 changed files with 14 additions and 20 deletions
|
|
@ -32,13 +32,6 @@
|
|||
// Fill in the XE vid.
|
||||
if (typeof(xeVid) != "undefined") params.vid = xeVid;
|
||||
|
||||
// Add 'error' and 'message' to response tags.
|
||||
if (typeof(return_fields) == "undefined" || return_fields.length < 1) {
|
||||
return_fields = ["error", "message"];
|
||||
} else {
|
||||
return_fields.push("error", "message");
|
||||
}
|
||||
|
||||
// Decide whether or not to use SSL.
|
||||
var url = request_uri;
|
||||
if ($.isArray(ssl_actions) && params.act && $.inArray(params.act, ssl_actions) >= 0) {
|
||||
|
|
@ -75,7 +68,7 @@
|
|||
// Copy data to the result object.
|
||||
var result = {};
|
||||
$.each(data, function(key, val) {
|
||||
if (key == "act" || key == "redirect_url" || $.inArray(key, return_fields)) {
|
||||
if ($.inArray(key, ["error", "message", "act", "redirect_url"]) >= 0 || $.inArray(key, return_fields) >= 0) {
|
||||
if ($.isArray(val)) {
|
||||
result[key] = { item: val };
|
||||
} else {
|
||||
|
|
@ -250,7 +243,7 @@
|
|||
if (typeof(xeVid) != "undefined") params.vid = xeVid;
|
||||
|
||||
// Determine the request type.
|
||||
if(!$.inArray(type, ["html", "append", "prepend"])) type = "html";
|
||||
if($.inArray(type, ["html", "append", "prepend"]) < 0) type = "html";
|
||||
var self = $(this);
|
||||
|
||||
// Delay the waiting message for 1 second to prevent rapid blinking.
|
||||
|
|
|
|||
|
|
@ -580,7 +580,7 @@ function zdate($str, $format = 'Y-m-d H:i:s', $conversion = true)
|
|||
{
|
||||
$format = $convtable[$lang_type][$format];
|
||||
}
|
||||
elseif(isset($convtable[$convtable[$lang_type]][$format]))
|
||||
elseif(is_string($convtable[$lang_type]) && isset($convtable[$convtable[$lang_type]][$format]))
|
||||
{
|
||||
$format = $convtable[$convtable[$lang_type]][$format];
|
||||
}
|
||||
|
|
@ -593,10 +593,10 @@ function zdate($str, $format = 'Y-m-d H:i:s', $conversion = true)
|
|||
// change day and am/pm for each language
|
||||
if(preg_match('/[MFAa]/', $format))
|
||||
{
|
||||
$unit_week = Context::getLang('unit_week');
|
||||
$unit_meridiem = Context::getLang('unit_meridiem');
|
||||
$string = str_replace(array('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'), $unit_week, $result);
|
||||
$string = str_replace(array('am', 'pm', 'AM', 'PM'), $unit_meridiem, $result);
|
||||
$unit_week = (Array)Context::getLang('unit_week');
|
||||
$unit_meridiem = (Array)Context::getLang('unit_meridiem');
|
||||
$result = str_replace(array('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'), $unit_week, $result);
|
||||
$result = str_replace(array('am', 'pm', 'AM', 'PM'), $unit_meridiem, $string);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue