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