Skip to content

Instantly share code, notes, and snippets.

@kostyakoz
Forked from Abban/anchor.php
Last active December 20, 2015 19:18
Show Gist options
  • Save kostyakoz/6181931 to your computer and use it in GitHub Desktop.
Save kostyakoz/6181931 to your computer and use it in GitHub Desktop.
Перевод на русский
<?php
// В файле anchor/libraries/anchor.php меняем строки 50 - 65 с:
public static function functions() {
if( ! is_admin()) {
$fi = new FilesystemIterator(APP . 'functions', FilesystemIterator::SKIP_DOTS);
foreach($fi as $file) {
if($file->isFile() and $file->isReadable() and '.' . $file->getExtension() == EXT) {
require $file->getPathname();
}
}
// include theme functions
if(is_readable($path = PATH . 'themes' . DS . Config::meta('theme') . DS . 'functions.php')) {
require $path;
}
}
}
// На
public static function functions() {
if( ! is_admin()) {
$fi = new FilesystemIterator(APP . 'functions', FilesystemIterator::SKIP_DOTS);
foreach($fi as $file) {
$ext = (version_compare(PHP_VERSION, '5.3.6') < 0) ? pathinfo($file, PATHINFO_EXTENSION) : $file->getExtension();
if($file->isFile() and $file->isReadable() and '.' . $ext == EXT) {
require $file->getPathname();
}
}
// include theme functions
if(is_readable($path = PATH . 'themes' . DS . Config::meta('theme') . DS . 'functions.php')) {
require $path;
}
}
}
<?php
//В файле system/boot.php меняем строки 16 - 19 с
if(version_compare(PHP_VERSION, '5.3.6') < 0) {
echo 'We need PHP 5.3.6 or higher, you are running ' . PHP_VERSION;
exit;
}
// На
if(version_compare(PHP_VERSION, '5.3.0') < 0) {
echo 'We need PHP 5.3.6 or higher, you are running ' . PHP_VERSION;
exit;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment