diff --git a/.gitignore b/.gitignore index 9de9e72..6ea712f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,11 +4,13 @@ plugins/*.php config.php uploads/* !uploads/index.html +!uploads/.htaccess !uploads/php.ini !uploads/thumbs uploads/thumbs/* !uploads/thumbs/index.html !uploads/thumbs/php.ini +!uploads/thumbs/.htaccess .DS_Store */.DS_Store */*/.DS_Store diff --git a/includes/adm/p_check_update.php b/includes/adm/p_check_update.php index 4899fb3..dd46a6e 100755 --- a/includes/adm/p_check_update.php +++ b/includes/adm/p_check_update.php @@ -23,7 +23,9 @@ if($current_smt == 'general'): //get data from kleeja database $b_url = empty($_SERVER['SERVER_NAME']) ? $config['siteurl'] : $_SERVER['SERVER_NAME']; -$b_data = fetch_remote_file('http://www.kleeja.com/check_vers/?i=' . urlencode($b_url) . '&v=' . KLEEJA_VERSION, false, 6); +$b_data = fetch_remote_file('https://raw.githubusercontent.com/awssat/kleeja/master/includes/version.php', false, 6); + + if ($b_data === false && !ig('show_msg')) { @@ -32,12 +34,20 @@ if ($b_data === false && !ig('show_msg')) } else { - // - // there is a file that we brought it ! - // - $b_data = @explode('|', $b_data); + preg_match_all('/define\(\'KLEEJA_VERSION\',\s{1,4}\'([^\']+)\'\);/', $b_data, $matches, PREG_SET_ORDER, 0); - $version_data = trim(htmlspecialchars($b_data[0])); + if (empty($matches[0][1])) + { + $text = $lang['ERROR_CHECK_VER']; + $error = true; + } +} + + +if(!$error) +{ + + $version_data = trim(htmlspecialchars($matches[1])); if (version_compare(strtolower(KLEEJA_VERSION), strtolower($version_data), '<')) { @@ -77,8 +87,7 @@ else $data = array( 'version_number' => $version_data, 'last_check' => time(), - 'msg_appeared' => ig('show_msg') ? true : false, - 'copyrights' => !empty($b_data[1]) && strpos($b_data[1], 'yes') !== false ? true : false, + 'msg_appeared' => ig('show_msg') ? true : false ); $data = serialize($data); diff --git a/includes/style.php b/includes/style.php index aba5c4c..a35e59a 100755 --- a/includes/style.php +++ b/includes/style.php @@ -308,11 +308,7 @@ class kleeja_style global $config; $this->vars = &$GLOBALS; - $k = '
P' . - 'owe' . 'red b' . 'y K' . 'lee' . 'ja
' . "\n"; + //is there ? if (!file_exists(PATH . 'cache/tpl_' . $this->re_name_tpl($template_name, $style_path) . '.php') || !$this->caching) { @@ -324,21 +320,6 @@ class kleeja_style $page = ob_get_contents(); ob_end_clean(); - if ($template_name == strip_tags('header')) - { - $v = @unserialize($config['new_version']); - if ((int)$v[strip_tags('copyrights')] == /*kleeja is sweety*/ - 0/*SO, be sweety*/) - { - $t = strip_tags('body'); - $page = preg_replace('/<' . $t . '[^>]*>/', '<' . $t . ">\n" . $k, $page, -1, $c); - if (!$c) - { - $page .= $k; - } - } - } - return $page; } diff --git a/includes/version.php b/includes/version.php index 342eb70..e29391c 100755 --- a/includes/version.php +++ b/includes/version.php @@ -16,7 +16,7 @@ if (!defined('IN_COMMON')) -define('KLEEJA_VERSION', '2.2'); +define('KLEEJA_VERSION', '2.3'); define('KLEEJA_DB_VERSION', '9'); diff --git a/styles/bootstrap/footer.html b/styles/bootstrap/footer.html index 2059b8a..1314429 100755 --- a/styles/bootstrap/footer.html +++ b/styles/bootstrap/footer.html @@ -15,6 +15,10 @@ +
+ Powered by Kleeja +
+
diff --git a/styles/default/footer.html b/styles/default/footer.html index 90454e0..a759ffd 100755 --- a/styles/default/footer.html +++ b/styles/default/footer.html @@ -36,6 +36,12 @@
+
+ Powered by + Kleeja +
+ diff --git a/styles/default/header.html b/styles/default/header.html index 5021ec6..82d53c0 100755 --- a/styles/default/header.html +++ b/styles/default/header.html @@ -82,4 +82,4 @@
- + \ No newline at end of file