Skip to content

Commit

Permalink
fixed known bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
ronmarasigan committed Aug 29, 2024
1 parent 66f9e12 commit 10d8dc4
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
51 changes: 51 additions & 0 deletions scheme/kernel/Routine.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,4 +365,55 @@ function html_escape($var, $double_encode = TRUE)

return htmlspecialchars($var, ENT_QUOTES, config_item('charset'), $double_encode);
}
}

if ( ! function_exists('is_php'))
{
/**
* Determines if the current version of PHP is equal to or greater than the supplied value
*
* @param string
* @return bool TRUE if the current version is $version or higher
*/
function is_php($version)
{
static $_is_php;
$version = (string) $version;

if ( ! isset($_is_php[$version]))
{
$_is_php[$version] = version_compare(PHP_VERSION, $version, '>=');
}

return $_is_php[$version];
}
}

if ( ! function_exists('is_https'))
{
/**
* Is HTTPS?
*
* Determines if the application is accessed via an encrypted
* (HTTPS) connection.
*
* @return bool
*/
function is_https()
{
if ( ! empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off')
{
return TRUE;
}
elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) === 'https')
{
return TRUE;
}
elseif ( ! empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off')
{
return TRUE;
}

return FALSE;
}
}
2 changes: 1 addition & 1 deletion scheme/language/en-US.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'prev_link' => '<',
'last_link' => 'Last ›',
'page_delimiter' => '/?page=',//if query string is enabled in your config, you can use something like `/?page=` to this
'classes' => array('nav' => '', 'ul' => 'pagination', 'li' => 'page-item', 'a' => 'page-link'),//default for bootstrap 4. You can change the value according to your choice.
'classes' => array('nav' => '', 'ul' => 'pagination', 'li' => 'page-item', 'a' => 'page-link', 'active' => 'active'),//default for bootstrap 4. You can change the value according to your choice.

/**
* Other String to be translated here
Expand Down
2 changes: 1 addition & 1 deletion scheme/libraries/Pagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public function paginate()
{

if($pages == $this->page_array['current'])
$active = 'active';
$active = $this->classes['active'];
else
$active = '';

Expand Down

0 comments on commit 10d8dc4

Please sign in to comment.