Commit baaebd15 by Scott

Fix FinalStep hierarchy

parent ea6890ba
......@@ -4,7 +4,7 @@
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/AbstractFinalStep.php
Description: Base class for final step classes in the recal processes.
Description: Base class for final step classes in the recalc processes.
This program is free software; you can redistribute it and/or
......@@ -26,8 +26,12 @@ if (!defined('QA_VERSION')) { // don't allow this page to be requested directly
exit;
}
abstract class Q2A_Recalc_AbstractFinalStep extends Q2A_Recalc_AbstractStep
{
protected $isFinalStep = true;
public function doStep()
{
throw new Exception('Do not process the completion step.');
}
}
......@@ -26,7 +26,7 @@ if (!defined('QA_VERSION')) { // don't allow this page to be requested directly
exit;
}
class Q2A_Recalc_BlobsToDiskComplete extends Q2A_Recalc_ReindexPostsComplete
class Q2A_Recalc_BlobsMoveComplete extends Q2A_Recalc_AbstractFinalStep
{
public function getMessage()
{
......
<?php
/*
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/BlobsToDBComplete.php
Description: Recalc class for the end of the blobs to database process.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
More about this license: http://www.question2answer.org/license.php
*/
if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser
header('Location: ../../');
exit;
}
class Q2A_Recalc_BlobsToDBComplete extends Q2A_Recalc_BlobsToDiskComplete
{
}
......@@ -26,7 +26,7 @@ if (!defined('QA_VERSION')) { // don't allow this page to be requested directly
exit;
}
class Q2A_Recalc_CacheClearComplete extends Q2A_Recalc_ReindexPostsComplete
class Q2A_Recalc_CacheClearComplete extends Q2A_Recalc_AbstractFinalStep
{
public function getMessage()
{
......
......@@ -26,7 +26,7 @@ if (!defined('QA_VERSION')) { // don't allow this page to be requested directly
exit;
}
class Q2A_Recalc_DeleteHiddenComplete extends Q2A_Recalc_ReindexPostsComplete
class Q2A_Recalc_DeleteHiddenComplete extends Q2A_Recalc_AbstractFinalStep
{
public function getMessage()
{
......
......@@ -26,7 +26,7 @@ if (!defined('QA_VERSION')) { // don't allow this page to be requested directly
exit;
}
class Q2A_Recalc_RecalcCategoriesComplete extends Q2A_Recalc_ReindexPostsComplete
class Q2A_Recalc_RecalcCategoriesComplete extends Q2A_Recalc_AbstractFinalStep
{
public function getMessage()
{
......
......@@ -26,7 +26,7 @@ if (!defined('QA_VERSION')) { // don't allow this page to be requested directly
exit;
}
class Q2A_Recalc_RecalcPointsComplete extends Q2A_Recalc_ReindexPostsComplete
class Q2A_Recalc_RecalcPointsComplete extends Q2A_Recalc_AbstractFinalStep
{
public function getMessage()
{
......
......@@ -26,7 +26,7 @@ if (!defined('QA_VERSION')) { // don't allow this page to be requested directly
exit;
}
class Q2A_Recalc_RecountPostsComplete extends Q2A_Recalc_ReindexPostsComplete
class Q2A_Recalc_RecountPostsComplete extends Q2A_Recalc_AbstractFinalStep
{
public function getMessage()
{
......
......@@ -26,7 +26,7 @@ if (!defined('QA_VERSION')) { // don't allow this page to be requested directly
exit;
}
class Q2A_Recalc_RefillEventsComplete extends Q2A_Recalc_ReindexPostsComplete
class Q2A_Recalc_RefillEventsComplete extends Q2A_Recalc_AbstractFinalStep
{
public function getMessage()
{
......
......@@ -28,11 +28,6 @@ if (!defined('QA_VERSION')) { // don't allow this page to be requested directly
class Q2A_Recalc_ReindexPostsComplete extends Q2A_Recalc_AbstractFinalStep
{
public function doStep()
{
throw new Exception('Do not process the completion step.');
}
public function getMessage()
{
return qa_lang('admin/reindex_posts_complete');
......
......@@ -73,8 +73,8 @@ class Q2A_Recalc_State
'dorefillevents_complete' => 'RefillEventsComplete',
'dorecalccategories_complete' => 'RecalcCategoriesComplete',
'dodeletehidden_complete' => 'DeleteHiddenComplete',
'doblobstodisk_complete' => 'BlobsToDiskComplete',
'doblobstodb_complete' => 'BlobsToDBComplete',
'doblobstodisk_complete' => 'BlobsMoveComplete',
'doblobstodb_complete' => 'BlobsMoveComplete',
'docacheclear_complete' => 'CacheClearComplete',
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment