mirror of
https://github.com/flextype/flextype.git
synced 2025-08-11 15:44:49 +02:00
Merge pull request #84 from flextype/scrutinizer-patch-1
Scrutinizer Auto-Fixes
This commit is contained in:
@@ -137,28 +137,28 @@ class Cache
|
||||
// that come with PHP so no additional setup is required in order to use it.
|
||||
case 'apc':
|
||||
$driver = new DoctrineCache\ApcCache();
|
||||
break;
|
||||
break;
|
||||
// The ApcuCache driver uses the apcu_fetch, apcu_exists, etc. functions
|
||||
// that come with PHP so no additional setup is required in order to use it.
|
||||
case 'apcu':
|
||||
$driver = new DoctrineCache\ApcuCache();
|
||||
break;
|
||||
break;
|
||||
// The ArrayCache driver stores the cache data in PHPs memory and is not persisted anywhere.
|
||||
// This can be useful for caching things in memory for a single process when you don't need the cache to be persistent across processes.
|
||||
case 'array':
|
||||
$driver = new DoctrineCache\ArrayCache();
|
||||
break;
|
||||
break;
|
||||
// The WinCacheCache driver uses the wincache_ucache_get, wincache_ucache_exists, etc. functions
|
||||
// that come with the wincache extension
|
||||
// http://php.net/manual/en/book.wincache.php
|
||||
case 'wincache':
|
||||
$driver = new DoctrineCache\WinCacheCache();
|
||||
break;
|
||||
break;
|
||||
// The XcacheCache driver uses functions that come with the xcache extension
|
||||
// https://xcache.lighttpd.net
|
||||
case 'xcache':
|
||||
$driver = new DoctrineCache\XcacheCache();
|
||||
break;
|
||||
break;
|
||||
// The MemcacheCache drivers stores the cache data in Memcache.
|
||||
case 'memcache':
|
||||
$memcache = new \Memcache();
|
||||
@@ -326,7 +326,7 @@ class Cache
|
||||
return;
|
||||
}
|
||||
|
||||
$interval = $future - Cache::$now;
|
||||
$interval = $future-Cache::$now;
|
||||
|
||||
if ($interval > 0 && $interval < Cache::getLifetime()) {
|
||||
Cache::$lifetime = $interval;
|
||||
|
@@ -158,7 +158,7 @@ class Entries
|
||||
if ($url === '') {
|
||||
$file_path = PATH['entries'] . '/' . Registry::get('settings.entries.main') . '/entry.html';
|
||||
} else {
|
||||
$file_path = PATH['entries'] . '/' . $url . '/entry.html';
|
||||
$file_path = PATH['entries'] . '/' . $url . '/entry.html';
|
||||
}
|
||||
|
||||
// If entry exist
|
||||
@@ -399,7 +399,7 @@ class Entries
|
||||
*/
|
||||
private static function displayCurrentEntry() : void
|
||||
{
|
||||
Http::setRequestHeaders('Content-Type: text/html; charset='.Registry::get('settings.charset'));
|
||||
Http::setRequestHeaders('Content-Type: text/html; charset=' . Registry::get('settings.charset'));
|
||||
Themes::view(empty(Entries::$entry['template']) ? 'templates/default' : 'templates/' . Entries::$entry['template'])
|
||||
->assign('entry', Entries::$entry, true)
|
||||
->display();
|
||||
|
@@ -149,7 +149,7 @@ class Flextype
|
||||
|
||||
// Set settings files path
|
||||
$default_settings_file_path = PATH['config']['default'] . '/settings.yaml';
|
||||
$site_settings_file_path = PATH['config']['site'] . '/settings.yaml';
|
||||
$site_settings_file_path = PATH['config']['site'] . '/settings.yaml';
|
||||
|
||||
// Set settings if Flextype settings and Site settings config files exist
|
||||
if (Filesystem::has($default_settings_file_path) && Filesystem::has($site_settings_file_path)) {
|
||||
|
@@ -153,8 +153,8 @@ class Images
|
||||
*/
|
||||
public static function getImage(string $path, array $params, array $attributes = []) : string
|
||||
{
|
||||
if (file_exists(PATH['entries'] . '/' . $path)) {
|
||||
return '<img '.Html::attributes($attributes).' src="'. Images::getImageUrl($path, $params) .'">';
|
||||
if (file_exists(PATH['entries'] . '/' . $path)) {
|
||||
return '<img ' . Html::attributes($attributes) . ' src="' . Images::getImageUrl($path, $params) . '">';
|
||||
} else {
|
||||
return "File {$path} does not exist.";
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ class Menus
|
||||
if (Filesystem::has($menu_path)) {
|
||||
return YamlParser::decode(Filesystem::read($menu_path));
|
||||
} else {
|
||||
throw new \RuntimeException("Menu {$menu_name} does not exist.");
|
||||
}
|
||||
throw new \RuntimeException("Menu {$menu_name} does not exist.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -33,163 +33,163 @@ class Plugins
|
||||
* @var array
|
||||
*/
|
||||
private static $locales = [
|
||||
'af' => [ 'name' => 'Afrikaans', 'nativeName' => 'Afrikaans' ],
|
||||
'af_ZA' => [ 'name' => 'Afrikaans', 'nativeName' => 'Afrikaans' ],
|
||||
'ak' => [ 'name' => 'Akan', 'nativeName' => 'Akan' ], // unverified native name
|
||||
'ast' => [ 'name' => 'Asturian', 'nativeName' => 'Asturianu' ],
|
||||
'ar' => [ 'name' => 'Arabic', 'nativeName' => 'عربي', 'orientation' => 'rtl'],
|
||||
'ar_SA' => [ 'name' => 'Arabic', 'nativeName' => 'عربي', 'orientation' => 'rtl'],
|
||||
'as' => [ 'name' => 'Assamese', 'nativeName' => 'অসমীয়া' ],
|
||||
'be' => [ 'name' => 'Belarusian', 'nativeName' => 'Беларуская' ],
|
||||
'bg' => [ 'name' => 'Bulgarian', 'nativeName' => 'Български' ],
|
||||
'bn' => [ 'name' => 'Bengali', 'nativeName' => 'বাংলা' ],
|
||||
'bn_BD' => [ 'name' => 'Bengali (Bangladesh)', 'nativeName' => 'বাংলা (বাংলাদেশ)' ],
|
||||
'bn_IN' => [ 'name' => 'Bengali (India)', 'nativeName' => 'বাংলা (ভারত)' ],
|
||||
'br' => [ 'name' => 'Breton', 'nativeName' => 'Brezhoneg' ],
|
||||
'bs' => [ 'name' => 'Bosnian', 'nativeName' => 'Bosanski' ],
|
||||
'ca' => [ 'name' => 'Catalan', 'nativeName' => 'Català' ],
|
||||
'ca_ES' => [ 'name' => 'Catalan', 'nativeName' => 'Català' ],
|
||||
'ca_valencia'=> [ 'name' => 'Catalan (Valencian)', 'nativeName' => 'Català (valencià)' ], // not iso-639-1. a=l10n-drivers
|
||||
'cs' => [ 'name' => 'Czech', 'nativeName' => 'Čeština' ],
|
||||
'cs_CZ' => [ 'name' => 'Czech', 'nativeName' => 'Čeština' ],
|
||||
'cy' => [ 'name' => 'Welsh', 'nativeName' => 'Cymraeg' ],
|
||||
'da' => [ 'name' => 'Danish', 'nativeName' => 'Dansk' ],
|
||||
'da_DK' => [ 'name' => 'Danish', 'nativeName' => 'Dansk' ],
|
||||
'de' => [ 'name' => 'German', 'nativeName' => 'Deutsch' ],
|
||||
'de_AT' => [ 'name' => 'German (Austria)', 'nativeName' => 'Deutsch (Österreich)' ],
|
||||
'de_CH' => [ 'name' => 'German (Switzerland)', 'nativeName' => 'Deutsch (Schweiz)' ],
|
||||
'de_DE' => [ 'name' => 'German (Germany)', 'nativeName' => 'Deutsch (Deutschland)' ],
|
||||
'dsb' => [ 'name' => 'Lower Sorbian', 'nativeName' => 'Dolnoserbšćina' ], // iso-639-2
|
||||
'el' => [ 'name' => 'Greek', 'nativeName' => 'Ελληνικά' ],
|
||||
'el_GR' => [ 'name' => 'Greek', 'nativeName' => 'Ελληνικά' ],
|
||||
'en' => [ 'name' => 'English', 'nativeName' => 'English' ],
|
||||
'en_AU' => [ 'name' => 'English (Australian)', 'nativeName' => 'English (Australian)' ],
|
||||
'en_CA' => [ 'name' => 'English (Canadian)', 'nativeName' => 'English (Canadian)' ],
|
||||
'en_GB' => [ 'name' => 'English (British)', 'nativeName' => 'English (British)' ],
|
||||
'en_NZ' => [ 'name' => 'English (New Zealand)', 'nativeName' => 'English (New Zealand)' ],
|
||||
'en_US' => [ 'name' => 'English (US)', 'nativeName' => 'English (US)' ],
|
||||
'en_ZA' => [ 'name' => 'English (South African)', 'nativeName' => 'English (South African)' ],
|
||||
'eo' => [ 'name' => 'Esperanto', 'nativeName' => 'Esperanto' ],
|
||||
'es' => [ 'name' => 'Spanish', 'nativeName' => 'Español' ],
|
||||
'es_AR' => [ 'name' => 'Spanish (Argentina)', 'nativeName' => 'Español (de Argentina)' ],
|
||||
'es_CL' => [ 'name' => 'Spanish (Chile)', 'nativeName' => 'Español (de Chile)' ],
|
||||
'es_ES' => [ 'name' => 'Spanish (Spain)', 'nativeName' => 'Español (de España)' ],
|
||||
'es_MX' => [ 'name' => 'Spanish (Mexico)', 'nativeName' => 'Español (de México)' ],
|
||||
'et' => [ 'name' => 'Estonian', 'nativeName' => 'Eesti keel' ],
|
||||
'eu' => [ 'name' => 'Basque', 'nativeName' => 'Euskara' ],
|
||||
'fa' => [ 'name' => 'Persian', 'nativeName' => 'فارسی' , 'orientation' => 'rtl' ],
|
||||
'fi' => [ 'name' => 'Finnish', 'nativeName' => 'Suomi' ],
|
||||
'fi_FI' => [ 'name' => 'Finnish', 'nativeName' => 'Suomi' ],
|
||||
'fj_FJ' => [ 'name' => 'Fijian', 'nativeName' => 'Vosa vaka_Viti' ],
|
||||
'fr' => [ 'name' => 'French', 'nativeName' => 'Français' ],
|
||||
'fr_CA' => [ 'name' => 'French (Canada)', 'nativeName' => 'Français (Canada)' ],
|
||||
'fr_FR' => [ 'name' => 'French (France)', 'nativeName' => 'Français (France)' ],
|
||||
'fur' => [ 'name' => 'Friulian', 'nativeName' => 'Furlan' ],
|
||||
'fur_IT' => [ 'name' => 'Friulian', 'nativeName' => 'Furlan' ],
|
||||
'fy' => [ 'name' => 'Frisian', 'nativeName' => 'Frysk' ],
|
||||
'fy_NL' => [ 'name' => 'Frisian', 'nativeName' => 'Frysk' ],
|
||||
'ga' => [ 'name' => 'Irish', 'nativeName' => 'Gaeilge' ],
|
||||
'ga_IE' => [ 'name' => 'Irish (Ireland)', 'nativeName' => 'Gaeilge (Éire)' ],
|
||||
'gd' => [ 'name' => 'Gaelic (Scotland)', 'nativeName' => 'Gàidhlig' ],
|
||||
'gl' => [ 'name' => 'Galician', 'nativeName' => 'Galego' ],
|
||||
'gu' => [ 'name' => 'Gujarati', 'nativeName' => 'ગુજરાતી' ],
|
||||
'gu_IN' => [ 'name' => 'Gujarati', 'nativeName' => 'ગુજરાતી' ],
|
||||
'he' => [ 'name' => 'Hebrew', 'nativeName' => 'עברית', 'orientation' => 'rtl' ],
|
||||
'he_IL' => [ 'name' => 'Hebrew', 'nativeName' => 'עברית', 'orientation' => 'rtl' ],
|
||||
'hi' => [ 'name' => 'Hindi', 'nativeName' => 'हिन्दी' ],
|
||||
'hi_IN' => [ 'name' => 'Hindi (India)', 'nativeName' => 'हिन्दी (भारत)' ],
|
||||
'hr' => [ 'name' => 'Croatian', 'nativeName' => 'Hrvatski' ],
|
||||
'hr_HR' => [ 'name' => 'Croatian', 'nativeName' => 'Hrvatski' ],
|
||||
'hsb' => [ 'name' => 'Upper Sorbian', 'nativeName' => 'Hornjoserbsce' ],
|
||||
'hu' => [ 'name' => 'Hungarian', 'nativeName' => 'Magyar' ],
|
||||
'hu_HU' => [ 'name' => 'Hungarian', 'nativeName' => 'Magyar' ],
|
||||
'hy' => [ 'name' => 'Armenian', 'nativeName' => 'Հայերեն' ],
|
||||
'hy_AM' => [ 'name' => 'Armenian', 'nativeName' => 'Հայերեն' ],
|
||||
'id' => [ 'name' => 'Indonesian', 'nativeName' => 'Bahasa Indonesia' ],
|
||||
'is' => [ 'name' => 'Icelandic', 'nativeName' => 'íslenska' ],
|
||||
'it' => [ 'name' => 'Italian', 'nativeName' => 'Italiano' ],
|
||||
'it_IT' => [ 'name' => 'Italian', 'nativeName' => 'Italiano' ],
|
||||
'ja' => [ 'name' => 'Japanese', 'nativeName' => '日本語' ],
|
||||
'ja_JP' => [ 'name' => 'Japanese', 'nativeName' => '日本語' ], // not iso-639-1
|
||||
'ka' => [ 'name' => 'Georgian', 'nativeName' => 'ქართული' ],
|
||||
'kk' => [ 'name' => 'Kazakh', 'nativeName' => 'Қазақ' ],
|
||||
'kn' => [ 'name' => 'Kannada', 'nativeName' => 'ಕನ್ನಡ' ],
|
||||
'ko' => [ 'name' => 'Korean', 'nativeName' => '한국어' ],
|
||||
'ko_KR' => [ 'name' => 'Korean', 'nativeName' => '한국어' ],
|
||||
'ku' => [ 'name' => 'Kurdish', 'nativeName' => 'Kurdî' ],
|
||||
'la' => [ 'name' => 'Latin', 'nativeName' => 'Latina' ],
|
||||
'lb' => [ 'name' => 'Luxembourgish', 'nativeName' => 'Lëtzebuergesch' ],
|
||||
'lg' => [ 'name' => 'Luganda', 'nativeName' => 'Luganda' ],
|
||||
'lt' => [ 'name' => 'Lithuanian', 'nativeName' => 'Lietuvių kalba' ],
|
||||
'lv' => [ 'name' => 'Latvian', 'nativeName' => 'Latviešu' ],
|
||||
'mai' => [ 'name' => 'Maithili', 'nativeName' => 'मैथिली মৈথিলী' ],
|
||||
'mg' => [ 'name' => 'Malagasy', 'nativeName' => 'Malagasy' ],
|
||||
'mi' => [ 'name' => 'Maori (Aotearoa)', 'nativeName' => 'Māori (Aotearoa)' ],
|
||||
'mk' => [ 'name' => 'Macedonian', 'nativeName' => 'Македонски' ],
|
||||
'ml' => [ 'name' => 'Malayalam', 'nativeName' => 'മലയാളം' ],
|
||||
'mn' => [ 'name' => 'Mongolian', 'nativeName' => 'Монгол' ],
|
||||
'mr' => [ 'name' => 'Marathi', 'nativeName' => 'मराठी' ],
|
||||
'no' => [ 'name' => 'Norwegian', 'nativeName' => 'Norsk' ],
|
||||
'no_NO' => [ 'name' => 'Norwegian', 'nativeName' => 'Norsk' ],
|
||||
'nb' => [ 'name' => 'Norwegian', 'nativeName' => 'Norsk' ],
|
||||
'nb_NO' => [ 'name' => 'Norwegian (Bokmål)', 'nativeName' => 'Norsk bokmål' ],
|
||||
'ne_NP' => [ 'name' => 'Nepali', 'nativeName' => 'नेपाली' ],
|
||||
'nn_NO' => [ 'name' => 'Norwegian (Nynorsk)', 'nativeName' => 'Norsk nynorsk' ],
|
||||
'nl' => [ 'name' => 'Dutch', 'nativeName' => 'Nederlands' ],
|
||||
'nl_NL' => [ 'name' => 'Dutch', 'nativeName' => 'Nederlands' ],
|
||||
'nr' => [ 'name' => 'Ndebele, South', 'nativeName' => 'IsiNdebele' ],
|
||||
'nso' => [ 'name' => 'Northern Sotho', 'nativeName' => 'Sepedi' ],
|
||||
'oc' => [ 'name' => 'Occitan (Lengadocian)', 'nativeName' => 'Occitan (lengadocian)' ],
|
||||
'or' => [ 'name' => 'Oriya', 'nativeName' => 'ଓଡ଼ିଆ' ],
|
||||
'pa' => [ 'name' => 'Punjabi', 'nativeName' => 'ਪੰਜਾਬੀ' ],
|
||||
'pa_IN' => [ 'name' => 'Punjabi', 'nativeName' => 'ਪੰਜਾਬੀ' ],
|
||||
'pl' => [ 'name' => 'Polish', 'nativeName' => 'Polski' ],
|
||||
'pl_PL' => [ 'name' => 'Polish', 'nativeName' => 'Polski' ],
|
||||
'pt' => [ 'name' => 'Portuguese', 'nativeName' => 'Português' ],
|
||||
'pt_BR' => [ 'name' => 'Portuguese (Brazilian)', 'nativeName' => 'Português (do Brasil)' ],
|
||||
'pt_PT' => [ 'name' => 'Portuguese (Portugal)', 'nativeName' => 'Português (Europeu)' ],
|
||||
'ro' => [ 'name' => 'Romanian', 'nativeName' => 'Română' ],
|
||||
'ro_RO' => [ 'name' => 'Romanian', 'nativeName' => 'Română' ],
|
||||
'rm' => [ 'name' => 'Romansh', 'nativeName' => 'Rumantsch' ],
|
||||
'ru' => [ 'name' => 'Russian', 'nativeName' => 'Русский' ],
|
||||
'ru_RU' => [ 'name' => 'Russian', 'nativeName' => 'Русский' ],
|
||||
'rw' => [ 'name' => 'Kinyarwanda', 'nativeName' => 'Ikinyarwanda' ],
|
||||
'si' => [ 'name' => 'Sinhala', 'nativeName' => 'සිංහල' ],
|
||||
'sk' => [ 'name' => 'Slovak', 'nativeName' => 'Slovenčina' ],
|
||||
'sl' => [ 'name' => 'Slovenian', 'nativeName' => 'Slovensko' ],
|
||||
'son' => [ 'name' => 'Songhai', 'nativeName' => 'Soŋay' ],
|
||||
'sq' => [ 'name' => 'Albanian', 'nativeName' => 'Shqip' ],
|
||||
'sr' => [ 'name' => 'Serbian', 'nativeName' => 'Српски' ],
|
||||
'sr_SP' => [ 'name' => 'Serbian', 'nativeName' => 'Српски' ],
|
||||
'sr_Latn' => [ 'name' => 'Serbian', 'nativeName' => 'Srpski' ], // follows RFC 4646
|
||||
'ss' => [ 'name' => 'Siswati', 'nativeName' => 'siSwati' ],
|
||||
'st' => [ 'name' => 'Southern Sotho', 'nativeName' => 'Sesotho' ],
|
||||
'sv' => [ 'name' => 'Swedish', 'nativeName' => 'Svenska' ],
|
||||
'sv_SE' => [ 'name' => 'Swedish', 'nativeName' => 'Svenska' ],
|
||||
'ta' => [ 'name' => 'Tamil', 'nativeName' => 'தமிழ்' ],
|
||||
'ta_IN' => [ 'name' => 'Tamil (India)', 'nativeName' => 'தமிழ் (இந்தியா)' ],
|
||||
'ta_LK' => [ 'name' => 'Tamil (Sri Lanka)', 'nativeName' => 'தமிழ் (இலங்கை)' ],
|
||||
'te' => [ 'name' => 'Telugu', 'nativeName' => 'తెలుగు' ],
|
||||
'th' => [ 'name' => 'Thai', 'nativeName' => 'ไทย' ],
|
||||
'tlh' => [ 'name' => 'Klingon', 'nativeName' => 'Klingon' ],
|
||||
'tn' => [ 'name' => 'Tswana', 'nativeName' => 'Setswana' ],
|
||||
'tr' => [ 'name' => 'Turkish', 'nativeName' => 'Türkçe' ],
|
||||
'tr_TR' => [ 'name' => 'Turkish', 'nativeName' => 'Türkçe' ],
|
||||
'ts' => [ 'name' => 'Tsonga', 'nativeName' => 'Xitsonga' ],
|
||||
'tt' => [ 'name' => 'Tatar', 'nativeName' => 'Tatarça' ],
|
||||
'tt_RU' => [ 'name' => 'Tatar', 'nativeName' => 'Tatarça' ],
|
||||
'uk' => [ 'name' => 'Ukrainian', 'nativeName' => 'Українська' ],
|
||||
'uk_UA' => [ 'name' => 'Ukrainian', 'nativeName' => 'Українська' ],
|
||||
'ur' => [ 'name' => 'Urdu', 'nativeName' => 'اُردو', 'orientation' => 'rtl' ],
|
||||
've' => [ 'name' => 'Venda', 'nativeName' => 'Tshivenḓa' ],
|
||||
'vi' => [ 'name' => 'Vietnamese', 'nativeName' => 'Tiếng Việt' ],
|
||||
'vi_VN' => [ 'name' => 'Vietnamese', 'nativeName' => 'Tiếng Việt' ],
|
||||
'wo' => [ 'name' => 'Wolof', 'nativeName' => 'Wolof' ],
|
||||
'xh' => [ 'name' => 'Xhosa', 'nativeName' => 'isiXhosa' ],
|
||||
'zh' => [ 'name' => 'Chinese (Simplified)', 'nativeName' => '中文 (简体)' ],
|
||||
'zh_CN' => [ 'name' => 'Chinese (Simplified)', 'nativeName' => '中文 (简体)' ],
|
||||
'zh_TW' => [ 'name' => 'Chinese (Traditional)', 'nativeName' => '正體中文 (繁體)' ],
|
||||
'zu' => [ 'name' => 'Zulu', 'nativeName' => 'isiZulu' ]
|
||||
'af' => ['name' => 'Afrikaans', 'nativeName' => 'Afrikaans'],
|
||||
'af_ZA' => ['name' => 'Afrikaans', 'nativeName' => 'Afrikaans'],
|
||||
'ak' => ['name' => 'Akan', 'nativeName' => 'Akan'], // unverified native name
|
||||
'ast' => ['name' => 'Asturian', 'nativeName' => 'Asturianu'],
|
||||
'ar' => ['name' => 'Arabic', 'nativeName' => 'عربي', 'orientation' => 'rtl'],
|
||||
'ar_SA' => ['name' => 'Arabic', 'nativeName' => 'عربي', 'orientation' => 'rtl'],
|
||||
'as' => ['name' => 'Assamese', 'nativeName' => 'অসমীয়া'],
|
||||
'be' => ['name' => 'Belarusian', 'nativeName' => 'Беларуская'],
|
||||
'bg' => ['name' => 'Bulgarian', 'nativeName' => 'Български'],
|
||||
'bn' => ['name' => 'Bengali', 'nativeName' => 'বাংলা'],
|
||||
'bn_BD' => ['name' => 'Bengali (Bangladesh)', 'nativeName' => 'বাংলা (বাংলাদেশ)'],
|
||||
'bn_IN' => ['name' => 'Bengali (India)', 'nativeName' => 'বাংলা (ভারত)'],
|
||||
'br' => ['name' => 'Breton', 'nativeName' => 'Brezhoneg'],
|
||||
'bs' => ['name' => 'Bosnian', 'nativeName' => 'Bosanski'],
|
||||
'ca' => ['name' => 'Catalan', 'nativeName' => 'Català'],
|
||||
'ca_ES' => ['name' => 'Catalan', 'nativeName' => 'Català'],
|
||||
'ca_valencia'=> ['name' => 'Catalan (Valencian)', 'nativeName' => 'Català (valencià)'], // not iso-639-1. a=l10n-drivers
|
||||
'cs' => ['name' => 'Czech', 'nativeName' => 'Čeština'],
|
||||
'cs_CZ' => ['name' => 'Czech', 'nativeName' => 'Čeština'],
|
||||
'cy' => ['name' => 'Welsh', 'nativeName' => 'Cymraeg'],
|
||||
'da' => ['name' => 'Danish', 'nativeName' => 'Dansk'],
|
||||
'da_DK' => ['name' => 'Danish', 'nativeName' => 'Dansk'],
|
||||
'de' => ['name' => 'German', 'nativeName' => 'Deutsch'],
|
||||
'de_AT' => ['name' => 'German (Austria)', 'nativeName' => 'Deutsch (Österreich)'],
|
||||
'de_CH' => ['name' => 'German (Switzerland)', 'nativeName' => 'Deutsch (Schweiz)'],
|
||||
'de_DE' => ['name' => 'German (Germany)', 'nativeName' => 'Deutsch (Deutschland)'],
|
||||
'dsb' => ['name' => 'Lower Sorbian', 'nativeName' => 'Dolnoserbšćina'], // iso-639-2
|
||||
'el' => ['name' => 'Greek', 'nativeName' => 'Ελληνικά'],
|
||||
'el_GR' => ['name' => 'Greek', 'nativeName' => 'Ελληνικά'],
|
||||
'en' => ['name' => 'English', 'nativeName' => 'English'],
|
||||
'en_AU' => ['name' => 'English (Australian)', 'nativeName' => 'English (Australian)'],
|
||||
'en_CA' => ['name' => 'English (Canadian)', 'nativeName' => 'English (Canadian)'],
|
||||
'en_GB' => ['name' => 'English (British)', 'nativeName' => 'English (British)'],
|
||||
'en_NZ' => ['name' => 'English (New Zealand)', 'nativeName' => 'English (New Zealand)'],
|
||||
'en_US' => ['name' => 'English (US)', 'nativeName' => 'English (US)'],
|
||||
'en_ZA' => ['name' => 'English (South African)', 'nativeName' => 'English (South African)'],
|
||||
'eo' => ['name' => 'Esperanto', 'nativeName' => 'Esperanto'],
|
||||
'es' => ['name' => 'Spanish', 'nativeName' => 'Español'],
|
||||
'es_AR' => ['name' => 'Spanish (Argentina)', 'nativeName' => 'Español (de Argentina)'],
|
||||
'es_CL' => ['name' => 'Spanish (Chile)', 'nativeName' => 'Español (de Chile)'],
|
||||
'es_ES' => ['name' => 'Spanish (Spain)', 'nativeName' => 'Español (de España)'],
|
||||
'es_MX' => ['name' => 'Spanish (Mexico)', 'nativeName' => 'Español (de México)'],
|
||||
'et' => ['name' => 'Estonian', 'nativeName' => 'Eesti keel'],
|
||||
'eu' => ['name' => 'Basque', 'nativeName' => 'Euskara'],
|
||||
'fa' => ['name' => 'Persian', 'nativeName' => 'فارسی', 'orientation' => 'rtl'],
|
||||
'fi' => ['name' => 'Finnish', 'nativeName' => 'Suomi'],
|
||||
'fi_FI' => ['name' => 'Finnish', 'nativeName' => 'Suomi'],
|
||||
'fj_FJ' => ['name' => 'Fijian', 'nativeName' => 'Vosa vaka_Viti'],
|
||||
'fr' => ['name' => 'French', 'nativeName' => 'Français'],
|
||||
'fr_CA' => ['name' => 'French (Canada)', 'nativeName' => 'Français (Canada)'],
|
||||
'fr_FR' => ['name' => 'French (France)', 'nativeName' => 'Français (France)'],
|
||||
'fur' => ['name' => 'Friulian', 'nativeName' => 'Furlan'],
|
||||
'fur_IT' => ['name' => 'Friulian', 'nativeName' => 'Furlan'],
|
||||
'fy' => ['name' => 'Frisian', 'nativeName' => 'Frysk'],
|
||||
'fy_NL' => ['name' => 'Frisian', 'nativeName' => 'Frysk'],
|
||||
'ga' => ['name' => 'Irish', 'nativeName' => 'Gaeilge'],
|
||||
'ga_IE' => ['name' => 'Irish (Ireland)', 'nativeName' => 'Gaeilge (Éire)'],
|
||||
'gd' => ['name' => 'Gaelic (Scotland)', 'nativeName' => 'Gàidhlig'],
|
||||
'gl' => ['name' => 'Galician', 'nativeName' => 'Galego'],
|
||||
'gu' => ['name' => 'Gujarati', 'nativeName' => 'ગુજરાતી'],
|
||||
'gu_IN' => ['name' => 'Gujarati', 'nativeName' => 'ગુજરાતી'],
|
||||
'he' => ['name' => 'Hebrew', 'nativeName' => 'עברית', 'orientation' => 'rtl'],
|
||||
'he_IL' => ['name' => 'Hebrew', 'nativeName' => 'עברית', 'orientation' => 'rtl'],
|
||||
'hi' => ['name' => 'Hindi', 'nativeName' => 'हिन्दी'],
|
||||
'hi_IN' => ['name' => 'Hindi (India)', 'nativeName' => 'हिन्दी (भारत)'],
|
||||
'hr' => ['name' => 'Croatian', 'nativeName' => 'Hrvatski'],
|
||||
'hr_HR' => ['name' => 'Croatian', 'nativeName' => 'Hrvatski'],
|
||||
'hsb' => ['name' => 'Upper Sorbian', 'nativeName' => 'Hornjoserbsce'],
|
||||
'hu' => ['name' => 'Hungarian', 'nativeName' => 'Magyar'],
|
||||
'hu_HU' => ['name' => 'Hungarian', 'nativeName' => 'Magyar'],
|
||||
'hy' => ['name' => 'Armenian', 'nativeName' => 'Հայերեն'],
|
||||
'hy_AM' => ['name' => 'Armenian', 'nativeName' => 'Հայերեն'],
|
||||
'id' => ['name' => 'Indonesian', 'nativeName' => 'Bahasa Indonesia'],
|
||||
'is' => ['name' => 'Icelandic', 'nativeName' => 'íslenska'],
|
||||
'it' => ['name' => 'Italian', 'nativeName' => 'Italiano'],
|
||||
'it_IT' => ['name' => 'Italian', 'nativeName' => 'Italiano'],
|
||||
'ja' => ['name' => 'Japanese', 'nativeName' => '日本語'],
|
||||
'ja_JP' => ['name' => 'Japanese', 'nativeName' => '日本語'], // not iso-639-1
|
||||
'ka' => ['name' => 'Georgian', 'nativeName' => 'ქართული'],
|
||||
'kk' => ['name' => 'Kazakh', 'nativeName' => 'Қазақ'],
|
||||
'kn' => ['name' => 'Kannada', 'nativeName' => 'ಕನ್ನಡ'],
|
||||
'ko' => ['name' => 'Korean', 'nativeName' => '한국어'],
|
||||
'ko_KR' => ['name' => 'Korean', 'nativeName' => '한국어'],
|
||||
'ku' => ['name' => 'Kurdish', 'nativeName' => 'Kurdî'],
|
||||
'la' => ['name' => 'Latin', 'nativeName' => 'Latina'],
|
||||
'lb' => ['name' => 'Luxembourgish', 'nativeName' => 'Lëtzebuergesch'],
|
||||
'lg' => ['name' => 'Luganda', 'nativeName' => 'Luganda'],
|
||||
'lt' => ['name' => 'Lithuanian', 'nativeName' => 'Lietuvių kalba'],
|
||||
'lv' => ['name' => 'Latvian', 'nativeName' => 'Latviešu'],
|
||||
'mai' => ['name' => 'Maithili', 'nativeName' => 'मैथिली মৈথিলী'],
|
||||
'mg' => ['name' => 'Malagasy', 'nativeName' => 'Malagasy'],
|
||||
'mi' => ['name' => 'Maori (Aotearoa)', 'nativeName' => 'Māori (Aotearoa)'],
|
||||
'mk' => ['name' => 'Macedonian', 'nativeName' => 'Македонски'],
|
||||
'ml' => ['name' => 'Malayalam', 'nativeName' => 'മലയാളം'],
|
||||
'mn' => ['name' => 'Mongolian', 'nativeName' => 'Монгол'],
|
||||
'mr' => ['name' => 'Marathi', 'nativeName' => 'मराठी'],
|
||||
'no' => ['name' => 'Norwegian', 'nativeName' => 'Norsk'],
|
||||
'no_NO' => ['name' => 'Norwegian', 'nativeName' => 'Norsk'],
|
||||
'nb' => ['name' => 'Norwegian', 'nativeName' => 'Norsk'],
|
||||
'nb_NO' => ['name' => 'Norwegian (Bokmål)', 'nativeName' => 'Norsk bokmål'],
|
||||
'ne_NP' => ['name' => 'Nepali', 'nativeName' => 'नेपाली'],
|
||||
'nn_NO' => ['name' => 'Norwegian (Nynorsk)', 'nativeName' => 'Norsk nynorsk'],
|
||||
'nl' => ['name' => 'Dutch', 'nativeName' => 'Nederlands'],
|
||||
'nl_NL' => ['name' => 'Dutch', 'nativeName' => 'Nederlands'],
|
||||
'nr' => ['name' => 'Ndebele, South', 'nativeName' => 'IsiNdebele'],
|
||||
'nso' => ['name' => 'Northern Sotho', 'nativeName' => 'Sepedi'],
|
||||
'oc' => ['name' => 'Occitan (Lengadocian)', 'nativeName' => 'Occitan (lengadocian)'],
|
||||
'or' => ['name' => 'Oriya', 'nativeName' => 'ଓଡ଼ିଆ'],
|
||||
'pa' => ['name' => 'Punjabi', 'nativeName' => 'ਪੰਜਾਬੀ'],
|
||||
'pa_IN' => ['name' => 'Punjabi', 'nativeName' => 'ਪੰਜਾਬੀ'],
|
||||
'pl' => ['name' => 'Polish', 'nativeName' => 'Polski'],
|
||||
'pl_PL' => ['name' => 'Polish', 'nativeName' => 'Polski'],
|
||||
'pt' => ['name' => 'Portuguese', 'nativeName' => 'Português'],
|
||||
'pt_BR' => ['name' => 'Portuguese (Brazilian)', 'nativeName' => 'Português (do Brasil)'],
|
||||
'pt_PT' => ['name' => 'Portuguese (Portugal)', 'nativeName' => 'Português (Europeu)'],
|
||||
'ro' => ['name' => 'Romanian', 'nativeName' => 'Română'],
|
||||
'ro_RO' => ['name' => 'Romanian', 'nativeName' => 'Română'],
|
||||
'rm' => ['name' => 'Romansh', 'nativeName' => 'Rumantsch'],
|
||||
'ru' => ['name' => 'Russian', 'nativeName' => 'Русский'],
|
||||
'ru_RU' => ['name' => 'Russian', 'nativeName' => 'Русский'],
|
||||
'rw' => ['name' => 'Kinyarwanda', 'nativeName' => 'Ikinyarwanda'],
|
||||
'si' => ['name' => 'Sinhala', 'nativeName' => 'සිංහල'],
|
||||
'sk' => ['name' => 'Slovak', 'nativeName' => 'Slovenčina'],
|
||||
'sl' => ['name' => 'Slovenian', 'nativeName' => 'Slovensko'],
|
||||
'son' => ['name' => 'Songhai', 'nativeName' => 'Soŋay'],
|
||||
'sq' => ['name' => 'Albanian', 'nativeName' => 'Shqip'],
|
||||
'sr' => ['name' => 'Serbian', 'nativeName' => 'Српски'],
|
||||
'sr_SP' => ['name' => 'Serbian', 'nativeName' => 'Српски'],
|
||||
'sr_Latn' => ['name' => 'Serbian', 'nativeName' => 'Srpski'], // follows RFC 4646
|
||||
'ss' => ['name' => 'Siswati', 'nativeName' => 'siSwati'],
|
||||
'st' => ['name' => 'Southern Sotho', 'nativeName' => 'Sesotho'],
|
||||
'sv' => ['name' => 'Swedish', 'nativeName' => 'Svenska'],
|
||||
'sv_SE' => ['name' => 'Swedish', 'nativeName' => 'Svenska'],
|
||||
'ta' => ['name' => 'Tamil', 'nativeName' => 'தமிழ்'],
|
||||
'ta_IN' => ['name' => 'Tamil (India)', 'nativeName' => 'தமிழ் (இந்தியா)'],
|
||||
'ta_LK' => ['name' => 'Tamil (Sri Lanka)', 'nativeName' => 'தமிழ் (இலங்கை)'],
|
||||
'te' => ['name' => 'Telugu', 'nativeName' => 'తెలుగు'],
|
||||
'th' => ['name' => 'Thai', 'nativeName' => 'ไทย'],
|
||||
'tlh' => ['name' => 'Klingon', 'nativeName' => 'Klingon'],
|
||||
'tn' => ['name' => 'Tswana', 'nativeName' => 'Setswana'],
|
||||
'tr' => ['name' => 'Turkish', 'nativeName' => 'Türkçe'],
|
||||
'tr_TR' => ['name' => 'Turkish', 'nativeName' => 'Türkçe'],
|
||||
'ts' => ['name' => 'Tsonga', 'nativeName' => 'Xitsonga'],
|
||||
'tt' => ['name' => 'Tatar', 'nativeName' => 'Tatarça'],
|
||||
'tt_RU' => ['name' => 'Tatar', 'nativeName' => 'Tatarça'],
|
||||
'uk' => ['name' => 'Ukrainian', 'nativeName' => 'Українська'],
|
||||
'uk_UA' => ['name' => 'Ukrainian', 'nativeName' => 'Українська'],
|
||||
'ur' => ['name' => 'Urdu', 'nativeName' => 'اُردو', 'orientation' => 'rtl'],
|
||||
've' => ['name' => 'Venda', 'nativeName' => 'Tshivenḓa'],
|
||||
'vi' => ['name' => 'Vietnamese', 'nativeName' => 'Tiếng Việt'],
|
||||
'vi_VN' => ['name' => 'Vietnamese', 'nativeName' => 'Tiếng Việt'],
|
||||
'wo' => ['name' => 'Wolof', 'nativeName' => 'Wolof'],
|
||||
'xh' => ['name' => 'Xhosa', 'nativeName' => 'isiXhosa'],
|
||||
'zh' => ['name' => 'Chinese (Simplified)', 'nativeName' => '中文 (简体)'],
|
||||
'zh_CN' => ['name' => 'Chinese (Simplified)', 'nativeName' => '中文 (简体)'],
|
||||
'zh_TW' => ['name' => 'Chinese (Traditional)', 'nativeName' => '正體中文 (繁體)'],
|
||||
'zu' => ['name' => 'Zulu', 'nativeName' => 'isiZulu']
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -244,13 +244,13 @@ class Plugins
|
||||
// Go through...
|
||||
foreach ($plugins_list as $plugin) {
|
||||
if (Filesystem::has($_plugin_settings = PATH['plugins'] . '/' . $plugin['dirname'] . '/settings.yaml') and
|
||||
Filesystem::has($_plugin_config = PATH['plugins'] . '/' . $plugin['dirname'] . '/'. $plugin['dirname'] .'.yaml')) {
|
||||
Filesystem::has($_plugin_config = PATH['plugins'] . '/' . $plugin['dirname'] . '/' . $plugin['dirname'] . '.yaml')) {
|
||||
$_plugins_cache_id .= filemtime($_plugin_settings) . filemtime($_plugin_config);
|
||||
}
|
||||
}
|
||||
|
||||
// Create Unique Cache ID for Plugins
|
||||
$plugins_cache_id = md5('plugins' . PATH['plugins'] . '/' . $_plugins_cache_id);
|
||||
$plugins_cache_id = md5('plugins' . PATH['plugins'] . '/' . $_plugins_cache_id);
|
||||
|
||||
// Get plugins list from cache or scan plugins folder and create new plugins cache item
|
||||
if (Cache::contains($plugins_cache_id)) {
|
||||
@@ -266,7 +266,7 @@ class Plugins
|
||||
$plugin_settings = YamlParser::decode(Filesystem::read($_plugin_settings));
|
||||
}
|
||||
|
||||
if (Filesystem::has($_plugin_config = PATH['plugins'] . '/' . $plugin['dirname'] . '/'. $plugin['dirname']. '.yaml')) {
|
||||
if (Filesystem::has($_plugin_config = PATH['plugins'] . '/' . $plugin['dirname'] . '/' . $plugin['dirname'] . '.yaml')) {
|
||||
$plugin_config = YamlParser::decode(Filesystem::read($_plugin_config));
|
||||
}
|
||||
|
||||
@@ -293,8 +293,8 @@ class Plugins
|
||||
// Include enabled plugins
|
||||
if (is_array(Registry::get('plugins')) && count(Registry::get('plugins')) > 0) {
|
||||
foreach (Registry::get('plugins') as $plugin_name => $plugin) {
|
||||
if (Registry::get('plugins.'.$plugin_name.'.enabled')) {
|
||||
include_once PATH['plugins'] . '/' . $plugin_name .'/'. $plugin_name . '.php';
|
||||
if (Registry::get('plugins.' . $plugin_name . '.enabled')) {
|
||||
include_once PATH['plugins'] . '/' . $plugin_name . '/' . $plugin_name . '.php';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -161,11 +161,11 @@ class Shortcodes {
|
||||
($s->getParameter('q')) and $params['q'] = $s->getParameter('q');
|
||||
($s->getParameter('fm')) and $params['fm'] = $s->getParameter('fm');
|
||||
|
||||
($s->getParameter('width')) and $attributes['width'] = $s->getParameter('width');
|
||||
($s->getParameter('width')) and $attributes['width'] = $s->getParameter('width');
|
||||
($s->getParameter('height')) and $attributes['height'] = $s->getParameter('height');
|
||||
($s->getParameter('class')) and $attributes['class'] = $s->getParameter('class');
|
||||
($s->getParameter('id')) and $attributes['id'] = $s->getParameter('id');
|
||||
($s->getParameter('alt')) and $attributes['alt'] = $s->getParameter('alt');
|
||||
($s->getParameter('class')) and $attributes['class'] = $s->getParameter('class');
|
||||
($s->getParameter('id')) and $attributes['id'] = $s->getParameter('id');
|
||||
($s->getParameter('alt')) and $attributes['alt'] = $s->getParameter('alt');
|
||||
|
||||
return Images::getImage($s->getParameter('path'), $params, $attributes);
|
||||
});
|
||||
|
@@ -74,19 +74,19 @@ class Themes
|
||||
Registry::set('themes', []);
|
||||
|
||||
// Create Unique Cache ID for Theme
|
||||
$theme_cache_id = md5('theme' . filemtime(PATH['themes'] .'/'. $theme . '/' . 'settings.yaml') .
|
||||
filemtime(PATH['themes'] .'/'. $theme . '/' . $theme . '.yaml'));
|
||||
$theme_cache_id = md5('theme' . filemtime(PATH['themes'] . '/' . $theme . '/' . 'settings.yaml') .
|
||||
filemtime(PATH['themes'] . '/' . $theme . '/' . $theme . '.yaml'));
|
||||
|
||||
// Get Theme mafifest file and write to settings.themes array
|
||||
if (Cache::contains($theme_cache_id)) {
|
||||
Registry::set('themes.'.Registry::get('settings.theme'), Cache::fetch($theme_cache_id));
|
||||
Registry::set('themes.' . Registry::get('settings.theme'), Cache::fetch($theme_cache_id));
|
||||
} else {
|
||||
if (Filesystem::has($theme_settings = PATH['themes'] . '/' . $theme . '/' . 'settings.yaml') and
|
||||
Filesystem::has($theme_config = PATH['themes'] . '/' . $theme . '/' . $theme . '.yaml')) {
|
||||
$theme_settings = YamlParser::decode(Filesystem::read($theme_settings));
|
||||
$theme_config = YamlParser::decode(Filesystem::read($theme_config));
|
||||
$_theme = array_merge($theme_settings, $theme_config);
|
||||
Registry::set('themes.'.Registry::get('settings.theme'), $_theme);
|
||||
Registry::set('themes.' . Registry::get('settings.theme'), $_theme);
|
||||
Cache::save($theme_cache_id, $_theme);
|
||||
}
|
||||
}
|
||||
|
@@ -26,10 +26,10 @@ class FrontmatterParser {
|
||||
*/
|
||||
public static function parse(string $content) : array
|
||||
{
|
||||
$parts = preg_split('/^[\s\r\n]?---[\s\r\n]?$/sm', PHP_EOL.ltrim($content));
|
||||
$parts = preg_split('/^[\s\r\n]?---[\s\r\n]?$/sm', PHP_EOL.ltrim($content));
|
||||
|
||||
if (count($parts) < 3) return ['matter' => [], 'body' => $content];
|
||||
if (count($parts) < 3) return ['matter' => [], 'body' => $content];
|
||||
|
||||
return ['matter' => trim($parts[1]), 'body' => implode(PHP_EOL.'---'.PHP_EOL, array_slice($parts, 2))];
|
||||
return ['matter' => trim($parts[1]), 'body' => implode(PHP_EOL.'---'.PHP_EOL, array_slice($parts, 2))];
|
||||
}
|
||||
}
|
||||
|
@@ -74,7 +74,7 @@ class YamlParser {
|
||||
$input,
|
||||
$inline ? $inline : YamlParser::$inline,
|
||||
$indent ? $indent : YamlParser::$indent,
|
||||
$flags ? $flags : YamlParser::$flag
|
||||
$flags ? $flags : YamlParser::$flag
|
||||
);
|
||||
} catch (DumpException $e) {
|
||||
throw new \RuntimeException('Encoding YAML failed: ' . $e->getMessage(), 0, $e);
|
||||
|
@@ -28,7 +28,7 @@ define('PATH', ['site' => ROOT_DIR . '/site',
|
||||
'config' => [
|
||||
'default' => ROOT_DIR . '/flextype/config',
|
||||
'site' => ROOT_DIR . '/site/config'
|
||||
],
|
||||
],
|
||||
'cache' => ROOT_DIR . '/site/cache']);
|
||||
|
||||
// Define the path to the logs directory (without trailing slash).
|
||||
|
@@ -43,7 +43,7 @@ if (Admin::isAdminArea()) {
|
||||
//
|
||||
// Add listner for onCurrentPageBeforeLoaded event
|
||||
//
|
||||
Event::addListener('onCurrentEntryBeforeProcessed', function () {
|
||||
Event::addListener('onCurrentEntryBeforeProcessed', function() {
|
||||
|
||||
// Add navigation links
|
||||
NavigationManager::addItem('content', 'entries', '<i class="far fa-newspaper"></i>' . __('admin_entries', Registry::get('settings.locale')), Http::getBaseUrl() . '/admin/entries', ['class' => 'nav-link']);
|
||||
@@ -147,17 +147,17 @@ class Admin
|
||||
Event::dispatch('onAdminArea');
|
||||
|
||||
// Route the Uri
|
||||
Http::getUriSegment(1) == '' and DashboardManager::getDashboardManager();
|
||||
Http::getUriSegment(1) == 'entries' and EntriesManager::getEntriesManager();
|
||||
Http::getUriSegment(1) == 'menus' and MenusManager::getMenusManager();
|
||||
Http::getUriSegment(1) == 'fieldsets' and FieldsetsManager::getFieldsetsManager();
|
||||
Http::getUriSegment(1) == 'templates' and TemplatesManager::getTemplatesManager();
|
||||
Http::getUriSegment(1) == 'snippets' and SnippetsManager::getSnippetsManager();
|
||||
Http::getUriSegment(1) == 'plugins' and PluginsManager::getPluginsManager();
|
||||
Http::getUriSegment(1) == 'information' and InformationManager::getInformationManager();
|
||||
Http::getUriSegment(1) == 'settings' and SettingsManager::getSettingsManager();
|
||||
Http::getUriSegment(1) == 'profile' and UsersManager::getProfileManager();
|
||||
Http::getUriSegment(1) == 'logout' and UsersManager::logout();
|
||||
Http::getUriSegment(1) == '' and DashboardManager::getDashboardManager();
|
||||
Http::getUriSegment(1) == 'entries' and EntriesManager::getEntriesManager();
|
||||
Http::getUriSegment(1) == 'menus' and MenusManager::getMenusManager();
|
||||
Http::getUriSegment(1) == 'fieldsets' and FieldsetsManager::getFieldsetsManager();
|
||||
Http::getUriSegment(1) == 'templates' and TemplatesManager::getTemplatesManager();
|
||||
Http::getUriSegment(1) == 'snippets' and SnippetsManager::getSnippetsManager();
|
||||
Http::getUriSegment(1) == 'plugins' and PluginsManager::getPluginsManager();
|
||||
Http::getUriSegment(1) == 'information' and InformationManager::getInformationManager();
|
||||
Http::getUriSegment(1) == 'settings' and SettingsManager::getSettingsManager();
|
||||
Http::getUriSegment(1) == 'profile' and UsersManager::getProfileManager();
|
||||
Http::getUriSegment(1) == 'logout' and UsersManager::logout();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -8,6 +8,6 @@ class DashboardManager
|
||||
{
|
||||
public static function getDashboardManager()
|
||||
{
|
||||
Http::redirect(Http::getBaseUrl().'/admin/entries');
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/entries');
|
||||
}
|
||||
}
|
||||
|
@@ -68,7 +68,7 @@ class EntriesManager
|
||||
|
||||
if (isset($_frontmatter[$key])) {
|
||||
$_value = $_frontmatter[$key];
|
||||
} elseif(isset($field['value'])) {
|
||||
} elseif (isset($field['value'])) {
|
||||
$_value = $field['value'];
|
||||
} else {
|
||||
$_value = '';
|
||||
@@ -82,10 +82,10 @@ class EntriesManager
|
||||
|
||||
// Create a entry!
|
||||
if (Filesystem::write(
|
||||
$file,
|
||||
'---'."\n".
|
||||
YamlParser::encode(array_replace_recursive($frontmatter, $_frontmatter)).
|
||||
'---'."\n"
|
||||
$file,
|
||||
'---'."\n".
|
||||
YamlParser::encode(array_replace_recursive($frontmatter, $_frontmatter)).
|
||||
'---'."\n"
|
||||
)) {
|
||||
Notification::set('success', __('admin_message_entry_created'));
|
||||
Http::redirect(Http::getBaseUrl().'/admin/entries/?entry='.Http::post('parent_entry'));
|
||||
@@ -116,10 +116,10 @@ class EntriesManager
|
||||
if (Http::get('entry') != '') {
|
||||
if (Token::check((Http::get('token')))) {
|
||||
Filesystem::copy(PATH['entries'] . '/' . Http::get('entry'),
|
||||
PATH['entries'] . '/' . Http::get('entry') . '-duplicate-' . date("Ymd_His"),
|
||||
true);
|
||||
PATH['entries'] . '/' . Http::get('entry') . '-duplicate-' . date("Ymd_His"),
|
||||
true);
|
||||
Notification::set('success', __('admin_message_entry_duplicated'));
|
||||
Http::redirect(Http::getBaseUrl().'/admin/entries/?entry='.implode('/', array_slice(explode("/", Http::get('entry')), 0, -1)));
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/entries/?entry=' . implode('/', array_slice(explode("/", Http::get('entry')), 0, -1)));
|
||||
} else {
|
||||
die('Request was denied because it contained an invalid security token. Please refresh the page and try again.');
|
||||
}
|
||||
@@ -138,7 +138,7 @@ class EntriesManager
|
||||
PATH['entries'] . '/' . Http::post('entry_parent') . '/' . Text::safeString(Http::post('name'), '-', true)
|
||||
)) {
|
||||
Notification::set('success', __('admin_message_entry_renamed'));
|
||||
Http::redirect(Http::getBaseUrl().'/admin/entries/?entry='.Http::post('entry_parent'));
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/entries/?entry=' . Http::post('entry_parent'));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -176,13 +176,13 @@ class EntriesManager
|
||||
|
||||
if (Filesystem::write(
|
||||
PATH['entries'] . '/' . Http::post('entry') . '/entry.html',
|
||||
'---'."\n".
|
||||
$frontmatter."\n".
|
||||
'---'."\n".
|
||||
$content
|
||||
'---'."\n".
|
||||
$frontmatter."\n".
|
||||
'---'."\n".
|
||||
$content
|
||||
)) {
|
||||
Notification::set('success', __('admin_message_entry_changes_saved'));
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/entries?entry='.implode('/', array_slice(explode("/", Http::get('entry')), 0, -1)));
|
||||
Notification::set('success', __('admin_message_entry_changes_saved'));
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/entries?entry='.implode('/', array_slice(explode("/", Http::get('entry')), 0, -1)));
|
||||
}
|
||||
} else {
|
||||
die('Request was denied because it contained an invalid security token. Please refresh the page and try again.');
|
||||
@@ -209,7 +209,7 @@ class EntriesManager
|
||||
PATH['entries'] . '/' . Http::post('parent_entry') . '/' . Text::safeString(Http::post('name_current'), '-', true)
|
||||
)) {
|
||||
Notification::set('success', __('admin_message_entry_moved'));
|
||||
Http::redirect(Http::getBaseUrl().'/admin/entries/?entry='.Http::post('parent_entry'));
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/entries/?entry=' . Http::post('parent_entry'));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -254,10 +254,10 @@ class EntriesManager
|
||||
if (Token::check((Http::post('token')))) {
|
||||
Filesystem::write(
|
||||
PATH['entries'] . '/' . Http::post('entry_name') . '/entry.html',
|
||||
Http::post('entry_content')
|
||||
Http::post('entry_content')
|
||||
);
|
||||
Notification::set('success', __('admin_message_entry_changes_saved'));
|
||||
Http::redirect(Http::getBaseUrl().'/admin/entries/edit?entry='.Http::post('entry_name').'&source=true');
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/entries/edit?entry=' . Http::post('entry_name') . '&source=true');
|
||||
} else {
|
||||
die('Request was denied because it contained an invalid security token. Please refresh the page and try again.');
|
||||
}
|
||||
@@ -294,10 +294,10 @@ class EntriesManager
|
||||
|
||||
Filesystem::write(
|
||||
PATH['entries'] . '/' . Http::get('entry') . '/entry.html',
|
||||
'---'."\n".
|
||||
$frontmatter."\n".
|
||||
'---'."\n".
|
||||
$content
|
||||
'---'."\n".
|
||||
$frontmatter."\n".
|
||||
'---'."\n".
|
||||
$content
|
||||
);
|
||||
Notification::set('success', __('admin_message_entry_changes_saved'));
|
||||
Http::redirect(Http::getBaseUrl().'/admin/entries/edit?entry='.Http::get('entry'));
|
||||
@@ -336,7 +336,7 @@ class EntriesManager
|
||||
if (strpos(Registry::get('settings.entries.media.accept_file_types'), $file_ext = substr(strrchr($file, '.'), 1)) !== false) {
|
||||
if (strpos($file, strtolower($file_ext), 1)) {
|
||||
if ($path) {
|
||||
$files[Http::getBaseUrl().'/'.$entry.'/'.$file] = Http::getBaseUrl().'/'.$entry.'/'.$file;
|
||||
$files[Http::getBaseUrl() . '/' . $entry . '/' . $file] = Http::getBaseUrl() . '/' . $entry . '/' . $file;
|
||||
} else {
|
||||
$files[$file] = $file;
|
||||
}
|
||||
@@ -356,23 +356,23 @@ class EntriesManager
|
||||
foreach ($form as $element => $property) {
|
||||
|
||||
// Create attributes
|
||||
$property['attributes'] = Arr::keyExists($property, 'attributes') ? $property['attributes'] : [] ;
|
||||
$property['attributes'] = Arr::keyExists($property, 'attributes') ? $property['attributes'] : [];
|
||||
|
||||
// Create attribute class
|
||||
$property['attributes']['class'] = Arr::keyExists($property, 'attributes.class') ? 'form-control ' . $property['attributes']['class'] : 'form-control' ;
|
||||
$property['attributes']['class'] = Arr::keyExists($property, 'attributes.class') ? 'form-control ' . $property['attributes']['class'] : 'form-control';
|
||||
|
||||
// Create attribute size
|
||||
$property['size'] = Arr::keyExists($property, 'size') ? $property['size'] : 'col-12' ;
|
||||
$property['size'] = Arr::keyExists($property, 'size') ? $property['size'] : 'col-12';
|
||||
|
||||
// Create attribute value
|
||||
$property['value'] = Arr::keyExists($property, 'value') ? $property['value'] : '' ;
|
||||
$property['value'] = Arr::keyExists($property, 'value') ? $property['value'] : '';
|
||||
|
||||
$pos = strpos($element, '.');
|
||||
|
||||
if ($pos === false) {
|
||||
$form_element_name = $element;
|
||||
} else {
|
||||
$form_element_name = str_replace(".", "][", "$element").']';
|
||||
$form_element_name = str_replace(".", "][", "$element") . ']';
|
||||
}
|
||||
|
||||
$pos = strpos($form_element_name, ']');
|
||||
@@ -441,7 +441,7 @@ class EntriesManager
|
||||
if ($property['type'] == 'hidden') {
|
||||
echo $form_element;
|
||||
} else {
|
||||
echo '<div class="form-group '.$property['size'].'">';
|
||||
echo '<div class="form-group ' . $property['size'] . '">';
|
||||
echo $form_label . $form_element;
|
||||
echo '</div>';
|
||||
}
|
||||
@@ -459,7 +459,7 @@ class EntriesManager
|
||||
if (Token::check((Http::get('token')))) {
|
||||
Filesystem::delete($files_directory . Http::get('delete_file'));
|
||||
Notification::set('success', __('admin_message_entry_file_deleted'));
|
||||
Http::redirect(Http::getBaseUrl().'/admin/entries/edit?entry='.Http::get('entry').'&media=true');
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/entries/edit?entry=' . Http::get('entry') . '&media=true');
|
||||
} else {
|
||||
die('Request was denied because it contained an invalid security token. Please refresh the page and try again.');
|
||||
}
|
||||
@@ -471,7 +471,7 @@ class EntriesManager
|
||||
|
||||
$file = EntriesManager::uploadFile($_FILES['file'], $files_directory, Registry::get('settings.entries.media.accept_file_types'), 27000000);
|
||||
|
||||
if($file !== false) {
|
||||
if ($file !== false) {
|
||||
|
||||
if (in_array(pathinfo($file)['extension'], ['jpg', 'jpeg', 'png', 'gif'])) {
|
||||
|
||||
@@ -480,17 +480,17 @@ class EntriesManager
|
||||
|
||||
// now you are able to resize the instance
|
||||
if (Registry::get('settings.entries.media.upload_images_width') > 0 && Registry::get('settings.entries.media.upload_images_height') > 0) {
|
||||
$img->resize(Registry::get('settings.entries.media.upload_images_width'), Registry::get('settings.entries.media.upload_images_height'), function ($constraint) {
|
||||
$img->resize(Registry::get('settings.entries.media.upload_images_width'), Registry::get('settings.entries.media.upload_images_height'), function($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
});
|
||||
} elseif (Registry::get('settings.entries.media.upload_images_width') > 0) {
|
||||
$img->resize(Registry::get('settings.entries.media.upload_images_width'), null, function ($constraint) {
|
||||
$img->resize(Registry::get('settings.entries.media.upload_images_width'), null, function($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
});
|
||||
} elseif (Registry::get('settings.entries.media.upload_images_height') > 0) {
|
||||
$img->resize(null, Registry::get('settings.entries.media.upload_images_height'), function ($constraint) {
|
||||
$img->resize(null, Registry::get('settings.entries.media.upload_images_height'), function($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
});
|
||||
@@ -504,10 +504,10 @@ class EntriesManager
|
||||
}
|
||||
|
||||
Notification::set('success', __('admin_message_entry_file_uploaded'));
|
||||
Http::redirect(Http::getBaseUrl().'/admin/entries/edit?entry='.Http::get('entry').'&media=true');
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/entries/edit?entry=' . Http::get('entry') . '&media=true');
|
||||
} else {
|
||||
Notification::set('error', __('admin_message_entry_file_not_uploaded'));
|
||||
Http::redirect(Http::getBaseUrl().'/admin/entries/edit?entry='.Http::get('entry').'&media=true');
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/entries/edit?entry=' . Http::get('entry') . '&media=true');
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -536,15 +536,15 @@ class EntriesManager
|
||||
*/
|
||||
public static function uploadFile(
|
||||
array $file,
|
||||
string $upload_directory,
|
||||
string $allowed = 'jpeg, png, gif, jpg',
|
||||
int $max_size = 3000000,
|
||||
string $filename = null,
|
||||
bool $remove_spaces = true,
|
||||
int $max_width = null,
|
||||
int $max_height = null,
|
||||
bool $exact = false,
|
||||
int $chmod = 0644
|
||||
string $upload_directory,
|
||||
string $allowed = 'jpeg, png, gif, jpg',
|
||||
int $max_size = 3000000,
|
||||
string $filename = null,
|
||||
bool $remove_spaces = true,
|
||||
int $max_width = null,
|
||||
int $max_height = null,
|
||||
bool $exact = false,
|
||||
int $chmod = 0644
|
||||
) {
|
||||
//
|
||||
// Tests if a successful upload has been made.
|
||||
@@ -578,7 +578,7 @@ class EntriesManager
|
||||
//
|
||||
// Validation rule to test if an upload is an image and, optionally, is the correct size.
|
||||
//
|
||||
if (in_array(mime_content_type($file['tmp_name']), ['image/jpeg', 'image/jpg', 'image/png','image/gif'])) {
|
||||
if (in_array(mime_content_type($file['tmp_name']), ['image/jpeg', 'image/jpg', 'image/png', 'image/gif'])) {
|
||||
function validateImage($file, $max_width, $max_height, $exact)
|
||||
{
|
||||
try {
|
||||
@@ -593,12 +593,12 @@ class EntriesManager
|
||||
return false;
|
||||
}
|
||||
|
||||
if (! $max_width) {
|
||||
if (!$max_width) {
|
||||
// No limit, use the image width
|
||||
$max_width = $width;
|
||||
}
|
||||
|
||||
if (! $max_height) {
|
||||
if (!$max_height) {
|
||||
// No limit, use the image height
|
||||
$max_height = $height;
|
||||
}
|
||||
@@ -619,7 +619,7 @@ class EntriesManager
|
||||
}
|
||||
}
|
||||
|
||||
if (! isset($file['tmp_name']) or ! is_uploaded_file($file['tmp_name'])) {
|
||||
if (!isset($file['tmp_name']) or !is_uploaded_file($file['tmp_name'])) {
|
||||
|
||||
// Ignore corrupted uploads
|
||||
return false;
|
||||
@@ -637,12 +637,12 @@ class EntriesManager
|
||||
$filename = Text::safeString(pathinfo($filename)['filename'], '-', true) . '.' . pathinfo($filename)['extension'];
|
||||
}
|
||||
|
||||
if (! is_dir($upload_directory) or ! is_writable(realpath($upload_directory))) {
|
||||
if (!is_dir($upload_directory) or !is_writable(realpath($upload_directory))) {
|
||||
throw new \RuntimeException("Directory {$upload_directory} must be writable");
|
||||
}
|
||||
|
||||
// Make the filename into a complete path
|
||||
$filename = realpath($upload_directory).DIRECTORY_SEPARATOR.$filename;
|
||||
$filename = realpath($upload_directory) . DIRECTORY_SEPARATOR . $filename;
|
||||
|
||||
if (move_uploaded_file($file['tmp_name'], $filename)) {
|
||||
|
||||
|
@@ -28,8 +28,8 @@ class FieldsetsManager
|
||||
if (!Filesystem::has($file)) {
|
||||
// Create a fieldset!
|
||||
if (Filesystem::write(
|
||||
$file,
|
||||
YamlParser::encode([
|
||||
$file,
|
||||
YamlParser::encode([
|
||||
'title' => Http::post('title'),
|
||||
'fields' => [
|
||||
'title' => [
|
||||
@@ -37,8 +37,8 @@ class FieldsetsManager
|
||||
'type' => 'text',
|
||||
'size' => 'col-12'
|
||||
]
|
||||
]
|
||||
])
|
||||
]
|
||||
])
|
||||
)) {
|
||||
Notification::set('success', __('admin_message_fieldset_created'));
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/fieldsets');
|
||||
@@ -90,9 +90,9 @@ class FieldsetsManager
|
||||
if (Http::get('fieldset') != '') {
|
||||
if (Token::check((Http::get('token')))) {
|
||||
Filesystem::copy(PATH['themes'] . '/' . Registry::get('settings.theme') . '/fieldsets/' . Http::get('fieldset') . '.yaml',
|
||||
PATH['themes'] . '/' . Registry::get('settings.theme') . '/fieldsets/' . Http::get('fieldset') . '-duplicate-' . date("Ymd_His") . '.yaml');
|
||||
PATH['themes'] . '/' . Registry::get('settings.theme') . '/fieldsets/' . Http::get('fieldset') . '-duplicate-' . date("Ymd_His") . '.yaml');
|
||||
Notification::set('success', __('admin_message_fieldset_duplicated'));
|
||||
Http::redirect(Http::getBaseUrl().'/admin/fieldsets');
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/fieldsets');
|
||||
} else {
|
||||
die('Request was denied because it contained an invalid security token. Please refresh the page and try again.');
|
||||
}
|
||||
@@ -106,11 +106,11 @@ class FieldsetsManager
|
||||
|
||||
// Save a fieldset!
|
||||
if (Filesystem::write(
|
||||
PATH['themes'] . '/' . Registry::get('settings.theme') . '/fieldsets/' . Http::post('name') . '.yaml',
|
||||
Http::post('fieldset')
|
||||
PATH['themes'] . '/' . Registry::get('settings.theme') . '/fieldsets/' . Http::post('name') . '.yaml',
|
||||
Http::post('fieldset')
|
||||
)) {
|
||||
Notification::set('success', __('admin_message_fieldset_saved'));
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/fieldsets/edit?fieldset='.Http::post('name'));
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/fieldsets/edit?fieldset=' . Http::post('name'));
|
||||
}
|
||||
} else {
|
||||
die('Request was denied because it contained an invalid security token. Please refresh the page and try again.');
|
||||
|
@@ -31,8 +31,8 @@ class MenusManager
|
||||
if (!Filesystem::has($file)) {
|
||||
// Create a menu!
|
||||
if (Filesystem::write(
|
||||
$file,
|
||||
YamlParser::encode(['title' => Http::post('title')])
|
||||
$file,
|
||||
YamlParser::encode(['title' => Http::post('title')])
|
||||
)) {
|
||||
Notification::set('success', __('admin_message_menu_created'));
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/menus');
|
||||
@@ -84,9 +84,9 @@ class MenusManager
|
||||
if (Http::get('menu') != '') {
|
||||
if (Token::check((Http::get('token')))) {
|
||||
Filesystem::copy(PATH['menus'] . '/' . Http::get('menu') . '.yaml',
|
||||
PATH['menus'] . '/' . Http::get('menu') . '-duplicate-' . date("Ymd_His") . '.yaml');
|
||||
PATH['menus'] . '/' . Http::get('menu') . '-duplicate-' . date("Ymd_His") . '.yaml');
|
||||
Notification::set('success', __('admin_message_menu_duplicated'));
|
||||
Http::redirect(Http::getBaseUrl().'/admin/menus');
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/menus');
|
||||
} else {
|
||||
die('Request was denied because it contained an invalid security token. Please refresh the page and try again.');
|
||||
}
|
||||
@@ -100,8 +100,8 @@ class MenusManager
|
||||
|
||||
// Save a menu!
|
||||
if (Filesystem::write(
|
||||
PATH['menus'] . '/' . Http::post('name') . '.yaml',
|
||||
Http::post('menu')
|
||||
PATH['menus'] . '/' . Http::post('name') . '.yaml',
|
||||
Http::post('menu')
|
||||
)) {
|
||||
Notification::set('success', __('admin_message_menu_saved'));
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/menus/edit?menu=' . Http::post('name'));
|
||||
@@ -122,10 +122,10 @@ class MenusManager
|
||||
$menus = Filesystem::getFilesList(PATH['menus'], 'yaml');
|
||||
|
||||
if (count($menus) > 0) {
|
||||
foreach ($menus as $menu) {
|
||||
$menus_list[basename($menu, '.yaml')] = YamlParser::decode(Filesystem::read($menu));
|
||||
}
|
||||
}
|
||||
foreach ($menus as $menu) {
|
||||
$menus_list[basename($menu, '.yaml')] = YamlParser::decode(Filesystem::read($menu));
|
||||
}
|
||||
}
|
||||
|
||||
Themes::view('admin/views/templates/extends/menus/list')
|
||||
->assign('menus_list', $menus_list)
|
||||
|
@@ -20,9 +20,9 @@ class PluginsManager
|
||||
{
|
||||
if (Http::post('plugin_change_status')) {
|
||||
if (Token::check((Http::post('token')))) {
|
||||
$plugin_settings = YamlParser::decode(Filesystem::read(PATH['plugins'] . '/' . Http::post('plugin') . '/' . 'settings.yaml'));
|
||||
$plugin_settings = YamlParser::decode(Filesystem::read(PATH['plugins'] . '/' . Http::post('plugin') . '/' . 'settings.yaml'));
|
||||
Arr::set($plugin_settings, 'enabled', (Http::post('status') == 'true' ? true : false));
|
||||
Filesystem::write(PATH['plugins'] . '/' . Http::post('plugin') . '/' . 'settings.yaml', YamlParser::encode($plugin_settings));
|
||||
Filesystem::write(PATH['plugins'] . '/' . Http::post('plugin') . '/' . 'settings.yaml', YamlParser::encode($plugin_settings));
|
||||
Cache::clear();
|
||||
} else {
|
||||
die('Request was denied because it contained an invalid security token. Please refresh the page and try again.');
|
||||
@@ -34,7 +34,7 @@ class PluginsManager
|
||||
{
|
||||
Registry::set('sidebar_menu_item', 'plugins');
|
||||
|
||||
Event::addListener('onBeforeRequestShutdown', function () {
|
||||
Event::addListener('onBeforeRequestShutdown', function() {
|
||||
PluginsManager::_pluginsChangeStatusAjax();
|
||||
});
|
||||
|
||||
|
@@ -28,7 +28,7 @@ class SettingsManager
|
||||
if (Token::check((Http::get('token')))) {
|
||||
Cache::clear();
|
||||
Notification::set('success', __('admin_message_cache_files_deleted'));
|
||||
Http::redirect(Http::getBaseUrl().'/admin/settings');
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/settings');
|
||||
} else {
|
||||
die('Request was denied because it contained an invalid security token. Please refresh the page and try again.');
|
||||
}
|
||||
@@ -52,7 +52,7 @@ class SettingsManager
|
||||
|
||||
if (Filesystem::write(PATH['config']['site'] . '/settings.yaml', YamlParser::encode(array_merge(Registry::get('settings'), $settings)))) {
|
||||
Notification::set('success', __('admin_message_settings_saved'));
|
||||
Http::redirect(Http::getBaseUrl().'/admin/settings');
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/settings');
|
||||
}
|
||||
} else {
|
||||
die('Request was denied because it contained an invalid security token. Please refresh the page and try again.');
|
||||
@@ -85,17 +85,17 @@ class SettingsManager
|
||||
}
|
||||
|
||||
$cache_driver = ['auto' => 'Auto Detect',
|
||||
'file' => 'File',
|
||||
'apc' => 'APC',
|
||||
'apcu' => 'APCu',
|
||||
'wincache' => 'WinCache',
|
||||
'xcache' => 'Xcache',
|
||||
'memcache' => 'Memcache',
|
||||
'memcached' => 'Memcached',
|
||||
'redis' => 'Redis',
|
||||
'sqlite3' => 'SQLite3',
|
||||
'zend' => 'Zend',
|
||||
'array' => 'Array'];
|
||||
'file' => 'File',
|
||||
'apc' => 'APC',
|
||||
'apcu' => 'APCu',
|
||||
'wincache' => 'WinCache',
|
||||
'xcache' => 'Xcache',
|
||||
'memcache' => 'Memcache',
|
||||
'memcached' => 'Memcached',
|
||||
'redis' => 'Redis',
|
||||
'sqlite3' => 'SQLite3',
|
||||
'zend' => 'Zend',
|
||||
'array' => 'Array'];
|
||||
|
||||
Themes::view('admin/views/templates/system/settings/list')
|
||||
->assign('settings', Registry::get('settings'))
|
||||
|
@@ -31,8 +31,8 @@ class SnippetsManager
|
||||
if (!Filesystem::has($file)) {
|
||||
// Create a snippet!
|
||||
if (Filesystem::write(
|
||||
$file,
|
||||
""
|
||||
$file,
|
||||
""
|
||||
)) {
|
||||
Notification::set('success', __('admin_message_snippet_created'));
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/snippets');
|
||||
@@ -84,9 +84,9 @@ class SnippetsManager
|
||||
if (Http::get('snippet') != '') {
|
||||
if (Token::check((Http::get('token')))) {
|
||||
Filesystem::copy(PATH['snippets'] . '/' . Http::get('snippet') . '.php',
|
||||
PATH['snippets'] . '/' . Http::get('snippet') . '-duplicate-' . date("Ymd_His") . '.php');
|
||||
PATH['snippets'] . '/' . Http::get('snippet') . '-duplicate-' . date("Ymd_His") . '.php');
|
||||
Notification::set('success', __('admin_message_snippet_duplicated'));
|
||||
Http::redirect(Http::getBaseUrl().'/admin/snippets');
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/snippets');
|
||||
} else {
|
||||
die('Request was denied because it contained an invalid security token. Please refresh the page and try again.');
|
||||
}
|
||||
@@ -100,11 +100,11 @@ class SnippetsManager
|
||||
|
||||
// Save a snippet!
|
||||
if (Filesystem::write(
|
||||
PATH['snippets'] . '/' . Http::post('name') . '.php',
|
||||
Http::post('snippet')
|
||||
PATH['snippets'] . '/' . Http::post('name') . '.php',
|
||||
Http::post('snippet')
|
||||
)) {
|
||||
Notification::set('success', __('admin_message_snippet_saved'));
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/snippets/edit?snippet='.Http::post('name'));
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/snippets/edit?snippet=' . Http::post('name'));
|
||||
}
|
||||
} else {
|
||||
die('Request was denied because it contained an invalid security token. Please refresh the page and try again.');
|
||||
|
@@ -30,8 +30,8 @@ class TemplatesManager
|
||||
if (!Filesystem::has($file)) {
|
||||
// Create a template!
|
||||
if (Filesystem::write(
|
||||
$file,
|
||||
""
|
||||
$file,
|
||||
""
|
||||
)) {
|
||||
Notification::set('success', __('admin_message_template_created'));
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/templates');
|
||||
@@ -88,9 +88,9 @@ class TemplatesManager
|
||||
if (Token::check((Http::get('token')))) {
|
||||
$type = (Http::get('type') && Http::get('type') == 'partial') ? 'partial' : 'template';
|
||||
Filesystem::copy(PATH['themes'] . '/' . Registry::get('settings.theme') . '/views/' . $type . 's' . '/' . Http::get('template') . '.php',
|
||||
PATH['themes'] . '/' . Registry::get('settings.theme') . '/views/' . $type . 's' . '/' . Http::get('template') . '-duplicate-' . date("Ymd_His") . '.php');
|
||||
PATH['themes'] . '/' . Registry::get('settings.theme') . '/views/' . $type . 's' . '/' . Http::get('template') . '-duplicate-' . date("Ymd_His") . '.php');
|
||||
Notification::set('success', __('admin_message_template_duplicated'));
|
||||
Http::redirect(Http::getBaseUrl().'/admin/templates');
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/templates');
|
||||
} else {
|
||||
die('Request was denied because it contained an invalid security token. Please refresh the page and try again.');
|
||||
}
|
||||
@@ -106,8 +106,8 @@ class TemplatesManager
|
||||
|
||||
// Save a template!
|
||||
if (Filesystem::write(
|
||||
PATH['themes'] . '/' . Registry::get('settings.theme') . '/views/' . $type . 's' . '/' . Http::post('name') . '.php',
|
||||
Http::post('template')
|
||||
PATH['themes'] . '/' . Registry::get('settings.theme') . '/views/' . $type . 's' . '/' . Http::post('name') . '.php',
|
||||
Http::post('template')
|
||||
)) {
|
||||
Notification::set('success', __('admin_message_template_saved'));
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/templates/edit?template=' . Http::post('name') . '&type=' . $type);
|
||||
|
@@ -26,7 +26,7 @@ class UsersManager
|
||||
{
|
||||
if (Token::check((Http::get('token')))) {
|
||||
Session::destroy();
|
||||
Http::redirect(Http::getBaseUrl().'/admin');
|
||||
Http::redirect(Http::getBaseUrl() . '/admin');
|
||||
} else {
|
||||
die('Request was denied because it contained an invalid security token. Please refresh the page and try again.');
|
||||
}
|
||||
@@ -51,7 +51,7 @@ class UsersManager
|
||||
'state' => 'enabled'])
|
||||
);
|
||||
|
||||
Http::redirect(Http::getBaseUrl().'/admin/entries');
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/entries');
|
||||
}
|
||||
} else {
|
||||
die('Request was denied because it contained an invalid security token. Please refresh the page and try again.');
|
||||
@@ -89,7 +89,7 @@ class UsersManager
|
||||
if (password_verify(trim(Http::post('password')), $user_file['hashed_password'])) {
|
||||
Session::set('username', $user_file['username']);
|
||||
Session::set('role', $user_file['role']);
|
||||
Http::redirect(Http::getBaseUrl().'/admin/entries');
|
||||
Http::redirect(Http::getBaseUrl() . '/admin/entries');
|
||||
} else {
|
||||
Notification::set('error', __('admin_message_wrong_username_password'));
|
||||
}
|
||||
|
@@ -53,7 +53,7 @@ use function Flextype\Component\I18n\__;
|
||||
</style>
|
||||
<?php Event::dispatch('onAdminThemeHeader') ?>
|
||||
</head>
|
||||
<body <?php if(Http::get('preview') && Http::get('preview') == 'true'): ?> class="content-full-size" <?php endif ?>>
|
||||
<body <?php if (Http::get('preview') && Http::get('preview') == 'true'): ?> class="content-full-size" <?php endif ?>>
|
||||
<div class="wrapper">
|
||||
<?php UsersManager::isLoggedIn() and Themes::view('admin/views/partials/sidebar')->display() ?>
|
||||
<div class="main-panel <?php if (isset($main_panel_class)) { echo $main_panel_class; }?>">
|
||||
|
@@ -16,22 +16,22 @@ use Flextype\Navigation;
|
||||
</div>
|
||||
<ul class="nav">
|
||||
<?php $active_menu_item = Registry::exists('sidebar_menu_item') ? Registry::get('sidebar_menu_item') : ''; ?>
|
||||
<?php foreach(NavigationManager::getItems('content') as $item): ?>
|
||||
<?php foreach (NavigationManager::getItems('content') as $item): ?>
|
||||
<li class="nav-item <?= ($item['item'] == $active_menu_item) ? 'active' : '' ?>">
|
||||
<?= Html::anchor($item['title'], $item['link'], $item['attributes']) ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<?php foreach(NavigationManager::getItems('extends') as $item): ?>
|
||||
<?php foreach (NavigationManager::getItems('extends') as $item): ?>
|
||||
<li class="nav-item <?= ($item['item'] == $active_menu_item) ? 'active' : '' ?>">
|
||||
<?= Html::anchor($item['title'], $item['link'], $item['attributes']) ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<?php foreach(NavigationManager::getItems('settings') as $item): ?>
|
||||
<?php foreach (NavigationManager::getItems('settings') as $item): ?>
|
||||
<li class="nav-item <?= ($item['item'] == $active_menu_item) ? 'active' : '' ?>">
|
||||
<?= Html::anchor($item['title'], $item['link'], $item['attributes']) ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<?php foreach(NavigationManager::getItems('help') as $item): ?>
|
||||
<?php foreach (NavigationManager::getItems('help') as $item): ?>
|
||||
<li class="nav-item <?= ($item['item'] == $active_menu_item) ? 'active' : '' ?>">
|
||||
<?= Html::anchor($item['title'], $item['link'], $item['attributes']) ?>
|
||||
</li>
|
||||
|
@@ -10,7 +10,7 @@ use Flextype\Component\{Http\Http, Event\Event, Registry\Registry, Assets\Assets
|
||||
<?php endif ?>
|
||||
|
||||
<?php Assets::add('js', Http::getBaseUrl() . '/site/plugins/admin/assets/dist/js/admin-build.min.js', 'admin', 1); ?>
|
||||
<?php if ($locale_lower != 'en') Assets::add('js', Http::getBaseUrl() . '/site/plugins/admin/assets/dist/langs/trumbowyg/langs/'.$locale_lower.'.min.js', 'admin', 10); ?>
|
||||
<?php if ($locale_lower != 'en') Assets::add('js', Http::getBaseUrl() . '/site/plugins/admin/assets/dist/langs/trumbowyg/langs/' . $locale_lower . '.min.js', 'admin', 10); ?>
|
||||
<?php foreach (Assets::get('js', 'admin') as $assets_by_priorities) { foreach ($assets_by_priorities as $assets) { ?>
|
||||
<script type="text/javascript" src="<?php echo $assets['asset']; ?>"></script>
|
||||
<?php } } ?>
|
||||
@@ -140,7 +140,8 @@ use Flextype\Component\{Http\Http, Event\Event, Registry\Registry, Assets\Assets
|
||||
<?php if (Http::get('fieldset') || Http::get('menu')): ?>
|
||||
indentUnit: 2,
|
||||
tabSize: 2,
|
||||
<?php else: ?>
|
||||
<?php else {
|
||||
: ?>
|
||||
tabSize: 4,
|
||||
indentUnit: 4,
|
||||
<?php endif ?>
|
||||
@@ -182,4 +183,6 @@ use Flextype\Component\{Http\Http, Event\Event, Registry\Registry, Assets\Assets
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php Event::dispatch('onAdminThemeFooter'); ?>
|
||||
<?php Event::dispatch('onAdminThemeFooter');
|
||||
}
|
||||
?>
|
||||
|
@@ -16,12 +16,12 @@ Themes::view('admin/views/partials/navbar')
|
||||
'title' => __('admin_entries'),
|
||||
'attributes' => ['class' => 'navbar-item']
|
||||
],
|
||||
'entries_add' => [
|
||||
'entries_add' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/entries/add?entry='.Http::get('entry'),
|
||||
'title' => __('admin_create_new_entry'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
])
|
||||
]
|
||||
])
|
||||
->display();
|
||||
Themes::view('admin/views/partials/content-start')->display();
|
||||
?>
|
||||
|
@@ -15,7 +15,7 @@ Themes::view('admin/views/partials/navbar')
|
||||
'link' => Http::getBaseUrl() . '/admin/entries/edit?entry=' . $entry_name,
|
||||
'title' => __('admin_content'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
],
|
||||
],
|
||||
'edit_entry_media' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/entries/edit?entry=' . $entry_name . '&media=true',
|
||||
'title' => __('admin_media'),
|
||||
@@ -25,7 +25,7 @@ Themes::view('admin/views/partials/navbar')
|
||||
'link' => Http::getBaseUrl() . '/admin/entries/edit?entry=' . $entry_name . '&source=true',
|
||||
'title' => __('admin_source'),
|
||||
'attributes' => ['class' => 'navbar-item']
|
||||
]
|
||||
]
|
||||
])
|
||||
->assign('buttons', [
|
||||
'save_entry' => [
|
||||
|
@@ -1,21 +1,21 @@
|
||||
<?php namespace Flextype ?>
|
||||
<?php use Flextype\Component\{Http\Http, Registry\Registry,Filesystem\Filesystem, Token\Token, Text\Text} ?>
|
||||
<?php use Flextype\Component\{Http\Http, Registry\Registry, Filesystem\Filesystem, Token\Token, Text\Text} ?>
|
||||
<?php use function Flextype\Component\I18n\__; ?>
|
||||
<?php Themes::view('admin/views/partials/head')->display() ?>
|
||||
<?php Themes::view('admin/views/partials/navbar')
|
||||
->assign('links', [
|
||||
->assign('links', [
|
||||
'entries' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/entries',
|
||||
'title' => __('admin_entries'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
]
|
||||
])
|
||||
->assign('buttons', [
|
||||
'entries' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/entries/add?entry='.Http::get('entry') ,
|
||||
'link' => Http::getBaseUrl() . '/admin/entries/add?entry=' . Http::get('entry'),
|
||||
'title' => __('admin_create_new_entry'),
|
||||
'attributes' => ['class' => 'float-right btn']
|
||||
]
|
||||
]
|
||||
])
|
||||
->display()
|
||||
?>
|
||||
|
@@ -12,7 +12,7 @@ use function Flextype\Component\I18n\__;
|
||||
'link' => Http::getBaseUrl() . '/admin/entries/edit?entry=' . $entry_name,
|
||||
'title' => __('admin_content'),
|
||||
'attributes' => ['class' => 'navbar-item']
|
||||
],
|
||||
],
|
||||
'edit_entry_media' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/entries/edit?entry=' . $entry_name . '&media=true',
|
||||
'title' => __('admin_media'),
|
||||
@@ -22,7 +22,7 @@ use function Flextype\Component\I18n\__;
|
||||
'link' => Http::getBaseUrl() . '/admin/entries/edit?entry=' . $entry_name . '&source=true',
|
||||
'title' => __('admin_source'),
|
||||
'attributes' => ['class' => 'navbar-item']
|
||||
]
|
||||
]
|
||||
])
|
||||
->assign('entry', $entry)
|
||||
->display();
|
||||
@@ -47,12 +47,12 @@ use function Flextype\Component\I18n\__;
|
||||
|
||||
<div class="media-manager">
|
||||
<div class="row">
|
||||
<?php foreach($files as $file): ?>
|
||||
<?php foreach ($files as $file): ?>
|
||||
<div class="col-sm-2">
|
||||
<div class="item">
|
||||
<a href="javascript:;"
|
||||
<?php $file_ext = substr(strrchr($file, '.'), 1) ?>
|
||||
<?php if(in_array($file_ext, ['jpeg', 'png', 'gif', 'jpg'])): ?>
|
||||
<?php if (in_array($file_ext, ['jpeg', 'png', 'gif', 'jpg'])): ?>
|
||||
style="background-image: url('<?= Images::getImageUrl(Http::get('entry') . '/' . basename($file), ['w'=>'200']) ?>')"
|
||||
<?php else: ?>
|
||||
style="background: #000;"
|
||||
@@ -61,7 +61,7 @@ use function Flextype\Component\I18n\__;
|
||||
data-image-delete-url="<?= Http::getBaseUrl() ?>/admin/entries/edit?entry=<?= Http::get('entry') ?>&delete_file=<?= basename($file) ?>&media=true&token=<?= Token::generate() ?>"
|
||||
data-image-url="<?= Http::getBaseUrl() . '/site/entries/' . Http::get('entry') . '/' . basename($file) ?>">
|
||||
<i class="fas fa-eye"></i>
|
||||
<?php if(!in_array($file_ext, ['jpeg', 'png', 'gif', 'jpg'])): ?>
|
||||
<?php if (!in_array($file_ext, ['jpeg', 'png', 'gif', 'jpg'])): ?>
|
||||
<span class="file-ext"><?= $file_ext ?></span>
|
||||
<?php endif ?>
|
||||
</a>
|
||||
|
@@ -18,7 +18,7 @@ use function Flextype\Component\I18n\__;
|
||||
'title' => __('admin_move'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
])
|
||||
])
|
||||
->assign('entry', $entry)
|
||||
->display();
|
||||
Themes::view('admin/views/partials/content-start')->display();
|
||||
|
@@ -20,7 +20,7 @@ Themes::view('admin/views/partials/navbar')
|
||||
'title' => __('admin_rename'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
])
|
||||
])
|
||||
->assign('entry', $entry)
|
||||
->display();
|
||||
Themes::view('admin/views/partials/content-start')->display();
|
||||
@@ -35,7 +35,7 @@ Themes::view('admin/views/partials/content-start')->display();
|
||||
<?= Form::hidden('name_current', $name_current) ?>
|
||||
<div class="form-group">
|
||||
<?= Form::label('name', __('admin_name'), ['for' => 'entryName']) ?>
|
||||
<?= Form::input('name', $name_current, ['class' => 'form-control', 'id' => 'entryName', 'required', 'data-validation' => 'length required', 'data-validation-allowing' => '-_', 'data-validation-length' => 'min1', 'data-validation-error-msg' => __('admin_error_title_empty_input')]) ?>
|
||||
<?= Form::input('name', $name_current, ['class' => 'form-control', 'id' => 'entryName', 'required', 'data-validation' => 'length required', 'data-validation-allowing' => '-_', 'data-validation-length' => 'min1', 'data-validation-error-msg' => __('admin_error_title_empty_input')]) ?>
|
||||
</div>
|
||||
<?= Form::submit('rename_entry', __('admin_save'), ['class' => 'btn btn-black btn-fill btn-wd']) ?>
|
||||
<?= Form::close() ?>
|
||||
|
@@ -12,7 +12,7 @@ use function Flextype\Component\I18n\__;
|
||||
'link' => Http::getBaseUrl() . '/admin/entries/edit?entry=' . $entry_name,
|
||||
'title' => __('admin_content'),
|
||||
'attributes' => ['class' => 'navbar-item']
|
||||
],
|
||||
],
|
||||
'edit_entry_media' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/entries/edit?entry=' . $entry_name . '&media=true',
|
||||
'title' => __('admin_media'),
|
||||
@@ -22,7 +22,7 @@ use function Flextype\Component\I18n\__;
|
||||
'link' => Http::getBaseUrl() . '/admin/entries/edit?entry=' . $entry_name . '&source=true',
|
||||
'title' => __('admin_source'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
]
|
||||
])
|
||||
->assign('buttons', [
|
||||
'save_entry' => [
|
||||
|
@@ -18,7 +18,7 @@ use function Flextype\Component\I18n\__;
|
||||
'title' => __('admin_type'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
])
|
||||
])
|
||||
->assign('entry', Http::get('entry'))
|
||||
->display();
|
||||
Themes::view('admin/views/partials/content-start')->display();
|
||||
|
@@ -16,12 +16,12 @@ Themes::view('admin/views/partials/navbar')
|
||||
'title' => __('admin_fieldsets'),
|
||||
'attributes' => ['class' => 'navbar-item']
|
||||
],
|
||||
'fieldsets_add' => [
|
||||
'fieldsets_add' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/fieldsets/add',
|
||||
'title' => __('admin_create_new_fieldset'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
])
|
||||
]
|
||||
])
|
||||
->display();
|
||||
Themes::view('admin/views/partials/content-start')->display();
|
||||
?>
|
||||
|
@@ -11,19 +11,19 @@ use function Flextype\Component\I18n\__;
|
||||
Themes::view('admin/views/partials/head')->display();
|
||||
Themes::view('admin/views/partials/navbar')
|
||||
->assign('links', [
|
||||
'fieldset' => [
|
||||
'fieldset' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/fieldsets/edit?fieldset=' . Http::get('fieldset'),
|
||||
'title' => __('admin_fieldset'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
])
|
||||
->assign('buttons', [
|
||||
'save_entry' => [
|
||||
'link' => 'javascript:;',
|
||||
'title' => __('admin_save'),
|
||||
'attributes' => ['class' => 'js-save-form-submit float-right btn']
|
||||
]
|
||||
])
|
||||
]
|
||||
])
|
||||
->assign('buttons', [
|
||||
'save_entry' => [
|
||||
'link' => 'javascript:;',
|
||||
'title' => __('admin_save'),
|
||||
'attributes' => ['class' => 'js-save-form-submit float-right btn']
|
||||
]
|
||||
])
|
||||
->display();
|
||||
Themes::view('admin/views/partials/content-start')->display();
|
||||
?>
|
||||
|
@@ -3,19 +3,19 @@
|
||||
<?php use function Flextype\Component\I18n\__; ?>
|
||||
<?php Themes::view('admin/views/partials/head')->display() ?>
|
||||
<?php Themes::view('admin/views/partials/navbar')
|
||||
->assign('links', [
|
||||
->assign('links', [
|
||||
'fieldsets' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/fieldsets',
|
||||
'title' => __('admin_fieldsets'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
]
|
||||
])
|
||||
->assign('buttons', [
|
||||
'entries' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/fieldsets/add',
|
||||
'title' => __('admin_create_new_fieldset'),
|
||||
'attributes' => ['class' => 'float-right btn']
|
||||
]
|
||||
]
|
||||
])
|
||||
->display()
|
||||
?>
|
||||
|
@@ -16,12 +16,12 @@ Themes::view('admin/views/partials/navbar')
|
||||
'title' => __('admin_fieldsets'),
|
||||
'attributes' => ['class' => 'navbar-item']
|
||||
],
|
||||
'fieldsets_add' => [
|
||||
'fieldsets_add' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/fieldsets/rename?fieldset=' . $name_current,
|
||||
'title' => __('admin_rename'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
])
|
||||
]
|
||||
])
|
||||
->display();
|
||||
Themes::view('admin/views/partials/content-start')->display();
|
||||
?>
|
||||
@@ -33,7 +33,7 @@ Themes::view('admin/views/partials/content-start')->display();
|
||||
<?= Form::hidden('name_current', $name_current) ?>
|
||||
<div class="form-group">
|
||||
<?= Form::label('name', __('admin_name'), ['for' => 'fieldsetName']) ?>
|
||||
<?= Form::input('name', $name_current, ['class' => 'form-control', 'id' => 'fieldsetName', 'required', 'data-validation' => 'length required', 'data-validation-allowing' => '-_', 'data-validation-length' => 'min1', 'data-validation-error-msg' => __('admin_error_title_empty_input')]) ?>
|
||||
<?= Form::input('name', $name_current, ['class' => 'form-control', 'id' => 'fieldsetName', 'required', 'data-validation' => 'length required', 'data-validation-allowing' => '-_', 'data-validation-length' => 'min1', 'data-validation-error-msg' => __('admin_error_title_empty_input')]) ?>
|
||||
</div>
|
||||
<?= Form::submit('rename_fieldset', __('admin_save'), ['class' => 'btn btn-black btn-fill btn-wd']) ?>
|
||||
<?= Form::close() ?>
|
||||
|
@@ -16,12 +16,12 @@ Themes::view('admin/views/partials/navbar')
|
||||
'title' => __('admin_menus'),
|
||||
'attributes' => ['class' => 'navbar-item']
|
||||
],
|
||||
'menus_add' => [
|
||||
'menus_add' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/menus/add',
|
||||
'title' => __('admin_create_new_menu'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
])
|
||||
]
|
||||
])
|
||||
->display();
|
||||
Themes::view('admin/views/partials/content-start')->display();
|
||||
?>
|
||||
|
@@ -11,19 +11,19 @@ use function Flextype\Component\I18n\__;
|
||||
Themes::view('admin/views/partials/head')->display();
|
||||
Themes::view('admin/views/partials/navbar')
|
||||
->assign('links', [
|
||||
'menu' => [
|
||||
'menu' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/menus/edit?menu=' . Http::get('menu'),
|
||||
'title' => __('admin_menu'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
])
|
||||
->assign('buttons', [
|
||||
'save_entry' => [
|
||||
'link' => 'javascript:;',
|
||||
'title' => __('admin_save'),
|
||||
'attributes' => ['class' => 'js-save-form-submit float-right btn']
|
||||
]
|
||||
])
|
||||
]
|
||||
])
|
||||
->assign('buttons', [
|
||||
'save_entry' => [
|
||||
'link' => 'javascript:;',
|
||||
'title' => __('admin_save'),
|
||||
'attributes' => ['class' => 'js-save-form-submit float-right btn']
|
||||
]
|
||||
])
|
||||
->display();
|
||||
Themes::view('admin/views/partials/content-start')->display();
|
||||
?>
|
||||
|
@@ -3,19 +3,19 @@
|
||||
<?php use function Flextype\Component\I18n\__; ?>
|
||||
<?php Themes::view('admin/views/partials/head')->display() ?>
|
||||
<?php Themes::view('admin/views/partials/navbar')
|
||||
->assign('links', [
|
||||
->assign('links', [
|
||||
'menus' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/menus',
|
||||
'title' => __('admin_menus'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
]
|
||||
])
|
||||
->assign('buttons', [
|
||||
'entries' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/menus/add',
|
||||
'title' => __('admin_create_new_menu'),
|
||||
'attributes' => ['class' => 'float-right btn']
|
||||
]
|
||||
]
|
||||
])
|
||||
->display()
|
||||
?>
|
||||
|
@@ -16,12 +16,12 @@ Themes::view('admin/views/partials/navbar')
|
||||
'title' => __('admin_menus'),
|
||||
'attributes' => ['class' => 'navbar-item']
|
||||
],
|
||||
'menus_add' => [
|
||||
'menus_add' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/menus/rename?menu=' . $name_current,
|
||||
'title' => __('admin_rename'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
])
|
||||
]
|
||||
])
|
||||
->display();
|
||||
Themes::view('admin/views/partials/content-start')->display();
|
||||
?>
|
||||
@@ -33,7 +33,7 @@ Themes::view('admin/views/partials/content-start')->display();
|
||||
<?= Form::hidden('name_current', $name_current) ?>
|
||||
<div class="form-group">
|
||||
<?= Form::label('name', __('admin_name'), ['for' => 'menuName']) ?>
|
||||
<?= Form::input('name', $name_current, ['class' => 'form-control', 'id' => 'menuName', 'required', 'data-validation' => 'length required', 'data-validation-allowing' => '-_', 'data-validation-length' => 'min1', 'data-validation-error-msg' => __('admin_error_title_empty_input')]) ?>
|
||||
<?= Form::input('name', $name_current, ['class' => 'form-control', 'id' => 'menuName', 'required', 'data-validation' => 'length required', 'data-validation-allowing' => '-_', 'data-validation-length' => 'min1', 'data-validation-error-msg' => __('admin_error_title_empty_input')]) ?>
|
||||
</div>
|
||||
<?= Form::submit('rename_menu', __('admin_save'), ['class' => 'btn btn-black btn-fill btn-wd']) ?>
|
||||
<?= Form::close() ?>
|
||||
|
@@ -6,12 +6,12 @@ use function Flextype\Component\I18n\__;
|
||||
|
||||
Themes::view('admin/views/partials/head')->display();
|
||||
Themes::view('admin/views/partials/navbar')
|
||||
->assign('links', [
|
||||
->assign('links', [
|
||||
'plugins' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/plugins',
|
||||
'title' => __('admin_plugins'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
]
|
||||
])
|
||||
->assign('buttons', [
|
||||
'plugins_get_more' => [
|
||||
@@ -56,7 +56,12 @@ Themes::view('admin/views/partials/content-start')->display();
|
||||
<td class="text-right">
|
||||
<div class="form-group no-margin">
|
||||
<span class="switch switch-sm">
|
||||
<input id="switch-sm-<?= $plugin['name'] ?>" type="checkbox" class="switch js-switch" data-plugin="<?= $key ?>" data-token="<?= Token::generate() ?>" <?php if ($plugin['enabled'] == 'true') echo 'checked'; else echo ''; ?> <?php if ($key == 'admin') { ?>disabled<?php } ?>>
|
||||
<input id="switch-sm-<?= $plugin['name'] ?>" type="checkbox" class="switch js-switch" data-plugin="<?= $key ?>" data-token="<?= Token::generate() ?>" <?php if ($plugin['enabled'] == 'true') {
|
||||
echo 'checked';
|
||||
} else {
|
||||
echo '';
|
||||
}
|
||||
?> <?php if ($key == 'admin') { ?>disabled<?php } ?>>
|
||||
<label for="switch-sm-<?= $plugin['name'] ?>"></label>
|
||||
</span>
|
||||
</div>
|
||||
|
@@ -16,12 +16,12 @@ Themes::view('admin/views/partials/navbar')
|
||||
'title' => __('admin_snippets'),
|
||||
'attributes' => ['class' => 'navbar-item']
|
||||
],
|
||||
'snippets_add' => [
|
||||
'snippets_add' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/snippets/add',
|
||||
'title' => __('admin_create_new_snippet'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
])
|
||||
]
|
||||
])
|
||||
->display();
|
||||
Themes::view('admin/views/partials/content-start')->display();
|
||||
?>
|
||||
|
@@ -11,19 +11,19 @@ use function Flextype\Component\I18n\__;
|
||||
Themes::view('admin/views/partials/head')->display();
|
||||
Themes::view('admin/views/partials/navbar')
|
||||
->assign('links', [
|
||||
'snippet' => [
|
||||
'snippet' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/snippets/edit?snippet=' . Http::get('snippet'),
|
||||
'title' => __('admin_snippet'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
])
|
||||
->assign('buttons', [
|
||||
'save_entry' => [
|
||||
'link' => 'javascript:;',
|
||||
'title' => __('admin_save'),
|
||||
'attributes' => ['class' => 'js-save-form-submit float-right btn']
|
||||
]
|
||||
])
|
||||
]
|
||||
])
|
||||
->assign('buttons', [
|
||||
'save_entry' => [
|
||||
'link' => 'javascript:;',
|
||||
'title' => __('admin_save'),
|
||||
'attributes' => ['class' => 'js-save-form-submit float-right btn']
|
||||
]
|
||||
])
|
||||
->display();
|
||||
Themes::view('admin/views/partials/content-start')->display();
|
||||
?>
|
||||
|
@@ -3,19 +3,19 @@
|
||||
<?php use function Flextype\Component\I18n\__; ?>
|
||||
<?php Themes::view('admin/views/partials/head')->display() ?>
|
||||
<?php Themes::view('admin/views/partials/navbar')
|
||||
->assign('links', [
|
||||
->assign('links', [
|
||||
'snippets' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/snippets',
|
||||
'title' => __('admin_snippets'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
]
|
||||
])
|
||||
->assign('buttons', [
|
||||
'entries' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/snippets/add',
|
||||
'title' => __('admin_create_new_snippet'),
|
||||
'attributes' => ['class' => 'float-right btn']
|
||||
]
|
||||
]
|
||||
])
|
||||
->display()
|
||||
?>
|
||||
|
@@ -16,12 +16,12 @@ Themes::view('admin/views/partials/navbar')
|
||||
'title' => __('admin_snippets'),
|
||||
'attributes' => ['class' => 'navbar-item']
|
||||
],
|
||||
'snippets_add' => [
|
||||
'snippets_add' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/snippets/rename?snippet=' . $name_current,
|
||||
'title' => __('admin_rename'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
])
|
||||
]
|
||||
])
|
||||
->display();
|
||||
Themes::view('admin/views/partials/content-start')->display();
|
||||
?>
|
||||
@@ -33,7 +33,7 @@ Themes::view('admin/views/partials/content-start')->display();
|
||||
<?= Form::hidden('name_current', $name_current) ?>
|
||||
<div class="form-group">
|
||||
<?= Form::label('name', __('admin_name'), ['for' => 'snippetName']) ?>
|
||||
<?= Form::input('name', $name_current, ['class' => 'form-control', 'id' => 'snippetName', 'required', 'data-validation' => 'length required', 'data-validation-allowing' => '-_', 'data-validation-length' => 'min1', 'data-validation-error-msg' => __('admin_error_title_empty_input')]) ?>
|
||||
<?= Form::input('name', $name_current, ['class' => 'form-control', 'id' => 'snippetName', 'required', 'data-validation' => 'length required', 'data-validation-allowing' => '-_', 'data-validation-length' => 'min1', 'data-validation-error-msg' => __('admin_error_title_empty_input')]) ?>
|
||||
</div>
|
||||
<?= Form::submit('rename_snippet', __('admin_save'), ['class' => 'btn btn-black btn-fill btn-wd']) ?>
|
||||
<?= Form::close() ?>
|
||||
|
@@ -16,12 +16,12 @@ Themes::view('admin/views/partials/navbar')
|
||||
'title' => __('admin_templates'),
|
||||
'attributes' => ['class' => 'navbar-item']
|
||||
],
|
||||
'templates_add' => [
|
||||
'templates_add' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/templates/add',
|
||||
'title' => __('admin_create_new_template'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
])
|
||||
]
|
||||
])
|
||||
->display();
|
||||
Themes::view('admin/views/partials/content-start')->display();
|
||||
?>
|
||||
|
@@ -11,19 +11,19 @@ use function Flextype\Component\I18n\__;
|
||||
Themes::view('admin/views/partials/head')->display();
|
||||
Themes::view('admin/views/partials/navbar')
|
||||
->assign('links', [
|
||||
'template' => [
|
||||
'template' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/templates/edit?template=' . Http::get('template') . '&type='.$type,
|
||||
'title' => __('admin_template'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
])
|
||||
->assign('buttons', [
|
||||
'save_entry' => [
|
||||
'link' => 'javascript:;',
|
||||
'title' => __('admin_save'),
|
||||
'attributes' => ['class' => 'js-save-form-submit float-right btn']
|
||||
]
|
||||
])
|
||||
]
|
||||
])
|
||||
->assign('buttons', [
|
||||
'save_entry' => [
|
||||
'link' => 'javascript:;',
|
||||
'title' => __('admin_save'),
|
||||
'attributes' => ['class' => 'js-save-form-submit float-right btn']
|
||||
]
|
||||
])
|
||||
->display();
|
||||
Themes::view('admin/views/partials/content-start')->display();
|
||||
?>
|
||||
|
@@ -3,19 +3,19 @@
|
||||
<?php use function Flextype\Component\I18n\__; ?>
|
||||
<?php Themes::view('admin/views/partials/head')->display() ?>
|
||||
<?php Themes::view('admin/views/partials/navbar')
|
||||
->assign('links', [
|
||||
->assign('links', [
|
||||
'templates' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/templates',
|
||||
'title' => __('admin_templates'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
]
|
||||
])
|
||||
->assign('buttons', [
|
||||
'entries' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/templates/add',
|
||||
'title' => __('admin_create_new_template'),
|
||||
'attributes' => ['class' => 'float-right btn']
|
||||
]
|
||||
]
|
||||
])
|
||||
->display()
|
||||
?>
|
||||
|
@@ -16,12 +16,12 @@ Themes::view('admin/views/partials/navbar')
|
||||
'title' => __('admin_templates'),
|
||||
'attributes' => ['class' => 'navbar-item']
|
||||
],
|
||||
'templates_add' => [
|
||||
'templates_add' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/templates/rename?template=' . $name_current,
|
||||
'title' => __('admin_rename'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
])
|
||||
]
|
||||
])
|
||||
->display();
|
||||
Themes::view('admin/views/partials/content-start')->display();
|
||||
?>
|
||||
@@ -34,7 +34,7 @@ Themes::view('admin/views/partials/content-start')->display();
|
||||
<?= Form::hidden('type_current', $type) ?>
|
||||
<div class="form-group">
|
||||
<?= Form::label('name', __('admin_name'), ['for' => 'templateName']) ?>
|
||||
<?= Form::input('name', $name_current, ['class' => 'form-control', 'id' => 'templateName', 'required', 'data-validation' => 'length required', 'data-validation-allowing' => '-_', 'data-validation-length' => 'min1', 'data-validation-error-msg' => __('admin_template_error_title_empty_input')]) ?>
|
||||
<?= Form::input('name', $name_current, ['class' => 'form-control', 'id' => 'templateName', 'required', 'data-validation' => 'length required', 'data-validation-allowing' => '-_', 'data-validation-length' => 'min1', 'data-validation-error-msg' => __('admin_template_error_title_empty_input')]) ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<?= Form::label('type', __('admin_type'), ['for' => 'templateType']) ?>
|
||||
|
@@ -10,8 +10,8 @@ Themes::view('admin/views/partials/navbar')
|
||||
'link' => Http::getBaseUrl() . '/admin/information',
|
||||
'title' => __('admin_information'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
],
|
||||
])
|
||||
],
|
||||
])
|
||||
->display();
|
||||
Themes::view('admin/views/partials/content-start')->display();
|
||||
?>
|
||||
@@ -26,11 +26,21 @@ Themes::view('admin/views/partials/content-start')->display();
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= __('admin_debugging'); ?></td>
|
||||
<td><?php if (Registry::get('settings.errors.display')) echo __('admin_on'); else echo __('admin_off'); ?></td>
|
||||
<td><?php if (Registry::get('settings.errors.display')) {
|
||||
echo __('admin_on');
|
||||
} else {
|
||||
echo __('admin_off');
|
||||
}
|
||||
?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= __('admin_cache'); ?></td>
|
||||
<td><?php if (Registry::get('settings.cache.enabled')) echo __('admin_on'); else echo __('admin_off'); ?></td>
|
||||
<td><?php if (Registry::get('settings.cache.enabled')) {
|
||||
echo __('admin_on');
|
||||
} else {
|
||||
echo __('admin_off');
|
||||
}
|
||||
?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -59,27 +69,27 @@ Themes::view('admin/views/partials/content-start')->display();
|
||||
</tr>
|
||||
<?php
|
||||
if (function_exists('apache_get_modules')) {
|
||||
if ( ! in_array('mod_rewrite',apache_get_modules())) {
|
||||
echo '<tr><td>'.'Apache Mod Rewrite'.'</td><td>'.__('admin_not_installed').'</td></tr>';
|
||||
if (!in_array('mod_rewrite', apache_get_modules())) {
|
||||
echo '<tr><td>' . 'Apache Mod Rewrite' . '</td><td>' . __('admin_not_installed') . '</td></tr>';
|
||||
} else {
|
||||
echo '<tr><td>'.'Apache Mod Rewrite'.'</td><td>'.__('admin_installed').'</td></tr>';
|
||||
echo '<tr><td>' . 'Apache Mod Rewrite' . '</td><td>' . __('admin_installed') . '</td></tr>';
|
||||
}
|
||||
} else {
|
||||
echo '<tr><td>'.'Apache Mod Rewrite'.'</td><td>'.__('admin_installed').'</td></tr>';
|
||||
echo '<tr><td>' . 'Apache Mod Rewrite' . '</td><td>' . __('admin_installed') . '</td></tr>';
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (!function_exists('password_hash')) {
|
||||
echo '<tr><td>'.'password_hash()'.'</td><td>'.__('admin_not_installed').'</td></tr>';
|
||||
echo '<tr><td>' . 'password_hash()' . '</td><td>' . __('admin_not_installed') . '</td></tr>';
|
||||
} else {
|
||||
echo '<tr><td>'.'password_hash()'.'</td><td>'.__('admin_installed').'</td></tr>';
|
||||
echo '<tr><td>' . 'password_hash()' . '</td><td>' . __('admin_installed') . '</td></tr>';
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (!function_exists('password_verify')) {
|
||||
echo '<tr><td>'.'password_verify()'.'</td><td>'.__('admin_not_installed').'</td></tr>';
|
||||
echo '<tr><td>' . 'password_verify()' . '</td><td>' . __('admin_not_installed') . '</td></tr>';
|
||||
} else {
|
||||
echo '<tr><td>'.'password_verify()'.'</td><td>'.__('admin_installed').'</td></tr>';
|
||||
echo '<tr><td>' . 'password_verify()' . '</td><td>' . __('admin_installed') . '</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
@@ -5,23 +5,23 @@ use function Flextype\Component\I18n\__;
|
||||
|
||||
Themes::view('admin/views/partials/head')->display();
|
||||
Themes::view('admin/views/partials/navbar')
|
||||
->assign('links', [
|
||||
->assign('links', [
|
||||
'settings' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/settings',
|
||||
'title' => __('admin_settings'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
]
|
||||
])
|
||||
->assign('buttons', [
|
||||
'save' => [
|
||||
'link' => 'javascript:;',
|
||||
'title' => __('admin_save'),
|
||||
'attributes' => ['class' => 'js-save-form-submit float-right btn']
|
||||
],
|
||||
'settings_clear_cache' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/settings?clear_cache=1&token='.Token::generate(),
|
||||
'title' => __('admin_clear_cache'),
|
||||
'attributes' => ['class' => 'float-right btn']
|
||||
'save' => [
|
||||
'link' => 'javascript:;',
|
||||
'title' => __('admin_save'),
|
||||
'attributes' => ['class' => 'js-save-form-submit float-right btn']
|
||||
],
|
||||
'settings_clear_cache' => [
|
||||
'link' => Http::getBaseUrl() . '/admin/settings?clear_cache=1&token='.Token::generate(),
|
||||
'title' => __('admin_clear_cache'),
|
||||
'attributes' => ['class' => 'float-right btn']
|
||||
]
|
||||
])
|
||||
->display();
|
||||
@@ -115,7 +115,7 @@ Themes::view('admin/views/partials/content-start')->display();
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<?= Form::label('entries[media][accept_file_types]', __('admin_accept_file_types'), ['for' => 'systemSettingsSystemTheme']) ?>
|
||||
<?= Form::input('entries[media][accept_file_types]', $settings['entries']['media']['accept_file_types'] , ['class' => 'form-control', 'id' => 'systemSettingsSystemTheme', 'required']) ?>
|
||||
<?= Form::input('entries[media][accept_file_types]', $settings['entries']['media']['accept_file_types'], ['class' => 'form-control', 'id' => 'systemSettingsSystemTheme', 'required']) ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
@@ -11,8 +11,8 @@ Themes::view('admin/views/partials/navbar')
|
||||
'link' => Http::getBaseUrl() . '/admin/profile',
|
||||
'title' => __('admin_profile'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
],
|
||||
])
|
||||
],
|
||||
])
|
||||
->display();
|
||||
Themes::view('admin/views/partials/content-start')->display();
|
||||
?>
|
||||
|
@@ -18,8 +18,8 @@
|
||||
|
||||
<?php Assets::add('css', Http::getBaseUrl() . '/site/themes/' . Registry::get('settings.theme') . '/assets/dist/css/bootstrap.min.css', 'site', 1) ?>
|
||||
<?php Assets::add('css', Http::getBaseUrl() . '/site/themes/' . Registry::get('settings.theme') . '/assets/dist/css/default.min.css', 'site', 2) ?>
|
||||
<?php foreach(Assets::get('css', 'site') as $assets_by_priorities): ?>
|
||||
<?php foreach($assets_by_priorities as $assets): ?>
|
||||
<?php foreach (Assets::get('css', 'site') as $assets_by_priorities): ?>
|
||||
<?php foreach ($assets_by_priorities as $assets): ?>
|
||||
<link href="<?= $assets['asset'] ?>" rel="stylesheet">
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<?php namespace Flextype ?>
|
||||
<?php use Flextype\Component\{Event\Event, Http\Http, Registry\Registry, Assets\Assets} ?>
|
||||
<?php Assets::add('js', Http::getBaseUrl() . '/site/themes/' . Registry::get('settings.theme') . '/assets/dist/js/default.min.js', 'site', 1) ?>
|
||||
<?php foreach(Assets::get('js', 'site') as $assets_by_priorities): ?>
|
||||
<?php foreach($assets_by_priorities as $assets): ?>
|
||||
<?php foreach (Assets::get('js', 'site') as $assets_by_priorities): ?>
|
||||
<?php foreach ($assets_by_priorities as $assets): ?>
|
||||
<script src="<?= $assets['asset'] ?>"></script>
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
|
@@ -2,5 +2,5 @@
|
||||
<?php Themes::view('partials/head')->display() ?>
|
||||
<h1><?= $entry['title'] ?></h1>
|
||||
<?= $entry['content'] ?>
|
||||
<img src="<?= Images::getImageUrl($entry['slug'] .'/'. $entry['image'], ['w' => '670', 'dpr' => '2']) ?>">
|
||||
<img src="<?= Images::getImageUrl($entry['slug'] . '/' . $entry['image'], ['w' => '670', 'dpr' => '2']) ?>">
|
||||
<?php Themes::view('partials/footer')->display() ?>
|
||||
|
Reference in New Issue
Block a user