@@ -56,37 +56,4 @@ public function update_data()
5656 array ('config.update ' , array ('topic_preview_version ' , '2.1.0 ' )),
5757 );
5858 }
59-
60- /**
61- * Explicit revert handler for phpBB 4.0+ compatibility
62- *
63- * This fixes uninstall failures in phpBB 4.0.0+ caused by a behavior change in
64- * module removal (commit 07b63fc6a8, ticket PHPBB-17507):
65- *
66- * - phpBB 3.x: Silently succeeded when removing non-existent modules
67- * - phpBB 4.0: Throws MODULE_NOT_EXIST exception when removing non-existent modules
68- *
69- * The problem: This migration uses 'if' conditions to conditionally remove modules
70- * during install. During automatic reversal (uninstall), the migration helper skips
71- * all 'if' statements, causing it to attempt removal of modules that may not exist,
72- * triggering the exception in phpBB 4.0+.
73- *
74- * The solution: Provide explicit revert_data() that removes the parent category
75- * TOPIC_PREVIEW instead of individual child modules. This works because:
76- * - The parent category always exists (added by release_2_0_0.php)
77- * - Child modules are already removed by prior migration reversals
78- * - Removing an empty parent category never throws exceptions
79- *
80- * @return array
81- */
82- public function revert_data ()
83- {
84- return array (
85- array ('config.remove ' , array ('topic_preview_delay ' )),
86- array ('config.remove ' , array ('topic_preview_drift ' )),
87- array ('config.remove ' , array ('topic_preview_width ' )),
88-
89- array ('module.remove ' , array ('acp ' , 'TOPIC_PREVIEW ' )),
90- );
91- }
9259}
0 commit comments