diff --git a/public_html/admin/install/classes/installer.class.php b/public_html/admin/install/classes/installer.class.php index 2f5cc6766..8a56d8010 100644 --- a/public_html/admin/install/classes/installer.class.php +++ b/public_html/admin/install/classes/installer.class.php @@ -295,12 +295,15 @@ private function checkUploadedFileSize() /** * Check if any message for upgrades, exit the installer + * + * @param string $version + * @return string */ private function checkUpgradeMessage($version) { $retval = ''; - if (($this->doDatabaseUpgrades($version, true)) && (!empty($this->upgradeMessages))) { + if ($this->doDatabaseUpgrades($version, true) && !empty($this->upgradeMessages)) { $prompt = 'information'; $retval = '

' . $this->LANG['ERROR'][14] . '

' . PHP_EOL; // Upgrade Notice @@ -310,8 +313,8 @@ private function checkUpgradeMessage($version) $retval .= $this->getAlertMessage($this->LANG['ERROR'][$message_id], $type); // record what type of prompt we need - if ($type == 'information' || $type == 'warning' || $type == 'error') { - if ($prompt != 'error') { + if ($type === 'information' || $type === 'warning' || $type === 'error') { + if ($prompt !== 'error') { if ($prompt == 'information') { $prompt = $type; } @@ -321,7 +324,7 @@ private function checkUpgradeMessage($version) } // Add prompt - if ($prompt == 'error') { + if ($prompt === 'error') { $retval .= MicroTemplate::quick(PATH_LAYOUT, 'upgrade_prompt_error', $this->env); } else { $retval .= MicroTemplate::quick(PATH_LAYOUT, 'upgrade_prompt_warning', $this->env); } @@ -4223,7 +4226,7 @@ private function migrateStep4() */ private function installEngine($installType, $installStep) { - global $_CONF, $_TABLES, $_DB, $_DB_dbms, $_DB_host, $_DB_name, $_DB_user, $_DB_pass, $_DB_table_prefix; + global $_CONF, $_TABLES, $_DB, $_DB_dbms, $_DB_host, $_DB_name, $_DB_user, $_DB_pass, $_DB_table_prefix, $_DEVICE, $_URL; $retval = ''; @@ -4235,7 +4238,7 @@ private function installEngine($installType, $installStep) break; } - require_once $this->env['dbconfig_path']; // Get the current DB info + include $this->env['dbconfig_path']; // Get the current DB info if ($installType === 'upgrade') { $v = $this->checkPost150Upgrade($this->env['dbconfig_path'], $this->env['siteconfig_path']); @@ -4456,7 +4459,7 @@ private function installEngine($installType, $installStep) } } - require_once $this->env['dbconfig_path']; + require $this->env['dbconfig_path']; require_once $this->env['siteconfig_path']; require_once $_CONF['path_system'] . 'lib-database.php'; @@ -4464,7 +4467,7 @@ private function installEngine($installType, $installStep) 'mode' => $installType, 'step' => 3, 'dbconfig_path' => $this->env['dbconfig_path'], - 'install_plugins' => $installPlugins, + 'install_plugins' => ($installPlugins ? 'true' : 'false'), 'language' => $this->env['language'], 'site_name' => $site_name, 'site_slogan' => $site_slogan, @@ -4472,6 +4475,7 @@ private function installEngine($installType, $installStep) 'site_admin_url' => $site_admin_url, 'site_mail' => $site_mail, 'noreply_mail' => $noreply_mail, + 'upgrade_check' => $this->post('upgrade_check', 'continue'), ); if ($utf8) { @@ -4501,7 +4505,6 @@ private function installEngine($installType, $installStep) break; case 'upgrade': - // Try and find out what the current version of GL is $currentVersion = $this->identifyGeeklogVersion(); @@ -4521,7 +4524,6 @@ private function installEngine($installType, $installStep) // If we were unable to determine the current GL // version is then ask the user what it is - $this->env['old_versions'] = array(); $old_versions = array( '1.2.5-1', '1.3', '1.3.1', '1.3.2', '1.3.2-1', '1.3.3', '1.3.4', @@ -4558,7 +4560,7 @@ private function installEngine($installType, $installStep) } $gl_path = str_replace(self::DB_CONFIG_FILE, '', $this->env['dbconfig_path']); - $installPlugins = ($this->request('install_plugins') !== null); + $installPlugins = ($this->request('install_plugins') === 'true'); $nextLink = $installPlugins ? 'install-plugins.php?language=' . $this->env['language'] : 'success.php?type=' . $installType . '&language=' . $this->env['language']; @@ -4647,7 +4649,6 @@ private function installEngine($installType, $installStep) $config->set('path_themes', $this->env['html_path'] . 'layout/'); $config->set('path_editors', $this->env['html_path'] . 'editors/'); $config->set('rdf_file', $this->env['html_path'] . 'backend/geeklog.rss'); - $config->set('path_pear', $_CONF['path_system'] . 'pear/'); $config->set('cookie_path', $this->guessCookiePath(urldecode($site_url))); $config->set_default('default_photo', urldecode($site_url) . '/default.jpg'); @@ -4669,9 +4670,7 @@ private function installEngine($installType, $installStep) * things and rely on a few global declarations * (see beginning of function). */ - - // Hack: not needed here - avoid notice - require_once dirname(__FILE__) . '/../../../lib-common.php'; + require str_replace('siteconfig.php', 'lib-common.php', $this->env['siteconfig_path']); $this->defaultPluginInstall(); } @@ -4778,7 +4777,7 @@ private function installEngine($installType, $installStep) } $this->upgradePlugins(); - $installPlugins = ($this->get('install_plugins', null) !== null); + $installPlugins = ($this->get('install_plugins') === 'true'); if (!$installPlugins) { // if we don't do the manual selection, install all new plugins now diff --git a/public_html/admin/install/language/japanese_utf-8.php b/public_html/admin/install/language/japanese_utf-8.php index 699d8eadd..25db60aca 100644 --- a/public_html/admin/install/language/japanese_utf-8.php +++ b/public_html/admin/install/language/japanese_utf-8.php @@ -254,25 +254,25 @@ // install-plugins.php $LANG_PLUGINS = array( - 1 => 'プラグインインストール', + 1 => 'プラグインのインストール', 2 => 'ステップ', - 3 => '検索オプションのプラグインやアドオンコンポーネントは、新しい機能を活用した記事の内部サービスを提供しています。デフォルトでは、検索オプションでは、インストールしたい場合は、いくつか便利なプラグインが含まれています。', + 3 => 'プラグインは新しい機能を提供する追加コンポーネントで、Geeklogの内部サービスを更に強化します。Geeklogはデフォルトでインストールしたくなる便利なプラグインを同梱しています。', 4 => 'また、追加のプラグインをアップロードすることができます。', 5 => 'アップロードしたファイルは ZIP または GZip 圧縮形式のプラグインファイルではありません。', 6 => 'アップロードしたプラグインはすでに存在しています!', 7 => '成功!', 8 => '%s プラグインのアップロードに成功しました。', - 9 => 'プラグインアップロード', - 10 => 'プラグインファイル選択', + 9 => 'プラグインをアップロードする', + 10 => 'プラグインファイルの指定', 11 => 'アップロード', - 12 => 'インストールプラグイン選択', - 13 => 'インストール?', - 14 => 'プラグイン', + 12 => 'インストールするプラグインを選択してください', + 13 => 'インストールする', + 14 => 'プラグイン名', 15 => 'バージョン', 16 => '不明', 17 => '注意', 18 => 'このプラグインは、プラグイン管理パネルから手動で有効化する必要があります。', - 19 => 'リフレッシュ', + 19 => '一覧を更新', 20 => '新しいプラグインはありません。' ); diff --git a/public_html/lib-common.php b/public_html/lib-common.php index e51bf2882..28b532ba3 100755 --- a/public_html/lib-common.php +++ b/public_html/lib-common.php @@ -33,8 +33,6 @@ // | | // +---------------------------------------------------------------------------+ -global $_CONF, $_TABLES; - // Prevent PHP from reporting uninitialized variables error_reporting(E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR); @@ -160,8 +158,6 @@ * * @global $_PLUGINS array of the names of active plugins */ -global $_PLUGINS; - require_once $_CONF['path_system'] . 'lib-plugins.php'; /**