From 82d40e32363c4e96996eca7ee44ade879589aa0e Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Sun, 26 Apr 2020 16:33:36 +0200 Subject: Expand tabs and remove trailing whitespace --- setup.php | 292 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 146 insertions(+), 146 deletions(-) (limited to 'setup.php') diff --git a/setup.php b/setup.php index 4c3e39d..5fbc2e7 100644 --- a/setup.php +++ b/setup.php @@ -3,99 +3,99 @@ /* Check some files/directories before continue.... */ $dirs = array( - "/ratatoeskr" => False, - "/ratatoeskr/templates" => False, - "/ratatoeskr/templates/transc" => True, - "/ratatoeskr/templates/src" => False, - "/ratatoeskr/templates/src/usertemplates" => True, - "/ratatoeskr/templates/src/plugintemplates" => True, - "/ratatoeskr/templates/src/systemtemplates" => False, - "/ratatoeskr/translations" => False, - "/ratatoeskr/licenses" => False, - "/ratatoeskr/libs" => False, - "/ratatoeskr/sys" => False, - "/ratatoeskr/setup" => False, - "/ratatoeskr/cms_style" => False, - "/ratatoeskr/cms_style/images" => False, - "/ratatoeskr/plugin_extradata" => True, - "/ratatoeskr/plugin_extradata/public" => True, - "/ratatoeskr/plugin_extradata/private" => True, - "/images" => True, - "/images/previews" => True + "/ratatoeskr" => False, + "/ratatoeskr/templates" => False, + "/ratatoeskr/templates/transc" => True, + "/ratatoeskr/templates/src" => False, + "/ratatoeskr/templates/src/usertemplates" => True, + "/ratatoeskr/templates/src/plugintemplates" => True, + "/ratatoeskr/templates/src/systemtemplates" => False, + "/ratatoeskr/translations" => False, + "/ratatoeskr/licenses" => False, + "/ratatoeskr/libs" => False, + "/ratatoeskr/sys" => False, + "/ratatoeskr/setup" => False, + "/ratatoeskr/cms_style" => False, + "/ratatoeskr/cms_style/images" => False, + "/ratatoeskr/plugin_extradata" => True, + "/ratatoeskr/plugin_extradata/public" => True, + "/ratatoeskr/plugin_extradata/private" => True, + "/images" => True, + "/images/previews" => True ); $files = array( - "/.htaccess", - "/ratatoeskr/templates/src/systemtemplates/users.html", - "/ratatoeskr/templates/src/systemtemplates/pluginlist.html", - "/ratatoeskr/templates/src/systemtemplates/backend_login.html", - "/ratatoeskr/templates/src/systemtemplates/confirminstall.html", - "/ratatoeskr/templates/src/systemtemplates/pluginhelp.html", - "/ratatoeskr/templates/src/systemtemplates/tag_addtranslation.html", - "/ratatoeskr/templates/src/systemtemplates/settings.html", - "/ratatoeskr/templates/src/systemtemplates/tag_deleted.html", - "/ratatoeskr/templates/src/systemtemplates/articles.html", - "/ratatoeskr/templates/src/systemtemplates/image_list.html", - "/ratatoeskr/templates/src/systemtemplates/repos.html", - "/ratatoeskr/templates/src/systemtemplates/templates.html", - "/ratatoeskr/templates/src/systemtemplates/error.html", - "/ratatoeskr/templates/src/systemtemplates/instant_select.tpl", - "/ratatoeskr/templates/src/systemtemplates/plugininstall.html", - "/ratatoeskr/templates/src/systemtemplates/comments_list.html", - "/ratatoeskr/templates/src/systemtemplates/tags_overview.html", - "/ratatoeskr/templates/src/systemtemplates/sections.html", - "/ratatoeskr/templates/src/systemtemplates/image_embed.html", - "/ratatoeskr/templates/src/systemtemplates/master.html", - "/ratatoeskr/templates/src/systemtemplates/content_write.html", - "/ratatoeskr/templates/src/systemtemplates/user.html", - "/ratatoeskr/templates/src/systemtemplates/single_comment.html", - "/ratatoeskr/templates/src/systemtemplates/setup_dbsetup.html", - "/ratatoeskr/templates/src/systemtemplates/setup_done.html", - "/ratatoeskr/templates/src/systemtemplates/setup_master.html", - "/ratatoeskr/templates/src/systemtemplates/setup_select_lang.html", - "/ratatoeskr/templates/src/usertemplates/master.html", - "/ratatoeskr/templates/src/usertemplates/standard.html", - "/ratatoeskr/templates/src/usertemplates/some_useful_tags", - "/ratatoeskr/templates/.htaccess", - "/ratatoeskr/translations/de.php", - "/ratatoeskr/translations/en.php", - "/ratatoeskr/backend.php", - "/ratatoeskr/libs/markdown.php", - "/ratatoeskr/libs/ste.php", - "/ratatoeskr/libs/kses.php", - "/ratatoeskr/.htaccess", - "/ratatoeskr/setup/create_tables.php", - "/ratatoeskr/setup/setup.php", - "/ratatoeskr/sys/plugin_api.php", - "/ratatoeskr/sys/translation.php", - "/ratatoeskr/sys/urlprocess.php", - "/ratatoeskr/sys/pluginpackage.php", - "/ratatoeskr/sys/db.php", - "/ratatoeskr/sys/utils.php", - "/ratatoeskr/sys/pwhash.php", - "/ratatoeskr/sys/init_ste.php", - "/ratatoeskr/sys/models.php", - "/ratatoeskr/sys/textprocessors.php", - "/ratatoeskr/languages.php", - "/ratatoeskr/frontend.php", - "/ratatoeskr/cms_style/layout.css", - "/ratatoeskr/cms_style/login.css", - "/ratatoeskr/cms_style/images/add.png", - "/ratatoeskr/cms_style/images/delete.png", - "/ratatoeskr/cms_style/images/sortarrow_up_outline.png", - "/ratatoeskr/cms_style/images/black_transparent.png", - "/ratatoeskr/cms_style/images/sortarrow_down_outline.png", - "/ratatoeskr/cms_style/images/success.png", - "/ratatoeskr/cms_style/images/dead_emoticon.png", - "/ratatoeskr/cms_style/images/sortarrow_up_filled.png", - "/ratatoeskr/cms_style/images/sortarrow_down_filled.png", - "/ratatoeskr/cms_style/images/notice.png", - "/ratatoeskr/cms_style/images/login_bg.jpg", - "/ratatoeskr/cms_style/images/error.png", - "/ratatoeskr/main.php", - "/ratatoeskr/plugin_extradata/private/.htaccess", - "/index.php", - "/setup.php", - "/css.php" + "/.htaccess", + "/ratatoeskr/templates/src/systemtemplates/users.html", + "/ratatoeskr/templates/src/systemtemplates/pluginlist.html", + "/ratatoeskr/templates/src/systemtemplates/backend_login.html", + "/ratatoeskr/templates/src/systemtemplates/confirminstall.html", + "/ratatoeskr/templates/src/systemtemplates/pluginhelp.html", + "/ratatoeskr/templates/src/systemtemplates/tag_addtranslation.html", + "/ratatoeskr/templates/src/systemtemplates/settings.html", + "/ratatoeskr/templates/src/systemtemplates/tag_deleted.html", + "/ratatoeskr/templates/src/systemtemplates/articles.html", + "/ratatoeskr/templates/src/systemtemplates/image_list.html", + "/ratatoeskr/templates/src/systemtemplates/repos.html", + "/ratatoeskr/templates/src/systemtemplates/templates.html", + "/ratatoeskr/templates/src/systemtemplates/error.html", + "/ratatoeskr/templates/src/systemtemplates/instant_select.tpl", + "/ratatoeskr/templates/src/systemtemplates/plugininstall.html", + "/ratatoeskr/templates/src/systemtemplates/comments_list.html", + "/ratatoeskr/templates/src/systemtemplates/tags_overview.html", + "/ratatoeskr/templates/src/systemtemplates/sections.html", + "/ratatoeskr/templates/src/systemtemplates/image_embed.html", + "/ratatoeskr/templates/src/systemtemplates/master.html", + "/ratatoeskr/templates/src/systemtemplates/content_write.html", + "/ratatoeskr/templates/src/systemtemplates/user.html", + "/ratatoeskr/templates/src/systemtemplates/single_comment.html", + "/ratatoeskr/templates/src/systemtemplates/setup_dbsetup.html", + "/ratatoeskr/templates/src/systemtemplates/setup_done.html", + "/ratatoeskr/templates/src/systemtemplates/setup_master.html", + "/ratatoeskr/templates/src/systemtemplates/setup_select_lang.html", + "/ratatoeskr/templates/src/usertemplates/master.html", + "/ratatoeskr/templates/src/usertemplates/standard.html", + "/ratatoeskr/templates/src/usertemplates/some_useful_tags", + "/ratatoeskr/templates/.htaccess", + "/ratatoeskr/translations/de.php", + "/ratatoeskr/translations/en.php", + "/ratatoeskr/backend.php", + "/ratatoeskr/libs/markdown.php", + "/ratatoeskr/libs/ste.php", + "/ratatoeskr/libs/kses.php", + "/ratatoeskr/.htaccess", + "/ratatoeskr/setup/create_tables.php", + "/ratatoeskr/setup/setup.php", + "/ratatoeskr/sys/plugin_api.php", + "/ratatoeskr/sys/translation.php", + "/ratatoeskr/sys/urlprocess.php", + "/ratatoeskr/sys/pluginpackage.php", + "/ratatoeskr/sys/db.php", + "/ratatoeskr/sys/utils.php", + "/ratatoeskr/sys/pwhash.php", + "/ratatoeskr/sys/init_ste.php", + "/ratatoeskr/sys/models.php", + "/ratatoeskr/sys/textprocessors.php", + "/ratatoeskr/languages.php", + "/ratatoeskr/frontend.php", + "/ratatoeskr/cms_style/layout.css", + "/ratatoeskr/cms_style/login.css", + "/ratatoeskr/cms_style/images/add.png", + "/ratatoeskr/cms_style/images/delete.png", + "/ratatoeskr/cms_style/images/sortarrow_up_outline.png", + "/ratatoeskr/cms_style/images/black_transparent.png", + "/ratatoeskr/cms_style/images/sortarrow_down_outline.png", + "/ratatoeskr/cms_style/images/success.png", + "/ratatoeskr/cms_style/images/dead_emoticon.png", + "/ratatoeskr/cms_style/images/sortarrow_up_filled.png", + "/ratatoeskr/cms_style/images/sortarrow_down_filled.png", + "/ratatoeskr/cms_style/images/notice.png", + "/ratatoeskr/cms_style/images/login_bg.jpg", + "/ratatoeskr/cms_style/images/error.png", + "/ratatoeskr/main.php", + "/ratatoeskr/plugin_extradata/private/.htaccess", + "/index.php", + "/setup.php", + "/css.php" ); $missing_files = array(); @@ -104,16 +104,16 @@ $missing_perms = array(); foreach($dirs as $dir => $needs_w_perms) { - if(!is_dir(dirname(__FILE__) . $dir)) - $missing_dirs[] = $dir; - elseif($needs_w_perms and (!@is_writable(dirname(__FILE__) . $dir))) - $missing_perms[] = $dir; + if(!is_dir(dirname(__FILE__) . $dir)) + $missing_dirs[] = $dir; + elseif($needs_w_perms and (!@is_writable(dirname(__FILE__) . $dir))) + $missing_perms[] = $dir; } foreach($files as $file) { - if(!is_file(dirname(__FILE__) . $file)) - $missing_files[] = $file; + if(!is_file(dirname(__FILE__) . $file)) + $missing_files[] = $file; } /* Also check for the correct PHP version, some PHP extensions and if we are running on apache. */ @@ -121,77 +121,77 @@ $missing_requirements = array(); if(!defined('PHP_VERSION_ID')) { - $version = explode('.', PHP_VERSION); - define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2])); + $version = explode('.', PHP_VERSION); + define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2])); } if(PHP_VERSION_ID < 50300) - $missing_requirements[] = "You need PHP version 5.3.0 or later."; + $missing_requirements[] = "You need PHP version 5.3.0 or later."; $available_extensions = get_loaded_extensions(); if(strpos($_SERVER["SERVER_SOFTWARE"], "Apache") === False) - $missing_requirements[] = "You need an Apache WWW server for Ratatöskr."; + $missing_requirements[] = "You need an Apache WWW server for Ratatöskr."; if(!in_array("gd", $available_extensions)) - $missing_requirements[] = "You need the gd PHP extension."; + $missing_requirements[] = "You need the gd PHP extension."; if(!in_array("session", $available_extensions)) - $missing_requirements[] = "You need the session PHP extension."; + $missing_requirements[] = "You need the session PHP extension."; if(!in_array("PDO", $available_extensions)) - $missing_requirements[] = "You need the PDO PHP extension."; + $missing_requirements[] = "You need the PDO PHP extension."; if(!in_array("pdo_mysql", $available_extensions)) - $missing_requirements[] = "You need the pdo_mysql PHP extension."; + $missing_requirements[] = "You need the pdo_mysql PHP extension."; if(!in_array("hash", $available_extensions)) - $missing_requirements[] = "You need the hash PHP extension."; + $missing_requirements[] = "You need the hash PHP extension."; elseif(!in_array("sha1", hash_algos())) - $missing_requirements[] = "The SHA1 hash algorythm must be available."; + $missing_requirements[] = "The SHA1 hash algorythm must be available."; if((!empty($missing_dirs)) or (!empty($missing_files)) or (!empty($missing_perms)) or (!empty($missing_requirements))): ?> - Ratatöskr installer + Ratatöskr installer -

Ratatöskr can not be installed, because...

- - -

...these requirements are not met:

- - - - -

...these directories are missing:

- - - - -

...these files are missing:

- - - - -

...we do not have writing permissions to these directories:

- - - +

Ratatöskr can not be installed, because...

+ + +

...these requirements are not met:

+ + + + +

...these directories are missing:

+ + + + +

...these files are missing:

+ + + + +

...we do not have writing permissions to these directories:

+ + +