diff --git a/scheme/kernel/Routine.php b/scheme/kernel/Routine.php index 62908bf..02dfae0 100644 --- a/scheme/kernel/Routine.php +++ b/scheme/kernel/Routine.php @@ -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; + } } \ No newline at end of file diff --git a/scheme/language/en-US.php b/scheme/language/en-US.php index df3e5b5..074ad1f 100644 --- a/scheme/language/en-US.php +++ b/scheme/language/en-US.php @@ -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 diff --git a/scheme/libraries/Pagination.php b/scheme/libraries/Pagination.php index 7a0df30..9fd9b10 100644 --- a/scheme/libraries/Pagination.php +++ b/scheme/libraries/Pagination.php @@ -265,7 +265,7 @@ public function paginate() { if($pages == $this->page_array['current']) - $active = 'active'; + $active = $this->classes['active']; else $active = '';