XOOPS Cube Legacy 2.2.0 Beta 1 アップデート方法&レビュー

アップデート方法はこちらに載ってますが、一応実践してみてのメモとして。
http://sourceforge.net/apps/mediawiki/xoopscube/index.php?title=Upgrade22


以下説明で「html/」の記載は公開サーバーの閲覧可能領域のことです。サーバーによって「www」とか「home」かもしれません。「xoops_trust_path/」はXOOPS_TRUST_PATHフォルダです。人によっては変更しているかもしれませんので適宜解釈してください。


1) Close your site
Admin Page > Legacy System > General Settings > Turn your site off?

まずはサイトを閉鎖します。
[互換モジュール]>[全般設定]>「サイトを閉鎖する」を「はい」
にして「送信」


2) backup your site
■backup current all files.
公開サーバー上のファイルをすべてバックアップを取る。

■backup current database.
公開サーバー上のデータベースをすべてバックアップを取る。


3) Prepare files
ダウンロードしたXCL2.2.0フォルダ内のファイルの準備をします。

■Remove the following directory & files from the ARCHIVE.
下記のディレクトリとファイルをXCL2.2.0のフォルダから削除します。
※公開サーバー側ではない。公開サーバー側のmainfile.phpは絶対消しちゃだめ。


■If your language is not included, move them from extras/extra_languages.
XCL2.2.0フォルダのextras/extra_languagesから言語ファイルをコピーする。
日本語データが/extras/extra_languages/japaneseに入っています。

  • language
  • modules

をそれぞれXCL2.2.0フォルダのhtml側にコピーします。
installフォルダは不要。


■Upload all files to your server. See the next step 4) XOOPS_TRUST_PATH
XCL2.2.0フォルダのhtml、xoops_trust_pathそれぞれすべて公開サーバーにアップします。


■Change the directory's permission of xoops_trust_path/cache as '777'.
xoops_trust_path/cache
の権限を「777」に設定します。



以下、はホダ塾ディストリビューションのユーザーは設定をしてください。
ただし、通常のXCL2.1.xを使っていてもやったほうがいいかも。
私の場合、ここの設定を無視していたら、D3系のモジュールで日付などがうまく表示されなくなりました。

For Hodajuku Distribution User

$this->_loadLanguage('legacy', 'setting');

Add this line at function loadGlobalMessageCatalog() in html/preload/SetupAltsysLangMgr.class.php

html/preload/SetupAltsysLangMgr.class.php
の下記の場所に追記します。

function loadGlobalMessageCatalog()
{
     /* if (!$this->_loadFile(XOOPS_ROOT_PATH . "/modules/legacy/language/" . $this->mLanguageName . "/global.php")) {
     $this->_loadFile(XOOPS_ROOT_PATH . "/modules/legacy/language/english/global.php");
     } */
     $this->_loadLanguage( 'legacy' , 'global' ) ;
     $this->_loadLanguage( 'legacy' , 'setting' ) ;←ココ!!

     //
     // Now, if XOOPS_USE_MULTIBYTES isn't defined, set zero to it.
     //
     if (!defined("XOOPS_USE_MULTIBYTES")) {
         define("XOOPS_USE_MULTIBYTES", 0);
     }
}


4) XOOPS_TRUST_PATH
XOOPS_TRUST_PATHの設定をします。すでに導入済みの場合は1,4の工程はスルーです。XCL2.2からはXOOPS_TRUST_PATHはデフォルト仕様になったみたいです。


■From XCL2.2, xoops_trust_path folder is added to top level. You should put this folder out of html/ because of security reason.
xoops_trust_pathフォルダを公開フォルダと同じ階層に設置します。


■Move the file if exists from html/settings/site_custom.ini.php to /xoops_trust_path/settings/site_custom.ini
html/settings/site_custom.ini.php
のファイルを
/xoops_trust_path/settings/site_custom.ini
に移動します。「.php」をファイル名から削除を忘れずに。


■Move additional smarty pluigins from html/class/smarty/plugins to xoops_trust_path/libs/smarty/plugins
html/class/smarty/plugins
以下のファイルにある後から追加したsmartyプラグインファイル
xoops_trust_path/libs/smarty/plugins
に移動します。


でも後から追加したsmartyプラグインファイルなんていちいち覚えてません。


html/class/smarty/plugins以下のファイルをすべてxoops_trust_path/libs/smarty/plugins側にコピーして重複するファイルはコピーしないようにすれば差分だけアップされます。



■Add XOOPS_TRUST_PATH settings in mainfile.php if not exists.
mainfile.phpXOOPS_TRUST_PATHの設定をしていなければ追加します。

define('XOOPS_TRUST_PATH', 'YOUR_PATH/xoops_trust_path');


5) Remove folders
Remove the following directories/files.
下記のディレクトリ、ファイルどもを削除します。
■html/cache
「cache」フォルダごと削除。
■html/class/smarty/*.*
smarty」フォルダ以下のファイルを削除。
■html/class/smarty/core
「core」フォルダごと削除。
■html/class/smarty/plugins/*.*
「plugins」フォルダ以下のファイルを削除。
■html/settings
「settings」フォルダごと削除。


Be careful to leave html/class/smarty/plugins directory.
html/class/smarty/pluginsディレクトリは残してください。
フォルダ内のファイルのみ削除。
ファイルはぜんぶ削除しないと後で恐ろしいことに・・・


6) Upgrade
アップグレード作業をします。


■Upload upgrade22.class.php from extras/extra_preload to html/preload
ダウンロードしたXCL2.2.0フォルダのextras/extra_preloadに「upgrade22.class.php」ファイルがあるので公開サーバーのhtml/preloadにアップします。


Access your site then you have to install profile module.
公開サーバーの管理画面にアクセス(またはリロード)すると強制的にモジュールインストール画面になりますので、プロフィールモジュールと必要あれば「ファイルマネージャー」モジュールをインストールします。
「ファイルマネージャー」モジュールはXOOPSの「uploads」フォルダに管理画面から画像をアップできる便利モジュールです。


■Remove html/preload/upgrade22.class.php
さっき公開サーバーにアップした「upgrade22.class.php」はもう役目を果たしたので削除します。


■In the module management of Legacy's control panels(Admin Page > Legacy System > Module Management ), update all modules which show red-color update icons.
「互換モジュール」>「モジュールの管理」えアップデートが必要なモジュールは更新アイコンが出ているので全部更新してください。



7) Open your site

■Admin Page > Legacy System > General Settings > Turn your site off?.
最後にサイトを閉鎖していたので公開設定をして終了です。


お疲れ様でした。