Descargar
Desarrollar
Cuenta
Descargar
Desarrollar
Entrar
Forgot Account/Password
Crear Cuenta
Idioma
Ayuda
Idioma
Ayuda
×
Entrar
Nombre de usuario
Contraseña
×
Forgot Account/Password
Translation Status of Español
Categoría:
Software
Gente
PersonalForge
Magazine
Wiki
Buscar
OSDN
>
Buscar Software
>
Internet
>
WWW/HTTP
>
Dynamic Content
>
XOOPS
>
Ticket List/Search
>
Incidencia #9544
XOOPS
Descripción
Project Summary
Developer Dashboard
Página Web
Developers
Image Gallery
List of RSS Feeds
Activity
Statistics
Historial
Descargas
List of Releases
Stats
Código Fuente
Code Repository list
CVS
Ver Repositorio
Incidencia
Ticket List
Milestone List
Type List
Component List
List of frequently used tickets/RSS
Submit New Ticket
Documents
Communication
Foros
List of Forums
Ayuda (1)
Open Discussion (1)
Mailing Lists
list of ML
xoops-cvslog
Noticias
Incidencia #9544
Ticket List
Submit New Ticket
RSS
Bug that module template deleted all
Abrir Fecha:
2006-12-08 20:33
Última actualización:
2006-12-14 07:56
monitor
ON
OFF
Informador:
mumincacao
Propietario:
(del#8225)
Tipo:
XOOPSCube2.1 Bugs
Estado:
Cerrado
Componente:
(Ninguno)
Hito:
(Ninguno)
Prioridad:
7
Gravedad:
5 - Medium
Resolución:
Fixed
Fichero:
Ninguno
Details
Responder
moduleのinstall失敗時に掃除する機能が一定条件下で
module用templateを全部消しちゃうみたいです。
条件は
midが決まる前にinstallが失敗すること
で,具体的には
Table 'xxxxxx' already exists
なかんじでinstallが失敗すると削除するtemplateを探すため
に
$tplHandler->find(null, 'module', null);
が実行されて,結果的に
SELECT * FROM xxx_tplfile WHERE (tpl_type = 'module')
ORDER BY tpl_refid
ってSQLで削除対象を抽出するために
tpl_type が module のtemplateはすべて削除されちゃいま
す。
対策としては
/modules/legacy/admin/class/ModuleInstallUtils.class.ph
p
にあるtemplateを削除するめそっど
Legacy_ModuleInstallUtils::uninstallAllOfModuleTemplate
s()
の先頭に
if($module->get('mid') == null)
{
return;
}
みたいにmidがまだ決まっていないときは削除処理をすきっぷ
するといいみたいです。
※他の削除処理はmidが空でも影響がないっぽいけどすきっぷ
したほうがいいかも?
Ticket History (3/4 Histories)
Show older Histories
2006-12-08 21:05
Updated by:
mumincacao
Comentario
Responder
Logged In: YES
user_id=24376
たぶんきっとこっちのほうがきれいな処理っぽいので修正を・・・
/modules/legacy/admin/actions/ModuleInstallAction.class.php
L150-
Legacy_ModuleInstallAction::execute()
で executeInstall に失敗したときの処理を
if (!$this->mInstaller->executeInstall())
{
if(!$this->mXoopsModule->get('mid') == null)
{
$this->mInstaller->mLog->addReport('Force
Uninstallation is started.');
$dirname = $this->mXoopsModule->get('dirname');
$uninstaller =&
Legacy_ModuleInstallUtils::createUninstaller($dirname);
$uninstaller->setForceMode(true);
$uninstaller->setCurrentXoopsModule($this-
>mXoopsModule);
$uninstaller->executeUninstall();
}
}
こんなかんじでまだmidが決定してなければ削除処理をしないなん
てどうですか?
2006-12-08 22:50
Updated by:
(del#8225)
Propietario
Update from
(Ninguno)
to
nobunobu
Prioridad
Update from
5 - Medium
to
7
Resolución
Update from
Ninguno
to
Accepted
Comentario
Responder
Logged In: YES
user_id=8225
>こんなかんじでまだmidが決定してなければ削除処理をしないなん
てどうですか?
報告ありがとうございます。
インストールで複数テーブル作成途中でこけた場合のことを考える
と、midが決定していなくても作成したテーブルは削除した方が良
いかもしれないので、元々のバグ報告内の
Legacy_ModuleInstallUtils中でmidチェックする方が、方法として
は確実かもしれないですね。
2006-12-08 23:45
Updated by:
(del#8225)
Resolución
Update from
Accepted
to
Fixed
Comentario
Responder
Logged In: YES
user_id=8225
I added a $this->_mXoopsModule->get('mid') Null check in
Legacy_ModuleUninstaller::executeUninstall().
And commit this file into CVS.
2006-12-14 07:56
Updated by:
(del#8225)
Ticket Close date
is changed to
2006-12-14 07:56
Estado
Update from
Open
to
Cerrado
Attachment File List (
0
)
Attachment File List
No attachments
Editar
Add Comment
You are not logged in.
I you are not logged in, your comment will be treated as an anonymous post. »
Entrar
Add Comment
Vista previa
Submit
module用templateを全部消しちゃうみたいです。
条件は
midが決まる前にinstallが失敗すること
で,具体的には
Table 'xxxxxx' already exists
なかんじでinstallが失敗すると削除するtemplateを探すため
に
$tplHandler->find(null, 'module', null);
が実行されて,結果的に
SELECT * FROM xxx_tplfile WHERE (tpl_type = 'module')
ORDER BY tpl_refid
ってSQLで削除対象を抽出するために
tpl_type が module のtemplateはすべて削除されちゃいま
す。
対策としては
/modules/legacy/admin/class/ModuleInstallUtils.class.ph
p
にあるtemplateを削除するめそっど
Legacy_ModuleInstallUtils::uninstallAllOfModuleTemplate
s()
の先頭に
if($module->get('mid') == null)
{
return;
}
みたいにmidがまだ決まっていないときは削除処理をすきっぷ
するといいみたいです。
※他の削除処理はmidが空でも影響がないっぽいけどすきっぷ
したほうがいいかも?