DEFINE capital fix, JS action indicator fix, basic class date check fix
- captial DEFINE is now lower case - indicator is visible check in javascript for showing indicator - remove not needed overlay box 100% css, this is set in the stylesheet anway - Fix array pad missing in date compare functions in Basic class
This commit is contained in:
@@ -20,7 +20,7 @@ $paths = array(
|
||||
foreach ($paths as $path) {
|
||||
if (file_exists($path.DS.'convert') && is_file($path.DS.'convert')) {
|
||||
// image magick convert location
|
||||
DEFINE('CONVERT', $path.DS.'convert');
|
||||
define('CONVERT', $path.DS.'convert');
|
||||
}
|
||||
}
|
||||
unset($paths);
|
||||
|
||||
@@ -419,9 +419,11 @@ function actionIndicator(loc, overlay = true)
|
||||
function actionIndicatorShow(loc, overlay = true)
|
||||
{
|
||||
console.log('Indicator: SHOW [%s]', loc);
|
||||
$('#indicator').addClass('progress');
|
||||
setCenter('indicator', true, true);
|
||||
$('#indicator').show();
|
||||
if (!$('#indicator').is(':visible')) {
|
||||
$('#indicator').addClass('progress');
|
||||
setCenter('indicator', true, true);
|
||||
$('#indicator').show();
|
||||
}
|
||||
if (overlay === true) {
|
||||
overlayBoxShow();
|
||||
}
|
||||
@@ -475,12 +477,9 @@ function overlayBoxHide()
|
||||
*/
|
||||
function setOverlayBox()
|
||||
{
|
||||
/* var viewport = document.viewport.getDimensions();
|
||||
$('#overlayBox').css ({
|
||||
width: '100%',
|
||||
height: '100%'
|
||||
});*/
|
||||
$('#overlayBox').show();
|
||||
if (!$('#overlayBox').is(':visible')) {
|
||||
$('#overlayBox').show();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1255,7 +1255,7 @@ class Basic
|
||||
public static function getPageName(int $strip_ext = 0): string
|
||||
{
|
||||
// get the file info
|
||||
$page_temp = pathinfo($_SERVER["PHP_SELF"]);
|
||||
$page_temp = pathinfo($_SERVER['PHP_SELF']);
|
||||
if ($strip_ext == 1) {
|
||||
return $page_temp['filename'];
|
||||
} elseif ($strip_ext == 2) {
|
||||
@@ -1955,7 +1955,7 @@ class Basic
|
||||
if (!$date) {
|
||||
return false;
|
||||
}
|
||||
list ($year, $month, $day) = preg_split("/[\/-]/", $date);
|
||||
list ($year, $month, $day) = array_pad(preg_split("/[\/-]/", $date), 3, null);
|
||||
if (!$year || !$month || !$day) {
|
||||
return false;
|
||||
}
|
||||
@@ -2013,13 +2013,13 @@ class Basic
|
||||
}
|
||||
|
||||
// splits the data up with / or -
|
||||
list ($start_year, $start_month, $start_day) = preg_split('/[\/-]/', $start_date);
|
||||
list ($end_year, $end_month, $end_day) = preg_split('/[\/-]/', $end_date);
|
||||
list ($start_year, $start_month, $start_day) = array_pad(preg_split('/[\/-]/', $start_date), 3, null);
|
||||
list ($end_year, $end_month, $end_day) = array_pad(preg_split('/[\/-]/', $end_date), 3, null);
|
||||
// check that month & day are two digits and then combine
|
||||
foreach (array('start', 'end') as $prefix) {
|
||||
foreach (array('month', 'day') as $date_part) {
|
||||
$_date = $prefix.'_'.$date_part;
|
||||
if ($$_date < 10 && !preg_match("/^0/", $$_date)) {
|
||||
if (isset($$_date) && $$_date < 10 && !preg_match("/^0/", $$_date)) {
|
||||
$$_date = '0'.$$_date;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user