Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
1a9496fd
Unverified
Commit
1a9496fd
authored
Jul 11, 2018
by
Scott
Committed by
GitHub
Jul 11, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #625 from pupi1985/patch-106
Fixed some error 500 issues on the new recalc approach
parents
f3cdc317
35ce3a4d
Hide whitespace changes
Inline
Side-by-side
Showing
56 changed files
with
181 additions
and
537 deletions
+181
-537
recalc.php
qa-include/ajax/recalc.php
+1
-1
recalc.php
qa-include/app/recalc.php
+2
-2
install.php
qa-include/db/install.php
+1
-1
admin-default.php
qa-include/pages/admin/admin-default.php
+1
-1
admin-recalc.php
qa-include/pages/admin/admin-recalc.php
+2
-2
question.php
qa-include/pages/question.php
+1
-1
qa-db.php
qa-include/qa-db.php
+1
-1
DbConnection.php
qa-src/Database/DbConnection.php
+1
-2
AbstractFinalStep.php
qa-src/Recalc/AbstractFinalStep.php
+6
-9
AbstractStep.php
qa-src/Recalc/AbstractStep.php
+6
-16
BlobsMoveComplete.php
qa-src/Recalc/BlobsMoveComplete.php
+2
-10
BlobsToDB.php
qa-src/Recalc/BlobsToDB.php
+2
-10
BlobsToDBMove.php
qa-src/Recalc/BlobsToDBMove.php
+2
-10
BlobsToDisk.php
qa-src/Recalc/BlobsToDisk.php
+2
-10
BlobsToDiskMove.php
qa-src/Recalc/BlobsToDiskMove.php
+2
-10
CacheClear.php
qa-src/Recalc/CacheClear.php
+2
-10
CacheClearComplete.php
qa-src/Recalc/CacheClearComplete.php
+2
-10
CacheClearProcess.php
qa-src/Recalc/CacheClearProcess.php
+3
-11
CacheTrim.php
qa-src/Recalc/CacheTrim.php
+2
-10
CacheTrimProcess.php
qa-src/Recalc/CacheTrimProcess.php
+2
-10
DeleteHidden.php
qa-src/Recalc/DeleteHidden.php
+2
-10
DeleteHiddenAnswers.php
qa-src/Recalc/DeleteHiddenAnswers.php
+3
-11
DeleteHiddenComments.php
qa-src/Recalc/DeleteHiddenComments.php
+3
-11
DeleteHiddenComplete.php
qa-src/Recalc/DeleteHiddenComplete.php
+2
-10
DeleteHiddenQuestions.php
qa-src/Recalc/DeleteHiddenQuestions.php
+3
-11
RecalcCategories.php
qa-src/Recalc/RecalcCategories.php
+2
-10
RecalcCategoriesBackPaths.php
qa-src/Recalc/RecalcCategoriesBackPaths.php
+3
-11
RecalcCategoriesComplete.php
qa-src/Recalc/RecalcCategoriesComplete.php
+2
-10
RecalcCategoriesPostCount.php
qa-src/Recalc/RecalcCategoriesPostCount.php
+2
-10
RecalcCategoriesPostUpdate.php
qa-src/Recalc/RecalcCategoriesPostUpdate.php
+3
-11
RecalcCategoriesRecount.php
qa-src/Recalc/RecalcCategoriesRecount.php
+3
-11
RecalcMain.php
qa-src/Recalc/RecalcMain.php
+5
-12
RecalcPoints.php
qa-src/Recalc/RecalcPoints.php
+2
-10
RecalcPointsComplete.php
qa-src/Recalc/RecalcPointsComplete.php
+2
-10
RecalcPointsRecalc.php
qa-src/Recalc/RecalcPointsRecalc.php
+2
-10
RecalcPointsUserCount.php
qa-src/Recalc/RecalcPointsUserCount.php
+2
-10
RecountPosts.php
qa-src/Recalc/RecountPosts.php
+2
-10
RecountPostsACount.php
qa-src/Recalc/RecountPostsACount.php
+3
-11
RecountPostsComplete.php
qa-src/Recalc/RecountPostsComplete.php
+2
-10
RecountPostsPostCount.php
qa-src/Recalc/RecountPostsPostCount.php
+2
-10
RecountPostsVoteCount.php
qa-src/Recalc/RecountPostsVoteCount.php
+3
-11
RefillEvents.php
qa-src/Recalc/RefillEvents.php
+2
-10
RefillEventsComplete.php
qa-src/Recalc/RefillEventsComplete.php
+2
-10
RefillEventsQCount.php
qa-src/Recalc/RefillEventsQCount.php
+2
-10
RefillEventsRefill.php
qa-src/Recalc/RefillEventsRefill.php
+3
-11
ReindexContent.php
qa-src/Recalc/ReindexContent.php
+2
-10
ReindexContentPageReindex.php
qa-src/Recalc/ReindexContentPageReindex.php
+3
-11
ReindexContentPostCount.php
qa-src/Recalc/ReindexContentPostCount.php
+2
-10
ReindexContentPostReindex.php
qa-src/Recalc/ReindexContentPostReindex.php
+3
-11
ReindexPostsComplete.php
qa-src/Recalc/ReindexPostsComplete.php
+2
-10
ReindexPostsWordCount.php
qa-src/Recalc/ReindexPostsWordCount.php
+3
-11
State.php
qa-src/Recalc/State.php
+46
-53
CacheDriver.php
qa-src/Storage/CacheDriver.php
+3
-5
CacheFactory.php
qa-src/Storage/CacheFactory.php
+6
-8
FileCacheDriver.php
qa-src/Storage/FileCacheDriver.php
+3
-5
MemcachedDriver.php
qa-src/Storage/MemcachedDriver.php
+3
-5
No files found.
qa-include/ajax/recalc.php
View file @
1a9496fd
...
...
@@ -28,7 +28,7 @@ if (qa_get_logged_in_level() >= QA_USER_LEVEL_ADMIN) {
$message
=
qa_lang
(
'misc/form_security_reload'
);
}
else
{
$recalc
=
new
Q2A_Recalc_
RecalcMain
(
qa_post_text
(
'state'
));
$recalc
=
new
\Q2A\Recalc\
RecalcMain
(
qa_post_text
(
'state'
));
$stoptime
=
time
()
+
3
;
while
(
$recalc
->
performStep
()
&&
time
()
<
$stoptime
)
{
...
...
qa-include/app/recalc.php
View file @
1a9496fd
...
...
@@ -545,7 +545,7 @@ function qa_recalc_perform_step(&$state)
case
'docachetrim_process'
:
case
'docacheclear_process'
:
$cacheDriver
=
Q2A_Storage_
CacheFactory
::
getCacheDriver
();
$cacheDriver
=
\Q2A\Storage\
CacheFactory
::
getCacheDriver
();
$cacheStats
=
$cacheDriver
->
getStats
();
$limit
=
min
(
$cacheStats
[
'files'
],
20
);
...
...
@@ -648,7 +648,7 @@ function qa_recalc_stage_length($operation)
case
'docachetrim_process'
:
case
'docacheclear_process'
:
$cacheDriver
=
Q2A_Storage_
CacheFactory
::
getCacheDriver
();
$cacheDriver
=
\Q2A\Storage\
CacheFactory
::
getCacheDriver
();
$cacheStats
=
$cacheDriver
->
getStats
();
$length
=
$cacheStats
[
'files'
];
break
;
...
...
qa-include/db/install.php
View file @
1a9496fd
...
...
@@ -1612,7 +1612,7 @@ function qa_db_upgrade_tables()
// Perform any necessary recalculations, as determined by upgrade steps
foreach
(
array_keys
(
$keyrecalc
)
as
$state
)
{
$recalc
=
new
Q2A_Recalc_
RecalcMain
(
$state
);
$recalc
=
new
\Q2A\Recalc\
RecalcMain
(
$state
);
while
(
$recalc
->
getState
())
{
set_time_limit
(
60
);
...
...
qa-include/pages/admin/admin-default.php
View file @
1a9496fd
...
...
@@ -1803,7 +1803,7 @@ switch ($adminsection) {
break
;
case
'caching'
:
$cacheDriver
=
Q2A_Storage_
CacheFactory
::
getCacheDriver
();
$cacheDriver
=
\Q2A\Storage\
CacheFactory
::
getCacheDriver
();
$qa_content
[
'error'
]
=
$cacheDriver
->
getError
();
$cacheStats
=
$cacheDriver
->
getStats
();
...
...
qa-include/pages/admin/admin-recalc.php
View file @
1a9496fd
...
...
@@ -69,7 +69,7 @@ if ($recalcnow) {
<?php
$recalc
=
new
Q2A_Recalc_
RecalcMain
(
$state
);
$recalc
=
new
\Q2A\Recalc\
RecalcMain
(
$state
);
while
(
$recalc
->
getState
())
{
set_time_limit
(
60
);
...
...
@@ -78,7 +78,7 @@ if ($recalcnow) {
while
(
$recalc
->
performStep
()
&&
time
()
<
$stoptime
)
;
echo
qa_html
(
$recalc
->
getMessage
)
.
str_repeat
(
' '
,
1024
)
.
"<br>
\n
"
;
echo
qa_html
(
$recalc
->
getMessage
()
)
.
str_repeat
(
' '
,
1024
)
.
"<br>
\n
"
;
flush
();
sleep
(
1
);
// ... then rest for one
...
...
qa-include/pages/question.php
View file @
1a9496fd
...
...
@@ -41,7 +41,7 @@ $pagestate = qa_get_state();
// Get information about this question
$cacheDriver
=
Q2A_Storage_
CacheFactory
::
getCacheDriver
();
$cacheDriver
=
\Q2A\Storage\
CacheFactory
::
getCacheDriver
();
$cacheKey
=
"question:
$questionid
"
;
$useCache
=
$userid
===
null
&&
$cacheDriver
->
isEnabled
()
&&
!
qa_is_http_post
()
&&
empty
(
$pagestate
);
$saveCache
=
false
;
...
...
qa-include/qa-db.php
View file @
1a9496fd
...
...
@@ -524,7 +524,7 @@ function qa_db_single_select($selectspec)
{
// check for cached results
if
(
isset
(
$selectspec
[
'caching'
]))
{
$cacheDriver
=
Q2A_Storage_
CacheFactory
::
getCacheDriver
();
$cacheDriver
=
\Q2A\Storage\
CacheFactory
::
getCacheDriver
();
$cacheKey
=
'query:'
.
$selectspec
[
'caching'
][
'key'
];
if
(
$cacheDriver
->
isEnabled
())
{
...
...
qa-src/Database/DbConnection.php
View file @
1a9496fd
...
...
@@ -21,7 +21,6 @@ namespace Q2A\Database;
use
PDO
;
use
PDOException
;
use
PDOStatement
;
use
Q2A_Storage_CacheFactory
;
class
DbConnection
{
...
...
@@ -260,7 +259,7 @@ class DbConnection
{
// check for cached results
if
(
isset
(
$selectspec
[
'caching'
]))
{
$cacheDriver
=
Q2A_Storage_
CacheFactory
::
getCacheDriver
();
$cacheDriver
=
\Q2A\Storage\
CacheFactory
::
getCacheDriver
();
$cacheKey
=
'q2a.query:'
.
$selectspec
[
'caching'
][
'key'
];
if
(
$cacheDriver
->
isEnabled
())
{
...
...
qa-
include/Q2A
/Recalc/AbstractFinalStep.php
→
qa-
src
/Recalc/AbstractFinalStep.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/AbstractFinalStep.php
Description: Base class for final step classes in the recalc processes.
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
...
...
@@ -20,16 +16,17 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
use
Exception
;
abstract
class
Q2A_Recalc_AbstractFinalStep
extends
Q2A_Recalc_
AbstractStep
abstract
class
AbstractFinalStep
extends
AbstractStep
{
protected
$isFinalStep
=
true
;
/**
* @throws Exception
*/
public
function
doStep
()
{
throw
new
Exception
(
'Do not process the completion step.'
);
...
...
qa-
include/Q2A
/Recalc/AbstractStep.php
→
qa-
src
/Recalc/AbstractStep.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/AbstractStep.php
Description: Base class for step classes in the recal processes.
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
...
...
@@ -20,19 +16,16 @@
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
;
}
namespace
Q2A\Recalc
;
require_once
QA_INCLUDE_DIR
.
'app/format.php'
;
//required for qa_number_format()
require_once
QA_INCLUDE_DIR
.
'app/format.php'
;
//required for qa_number_format()
abstract
class
Q2A_Recalc_
AbstractStep
abstract
class
AbstractStep
{
protected
$state
;
protected
$isFinalStep
=
false
;
public
function
__construct
(
Q2A_Recalc_
State
$state
)
public
function
__construct
(
State
$state
)
{
$this
->
state
=
$state
;
}
...
...
@@ -67,12 +60,9 @@ abstract class Q2A_Recalc_AbstractStep
));
}
public
static
function
factory
(
Q2A_Recalc_
State
$state
)
public
static
function
factory
(
State
$state
)
{
$class
=
$state
->
getOperationClass
();
if
(
class_exists
(
$class
))
{
return
new
$class
(
$state
);
}
return
null
;
return
$class
===
null
?
null
:
new
$class
(
$state
);
}
}
qa-
include/Q2A
/Recalc/BlobsMoveComplete.php
→
qa-
src
/Recalc/BlobsMoveComplete.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/BlobsToDiskComplete.php
Description: Recalc class for the end of the blobs to disk 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_BlobsMoveComplete
extends
Q2A_Recalc_AbstractFinalStep
class
BlobsMoveComplete
extends
AbstractFinalStep
{
public
function
getMessage
()
{
...
...
qa-
include/Q2A
/Recalc/BlobsToDB.php
→
qa-
src
/Recalc/BlobsToDB.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/BlobsToDB.php
Description: Recalc class for the start 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_BlobsToDB
extends
Q2A_Recalc_AbstractStep
class
BlobsToDB
extends
AbstractStep
{
public
function
doStep
()
{
...
...
qa-
include/Q2A
/Recalc/BlobsToDBMove.php
→
qa-
src
/Recalc/BlobsToDBMove.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/BlobsToDBMove.php
Description: Recalc processing class for 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_BlobsToDBMove
extends
Q2A_Recalc_AbstractStep
class
BlobsToDBMove
extends
AbstractStep
{
public
function
doStep
()
{
...
...
qa-
include/Q2A
/Recalc/BlobsToDisk.php
→
qa-
src
/Recalc/BlobsToDisk.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/BlobsToDisk.php
Description: Recalc class for the start of the blobs to disk 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_BlobsToDisk
extends
Q2A_Recalc_AbstractStep
class
BlobsToDisk
extends
AbstractStep
{
public
function
doStep
()
{
...
...
qa-
include/Q2A
/Recalc/BlobsToDiskMove.php
→
qa-
src
/Recalc/BlobsToDiskMove.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/BlobsToDiskMove.php
Description: Recalc processing class for the blobs to disk 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_BlobsToDiskMove
extends
Q2A_Recalc_AbstractStep
class
BlobsToDiskMove
extends
AbstractStep
{
public
function
doStep
()
{
...
...
qa-
include/Q2A
/Recalc/CacheClear.php
→
qa-
src
/Recalc/CacheClear.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/CacheClear.php
Description: Recalc class for the start of the cache clear 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_CacheClear
extends
Q2A_Recalc_AbstractStep
class
CacheClear
extends
AbstractStep
{
public
function
doStep
()
{
...
...
qa-
include/Q2A
/Recalc/CacheClearComplete.php
→
qa-
src
/Recalc/CacheClearComplete.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/CacheClearComplete.php
Description: Recalc class for the end of the cache clear 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_CacheClearComplete
extends
Q2A_Recalc_AbstractFinalStep
class
CacheClearComplete
extends
AbstractFinalStep
{
public
function
getMessage
()
{
...
...
qa-
include/Q2A
/Recalc/CacheClearProcess.php
→
qa-
src
/Recalc/CacheClearProcess.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/CacheClearProcess.php
Description: Recalc processing class for the cache clear 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
...
...
@@ -20,17 +16,13 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_CacheClearProcess
extends
Q2A_Recalc_AbstractStep
class
CacheClearProcess
extends
AbstractStep
{
public
function
doStep
()
{
$cacheDriver
=
Q2A_Storage_
CacheFactory
::
getCacheDriver
();
$cacheDriver
=
\Q2A\Storage\
CacheFactory
::
getCacheDriver
();
$cacheStats
=
$cacheDriver
->
getStats
();
$limit
=
min
(
$cacheStats
[
'files'
],
20
);
...
...
qa-
include/Q2A
/Recalc/CacheTrim.php
→
qa-
src
/Recalc/CacheTrim.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/CacheTrim.php
Description: Recalc class for the start of the cache trim 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_CacheTrim
extends
Q2A_Recalc_AbstractStep
class
CacheTrim
extends
AbstractStep
{
public
function
doStep
()
{
...
...
qa-
include/Q2A
/Recalc/CacheTrimProcess.php
→
qa-
src
/Recalc/CacheTrimProcess.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/CacherTrimProcess.php
Description: Recalc processing class for the cache trim 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
...
...
@@ -20,12 +16,8 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_CacheTrimProcess
extends
Q2A_Recalc_CacheClear_Process
class
CacheTrimProcess
extends
CacheClearProcess
{
}
qa-
include/Q2A
/Recalc/DeleteHidden.php
→
qa-
src
/Recalc/DeleteHidden.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/DeleteHidden.php
Description: Recalc class for the start of the delete hidden 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_DeleteHidden
extends
Q2A_Recalc_AbstractStep
class
DeleteHidden
extends
AbstractStep
{
public
function
doStep
()
{
...
...
qa-
include/Q2A
/Recalc/DeleteHiddenAnswers.php
→
qa-
src
/Recalc/DeleteHiddenAnswers.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/DeleteHiddenAnswers.php
Description: Recalc processing class for the delete hidden 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
...
...
@@ -20,19 +16,15 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_DeleteHiddenAnswers
extends
Q2A_Recalc_AbstractStep
class
DeleteHiddenAnswers
extends
AbstractStep
{
public
function
doStep
()
{
$posts
=
qa_db_posts_get_for_deleting
(
'A'
,
$this
->
state
->
next
,
1
);
if
(
!
count
(
$posts
))
{
if
(
empty
(
$posts
))
{
$this
->
state
->
transition
(
'dodeletehidden_questions'
);
return
false
;
}
...
...
qa-
include/Q2A
/Recalc/DeleteHiddenComments.php
→
qa-
src
/Recalc/DeleteHiddenComments.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/DeleteHiddenComments.php
Description: Recalc processing class for the delete hidden 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
...
...
@@ -20,19 +16,15 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_DeleteHiddenComments
extends
Q2A_Recalc_AbstractStep
class
DeleteHiddenComments
extends
AbstractStep
{
public
function
doStep
()
{
$posts
=
qa_db_posts_get_for_deleting
(
'C'
,
$this
->
state
->
next
,
1
);
if
(
!
count
(
$posts
))
{
if
(
empty
(
$posts
))
{
$this
->
state
->
transition
(
'dodeletehidden_answers'
);
return
false
;
}
...
...
qa-
include/Q2A
/Recalc/DeleteHiddenComplete.php
→
qa-
src
/Recalc/DeleteHiddenComplete.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/DeleteHiddenComplete.php
Description: Recalc class for the end of the delete hidden 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_DeleteHiddenComplete
extends
Q2A_Recalc_AbstractFinalStep
class
DeleteHiddenComplete
extends
AbstractFinalStep
{
public
function
getMessage
()
{
...
...
qa-
include/Q2A
/Recalc/DeleteHiddenQuestions.php
→
qa-
src
/Recalc/DeleteHiddenQuestions.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/DeleteHiddenQuestions.php
Description: Recalc processing class for the delete hidden 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
...
...
@@ -20,19 +16,15 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_DeleteHiddenQuestions
extends
Q2A_Recalc_AbstractStep
class
DeleteHiddenQuestions
extends
AbstractStep
{
public
function
doStep
()
{
$posts
=
qa_db_posts_get_for_deleting
(
'Q'
,
$this
->
state
->
next
,
1
);
if
(
!
count
(
$posts
))
{
if
(
empty
(
$posts
))
{
$this
->
state
->
transition
(
'dodeletehidden_complete'
);
return
false
;
}
...
...
qa-
include/Q2A
/Recalc/RecalcCategories.php
→
qa-
src
/Recalc/RecalcCategories.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RecalcCategories.php
Description: Recalc class for the start of the recalc categories 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_RecalcCategories
extends
Q2A_Recalc_AbstractStep
class
RecalcCategories
extends
AbstractStep
{
public
function
doStep
()
{
...
...
qa-
include/Q2A
/Recalc/RecalcCategoriesBackPaths.php
→
qa-
src
/Recalc/RecalcCategoriesBackPaths.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RecalcCategoriesBackPaths.php
Description: Recalc processing class for the recalc categories 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
...
...
@@ -20,19 +16,15 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_RecalcCategoriesBackPaths
extends
Q2A_Recalc_AbstractStep
class
RecalcCategoriesBackPaths
extends
AbstractStep
{
public
function
doStep
()
{
$categoryids
=
qa_db_categories_get_for_recalcs
(
$this
->
state
->
next
,
10
);
if
(
!
count
(
$categoryids
))
{
if
(
empty
(
$categoryids
))
{
$this
->
state
->
transition
(
'dorecalccategories_complete'
);
return
false
;
}
...
...
qa-
include/Q2A
/Recalc/RecalcCategoriesComplete.php
→
qa-
src
/Recalc/RecalcCategoriesComplete.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RecalcCategoriesComplete.php
Description: Recalc class for the end of the recalc categories 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_RecalcCategoriesComplete
extends
Q2A_Recalc_AbstractFinalStep
class
RecalcCategoriesComplete
extends
AbstractFinalStep
{
public
function
getMessage
()
{
...
...
qa-
include/Q2A
/Recalc/RecalcCategoriesPostCount.php
→
qa-
src
/Recalc/RecalcCategoriesPostCount.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RecalcCategoriesPostCount.php
Description: Recalc processing class for the recalc categories 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_RecalcCategoriesPostCount
extends
Q2A_Recalc_AbstractStep
class
RecalcCategoriesPostCount
extends
AbstractStep
{
public
function
doStep
()
{
...
...
qa-
include/Q2A
/Recalc/RecalcCategoriesPostUpdate.php
→
qa-
src
/Recalc/RecalcCategoriesPostUpdate.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RecalcCategoriesPostUpdate.php
Description: Recalc processing class for the recalc categories 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
...
...
@@ -20,19 +16,15 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_RecalcCategoriesPostUpdate
extends
Q2A_Recalc_AbstractStep
class
RecalcCategoriesPostUpdate
extends
AbstractStep
{
public
function
doStep
()
{
$postids
=
qa_db_posts_get_for_recategorizing
(
$this
->
state
->
next
,
100
);
if
(
!
count
(
$postids
))
{
if
(
empty
(
$postids
))
{
$this
->
state
->
transition
(
'dorecalccategories_recount'
);
return
false
;
}
...
...
qa-
include/Q2A
/Recalc/RecalcCategoriesRecount.php
→
qa-
src
/Recalc/RecalcCategoriesRecount.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RecalcCategoriesRecount.php
Description: Recalc processing class for the recalc categories 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
...
...
@@ -20,19 +16,15 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_RecalcCategoriesRecount
extends
Q2A_Recalc_AbstractStep
class
RecalcCategoriesRecount
extends
AbstractStep
{
public
function
doStep
()
{
$categoryids
=
qa_db_categories_get_for_recalcs
(
$this
->
state
->
next
,
10
);
if
(
!
count
(
$categoryids
))
{
if
(
empty
(
$categoryids
))
{
$this
->
state
->
transition
(
'dorecalccategories_backpaths'
);
return
false
;
}
...
...
qa-
include/Q2A
/Recalc/RecalcMain.php
→
qa-
src
/Recalc/RecalcMain.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RecalcPoints.php
Description: Main recalculation class.
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
...
...
@@ -56,10 +52,7 @@
[but these are not entirely redundant since they can contain historical information no longer in ^posts]
*/
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
namespace
Q2A\Recalc
;
require_once
QA_INCLUDE_DIR
.
'db/recalc.php'
;
require_once
QA_INCLUDE_DIR
.
'db/post-create.php'
;
...
...
@@ -71,7 +64,7 @@ require_once QA_INCLUDE_DIR . 'app/options.php';
require_once
QA_INCLUDE_DIR
.
'app/post-create.php'
;
require_once
QA_INCLUDE_DIR
.
'app/post-update.php'
;
class
Q2A_Recalc_
RecalcMain
class
RecalcMain
{
protected
$state
;
...
...
@@ -80,7 +73,7 @@ class Q2A_Recalc_RecalcMain
*/
public
function
__construct
(
$state
)
{
$this
->
state
=
new
Q2A_Recalc_
State
(
$state
);
$this
->
state
=
new
\Q2A\Recalc\
State
(
$state
);
}
public
function
getState
()
...
...
@@ -90,7 +83,7 @@ class Q2A_Recalc_RecalcMain
public
function
performStep
()
{
$step
=
Q2A_Recalc_
AbstractStep
::
factory
(
$this
->
state
);
$step
=
AbstractStep
::
factory
(
$this
->
state
);
if
(
!
$step
||
$step
->
isFinalStep
())
{
$this
->
state
->
setState
();
...
...
@@ -111,7 +104,7 @@ class Q2A_Recalc_RecalcMain
*/
public
function
getMessage
()
{
$step
=
Q2A_Recalc_
AbstractStep
::
factory
(
$this
->
state
);
$step
=
AbstractStep
::
factory
(
$this
->
state
);
return
$step
?
$step
->
getMessage
()
:
''
;
}
}
qa-
include/Q2A
/Recalc/RecalcPoints.php
→
qa-
src
/Recalc/RecalcPoints.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RecalcPoints.php
Description: Recalc class for the start of the recalc points 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_RecalcPoints
extends
Q2A_Recalc_AbstractStep
class
RecalcPoints
extends
AbstractStep
{
public
function
doStep
()
{
...
...
qa-
include/Q2A
/Recalc/RecalcPointsComplete.php
→
qa-
src
/Recalc/RecalcPointsComplete.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RecalcPointsComplete.php
Description: Recalc class for the end of the recalc points 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_RecalcPointsComplete
extends
Q2A_Recalc_AbstractFinalStep
class
RecalcPointsComplete
extends
AbstractFinalStep
{
public
function
getMessage
()
{
...
...
qa-
include/Q2A
/Recalc/RecalcPointsRecalc.php
→
qa-
src
/Recalc/RecalcPointsRecalc.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RecalcPointsRecalc.php
Description: Recalc processing class for the recalc points 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_RecalcPointsRecalc
extends
Q2A_Recalc_AbstractStep
class
RecalcPointsRecalc
extends
AbstractStep
{
public
function
doStep
()
{
...
...
qa-
include/Q2A
/Recalc/RecalcPointsUserCount.php
→
qa-
src
/Recalc/RecalcPointsUserCount.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RecalcPointsUserCount.php
Description: Recalc processing class for the recalc points 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_RecalcPointsUserCount
extends
Q2A_Recalc_AbstractStep
class
RecalcPointsUserCount
extends
AbstractStep
{
public
function
doStep
()
{
...
...
qa-
include/Q2A
/Recalc/RecountPosts.php
→
qa-
src
/Recalc/RecountPosts.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RecountPosts.php
Description: Recalc class for the start of the recount posts 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_RecountPosts
extends
Q2A_Recalc_AbstractStep
class
RecountPosts
extends
AbstractStep
{
public
function
doStep
()
{
...
...
qa-
include/Q2A
/Recalc/RecountPostsACount.php
→
qa-
src
/Recalc/RecountPostsACount.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RecountPostsACount.php
Description: Recalc processing class for the recount posts 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
...
...
@@ -20,19 +16,15 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_RecountPostsACount
extends
Q2A_Recalc_AbstractStep
class
RecountPostsACount
extends
AbstractStep
{
public
function
doStep
()
{
$postids
=
qa_db_posts_get_for_recounting
(
$this
->
state
->
next
,
1000
);
if
(
!
count
(
$postids
))
{
if
(
empty
(
$postids
))
{
qa_db_unupaqcount_update
();
$this
->
state
->
transition
(
'dorecountposts_complete'
);
return
false
;
...
...
qa-
include/Q2A
/Recalc/RecountPostsComplete.php
→
qa-
src
/Recalc/RecountPostsComplete.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RecountPostsComplete.php
Description: Recalc class for the end of the recount posts 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_RecountPostsComplete
extends
Q2A_Recalc_AbstractFinalStep
class
RecountPostsComplete
extends
AbstractFinalStep
{
public
function
getMessage
()
{
...
...
qa-
include/Q2A
/Recalc/RecountPostsPostCount.php
→
qa-
src
/Recalc/RecountPostsPostCount.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RecountPostsPostCount.php
Description: Recalc processing class for the recount posts 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_RecountPostsPostCount
extends
Q2A_Recalc_AbstractStep
class
RecountPostsPostCount
extends
AbstractStep
{
public
function
doStep
()
{
...
...
qa-
include/Q2A
/Recalc/RecountPostsVoteCount.php
→
qa-
src
/Recalc/RecountPostsVoteCount.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RecountPostsVoteCount.php
Description: Recalc processing class for the recount posts 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
...
...
@@ -20,19 +16,15 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_RecountPostsVoteCount
extends
Q2A_Recalc_AbstractStep
class
RecountPostsVoteCount
extends
AbstractStep
{
public
function
doStep
()
{
$postids
=
qa_db_posts_get_for_recounting
(
$this
->
state
->
next
,
1000
);
if
(
!
count
(
$postids
))
{
if
(
empty
(
$postids
))
{
$this
->
state
->
transition
(
'dorecountposts_acount'
);
return
false
;
}
...
...
qa-
include/Q2A
/Recalc/RefillEvents.php
→
qa-
src
/Recalc/RefillEvents.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RefillEvents.php
Description: Recalc class for the start of the refill events 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_RefillEvents
extends
Q2A_Recalc_AbstractStep
class
RefillEvents
extends
AbstractStep
{
public
function
doStep
()
{
...
...
qa-
include/Q2A
/Recalc/RefillEventsComplete.php
→
qa-
src
/Recalc/RefillEventsComplete.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RefillEventsComplete.php
Description: Recalc class for the end of the refill events 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_RefillEventsComplete
extends
Q2A_Recalc_AbstractFinalStep
class
RefillEventsComplete
extends
AbstractFinalStep
{
public
function
getMessage
()
{
...
...
qa-
include/Q2A
/Recalc/RefillEventsQCount.php
→
qa-
src
/Recalc/RefillEventsQCount.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RefillEventsQCount.php
Description: Recalc processing class for the refill events 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_RefillEventsQCount
extends
Q2A_Recalc_AbstractStep
class
RefillEventsQCount
extends
AbstractStep
{
public
function
doStep
()
{
...
...
qa-
include/Q2A
/Recalc/RefillEventsRefill.php
→
qa-
src
/Recalc/RefillEventsRefill.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/RefillEventsRefill.php
Description: Recalc processing class for the refill events 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
...
...
@@ -20,24 +16,20 @@
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
;
}
namespace
Q2A\Recalc
;
require_once
QA_INCLUDE_DIR
.
'app/events.php'
;
require_once
QA_INCLUDE_DIR
.
'app/updates.php'
;
require_once
QA_INCLUDE_DIR
.
'util/sort.php'
;
class
Q2A_Recalc_RefillEventsRefill
extends
Q2A_Recalc_
AbstractStep
class
RefillEventsRefill
extends
AbstractStep
{
public
function
doStep
()
{
$questionids
=
qa_db_qs_get_for_event_refilling
(
$this
->
state
->
next
,
1
);
if
(
!
count
(
$questionids
))
{
if
(
empty
(
$questionids
))
{
$this
->
state
->
transition
(
'dorefillevents_complete'
);
return
false
;
}
...
...
qa-
include/Q2A
/Recalc/ReindexContent.php
→
qa-
src
/Recalc/ReindexContent.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/ReindexContent.php
Description: Recalc class for the start of the reindex content 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_ReindexContent
extends
Q2A_Recalc_AbstractStep
class
ReindexContent
extends
AbstractStep
{
public
function
doStep
()
{
...
...
qa-
include/Q2A
/Recalc/ReindexContentPageReindex.php
→
qa-
src
/Recalc/ReindexContentPageReindex.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/ReindexContentPageReindex.php
Description: Recalc processing class for the reindex content 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
...
...
@@ -20,19 +16,15 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_ReindexContentPageReindex
extends
Q2A_Recalc_AbstractStep
class
ReindexContentPageReindex
extends
AbstractStep
{
public
function
doStep
()
{
$pages
=
qa_db_pages_get_for_reindexing
(
$this
->
state
->
next
,
10
);
if
(
!
count
(
$pages
))
{
if
(
empty
(
$pages
))
{
$this
->
state
->
transition
(
'doreindexcontent_postcount'
);
return
false
;
}
...
...
qa-
include/Q2A
/Recalc/ReindexContentPostCount.php
→
qa-
src
/Recalc/ReindexContentPostCount.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/ReindexContentPostCount.php
Description: Recalc processing class for the reindex content 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_ReindexContentPostCount
extends
Q2A_Recalc_AbstractStep
class
ReindexContentPostCount
extends
AbstractStep
{
public
function
doStep
()
{
...
...
qa-
include/Q2A
/Recalc/ReindexContentPostReindex.php
→
qa-
src
/Recalc/ReindexContentPostReindex.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/ReindexContentPostReindex.php
Description: Recalc processing class for the reindex content 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
...
...
@@ -20,19 +16,15 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_ReindexContentPostReindex
extends
Q2A_Recalc_AbstractStep
class
ReindexContentPostReindex
extends
AbstractStep
{
public
function
doStep
()
{
$posts
=
qa_db_posts_get_for_reindexing
(
$this
->
state
->
next
,
10
);
if
(
!
count
(
$posts
))
{
if
(
empty
(
$posts
))
{
qa_db_truncate_indexes
(
$this
->
state
->
next
);
$this
->
state
->
transition
(
'doreindexposts_wordcount'
);
return
false
;
...
...
qa-
include/Q2A
/Recalc/ReindexPostsComplete.php
→
qa-
src
/Recalc/ReindexPostsComplete.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/ReindexPostsComplete.php
Description: Recalc class for the end of the reindex posts 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
...
...
@@ -20,13 +16,9 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_ReindexPostsComplete
extends
Q2A_Recalc_AbstractFinalStep
class
ReindexPostsComplete
extends
AbstractFinalStep
{
public
function
getMessage
()
{
...
...
qa-
include/Q2A
/Recalc/ReindexPostsWordCount.php
→
qa-
src
/Recalc/ReindexPostsWordCount.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/ReindexContentWordCount.php
Description: Recalc processing class for the reindex content 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
...
...
@@ -20,19 +16,15 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Recalc
;
if
(
!
defined
(
'QA_VERSION'
))
{
// don't allow this page to be requested directly from browser
header
(
'Location: ../../'
);
exit
;
}
class
Q2A_Recalc_ReindexPostsWordCount
extends
Q2A_Recalc_AbstractStep
class
ReindexPostsWordCount
extends
AbstractStep
{
public
function
doStep
()
{
$wordids
=
qa_db_words_prepare_for_recounting
(
$this
->
state
->
next
,
1000
);
if
(
!
count
(
$wordids
))
{
if
(
empty
(
$wordids
))
{
qa_db_tagcount_update
();
// this is quick so just do it here
$this
->
state
->
transition
(
'doreindexposts_complete'
);
return
false
;
...
...
qa-
include/Q2A
/Recalc/State.php
→
qa-
src
/Recalc/State.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Recalc/State.php
Description: Class holding state of the current recalculation 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
...
...
@@ -20,12 +16,9 @@
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
;
}
namespace
Q2A\Recalc
;
class
Q2A_Recalc_
State
class
State
{
public
$state
;
public
$operation
;
...
...
@@ -34,48 +27,48 @@ class Q2A_Recalc_State
public
$done
;
private
$classes
=
array
(
'doreindexcontent'
=>
'ReindexContent'
,
'doreindexcontent_pagereindex'
=>
'ReindexContentPageReindex'
,
'doreindexcontent_postcount'
=>
'ReindexContentPostCount'
,
'doreindexcontent_postreindex'
=>
'ReindexContentPostReindex'
,
'doreindexposts_wordcount'
=>
'ReindexPostsWordCount'
,
'dorecountposts'
=>
'RecountPosts'
,
'dorecountposts_postcount'
=>
'RecountPostsPostCount'
,
'dorecountposts_votecount'
=>
'RecountPostsVoteCount'
,
'dorecountposts_acount'
=>
'
RecountPostsAc
ount'
,
'dorecalcpoints'
=>
'RecalcPoints'
,
'dorecalcpoints_usercount'
=>
'RecalcPointsUserCount'
,
'dorecalcpoints_recalc'
=>
'RecalcPointsRecalc'
,
'dorefillevents'
=>
'RefillEvents'
,
'dorefillevents_qcount'
=>
'
RefillEventsQc
ount'
,
'dorefillevents_refill'
=>
'RefillEventsRefill'
,
'dorecalccategories'
=>
'RecalcCategories'
,
'dorecalccategories_postcount'
=>
'RecalcCategoriesPostCount'
,
'dorecalccategories_postupdate'
=>
'RecalcCategoriesPostUpdate'
,
'dorecalccategories_recount'
=>
'RecalcCategoriesRecount'
,
'dorecalccategories_backpaths'
=>
'RecalcCategoriesBackPaths'
,
'dodeletehidden'
=>
'DeleteHidden'
,
'dodeletehidden_comments'
=>
'DeleteHiddenComments'
,
'dodeletehidden_answers'
=>
'DeleteHiddenAnswers'
,
'dodeletehidden_questions'
=>
'
Deleteh
iddenQuestions'
,
'doblobstodisk'
=>
'BlobsToDisk'
,
'doblobstodisk_move'
=>
'BlobsToDiskMove'
,
'doblobstodb'
=>
'BlobsToDB'
,
'doblobstodb_move'
=>
'BlobsToDBMove'
,
'docachetrim'
=>
'CacheTrim'
,
'docacheclear'
=>
'CacheClear'
,
'docachetrim_process'
=>
'CacheClearProcess'
,
'docacheclear_process'
=>
'CacheClearProcess'
,
'doreindexposts_complete'
=>
'ReindexPostsComplete'
,
'dorecountposts_complete'
=>
'RecountPostsComplete'
,
'dorecalcpoints_complete'
=>
'RecalcPointsComplete'
,
'dorefillevents_complete'
=>
'RefillEventsComplete'
,
'dorecalccategories_complete'
=>
'RecalcCategoriesComplete'
,
'dodeletehidden_complete'
=>
'DeleteHiddenComplete'
,
'doblobstodisk_complete'
=>
'BlobsMoveComplete'
,
'doblobstodb_complete'
=>
'BlobsMoveComplete'
,
'docacheclear_complete'
=>
'CacheClearComplete'
,
'doreindexcontent'
=>
'
\Q2A\Recalc\
ReindexContent'
,
'doreindexcontent_pagereindex'
=>
'
\Q2A\Recalc\
ReindexContentPageReindex'
,
'doreindexcontent_postcount'
=>
'
\Q2A\Recalc\
ReindexContentPostCount'
,
'doreindexcontent_postreindex'
=>
'
\Q2A\Recalc\
ReindexContentPostReindex'
,
'doreindexposts_wordcount'
=>
'
\Q2A\Recalc\
ReindexPostsWordCount'
,
'dorecountposts'
=>
'
\Q2A\Recalc\
RecountPosts'
,
'dorecountposts_postcount'
=>
'
\Q2A\Recalc\
RecountPostsPostCount'
,
'dorecountposts_votecount'
=>
'
\Q2A\Recalc\
RecountPostsVoteCount'
,
'dorecountposts_acount'
=>
'
\Q2A\Recalc\RecountPostsAC
ount'
,
'dorecalcpoints'
=>
'
\Q2A\Recalc\
RecalcPoints'
,
'dorecalcpoints_usercount'
=>
'
\Q2A\Recalc\
RecalcPointsUserCount'
,
'dorecalcpoints_recalc'
=>
'
\Q2A\Recalc\
RecalcPointsRecalc'
,
'dorefillevents'
=>
'
\Q2A\Recalc\
RefillEvents'
,
'dorefillevents_qcount'
=>
'
\Q2A\Recalc\RefillEventsQC
ount'
,
'dorefillevents_refill'
=>
'
\Q2A\Recalc\
RefillEventsRefill'
,
'dorecalccategories'
=>
'
\Q2A\Recalc\
RecalcCategories'
,
'dorecalccategories_postcount'
=>
'
\Q2A\Recalc\
RecalcCategoriesPostCount'
,
'dorecalccategories_postupdate'
=>
'
\Q2A\Recalc\
RecalcCategoriesPostUpdate'
,
'dorecalccategories_recount'
=>
'
\Q2A\Recalc\
RecalcCategoriesRecount'
,
'dorecalccategories_backpaths'
=>
'
\Q2A\Recalc\
RecalcCategoriesBackPaths'
,
'dodeletehidden'
=>
'
\Q2A\Recalc\
DeleteHidden'
,
'dodeletehidden_comments'
=>
'
\Q2A\Recalc\
DeleteHiddenComments'
,
'dodeletehidden_answers'
=>
'
\Q2A\Recalc\
DeleteHiddenAnswers'
,
'dodeletehidden_questions'
=>
'
\Q2A\Recalc\DeleteH
iddenQuestions'
,
'doblobstodisk'
=>
'
\Q2A\Recalc\
BlobsToDisk'
,
'doblobstodisk_move'
=>
'
\Q2A\Recalc\
BlobsToDiskMove'
,
'doblobstodb'
=>
'
\Q2A\Recalc\
BlobsToDB'
,
'doblobstodb_move'
=>
'
\Q2A\Recalc\
BlobsToDBMove'
,
'docachetrim'
=>
'
\Q2A\Recalc\
CacheTrim'
,
'docacheclear'
=>
'
\Q2A\Recalc\
CacheClear'
,
'docachetrim_process'
=>
'
\Q2A\Recalc\
CacheClearProcess'
,
'docacheclear_process'
=>
'
\Q2A\Recalc\
CacheClearProcess'
,
'doreindexposts_complete'
=>
'
\Q2A\Recalc\
ReindexPostsComplete'
,
'dorecountposts_complete'
=>
'
\Q2A\Recalc\
RecountPostsComplete'
,
'dorecalcpoints_complete'
=>
'
\Q2A\Recalc\
RecalcPointsComplete'
,
'dorefillevents_complete'
=>
'
\Q2A\Recalc\
RefillEventsComplete'
,
'dorecalccategories_complete'
=>
'
\Q2A\Recalc\
RecalcCategoriesComplete'
,
'dodeletehidden_complete'
=>
'
\Q2A\Recalc\
DeleteHiddenComplete'
,
'doblobstodisk_complete'
=>
'
\Q2A\Recalc\
BlobsMoveComplete'
,
'doblobstodb_complete'
=>
'
\Q2A\Recalc\
BlobsMoveComplete'
,
'docacheclear_complete'
=>
'
\Q2A\Recalc\
CacheClearComplete'
,
);
/**
...
...
@@ -104,7 +97,7 @@ class Q2A_Recalc_State
public
function
getOperationClass
()
{
return
isset
(
$this
->
classes
[
$this
->
operation
])
?
'Q2A_Recalc_'
.
$this
->
classes
[
$this
->
operation
]
:
null
;
return
isset
(
$this
->
classes
[
$this
->
operation
])
?
$this
->
classes
[
$this
->
operation
]
:
null
;
}
public
function
allDone
()
...
...
@@ -174,7 +167,7 @@ class Q2A_Recalc_State
case
'docachetrim_process'
:
case
'docacheclear_process'
:
$cacheDriver
=
Q2A_Storage_
CacheFactory
::
getCacheDriver
();
$cacheDriver
=
\Q2A\Storage\
CacheFactory
::
getCacheDriver
();
$cacheStats
=
$cacheDriver
->
getStats
();
return
$cacheStats
[
'files'
];
}
...
...
qa-
include/Q2A
/Storage/CacheDriver.php
→
qa-
src
/Storage/CacheDriver.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Storage/FileCache.php
Description: Interface for drivers of caching system.
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
...
...
@@ -20,10 +16,12 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Storage
;
/**
* Interface for caching drivers.
*/
interface
Q2A_Storage_
CacheDriver
interface
CacheDriver
{
/**
* Get the cached data for the supplied key. Data can be any format but is usually an array.
...
...
qa-
include/Q2A
/Storage/CacheFactory.php
→
qa-
src
/Storage/CacheFactory.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Storage/CacheManager.php
Description: Handler for caching system.
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
...
...
@@ -20,16 +16,18 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Storage
;
/**
* Caches data (typically from database queries) to the filesystem.
*/
class
Q2A_Storage_
CacheFactory
class
CacheFactory
{
private
static
$cacheDriver
=
null
;
/**
* Get the appropriate cache handler.
* @return
Q2A_Storage_
CacheDriver The cache handler.
* @return CacheDriver The cache handler.
*/
public
static
function
getCacheDriver
()
{
...
...
@@ -45,12 +43,12 @@ class Q2A_Storage_CacheFactory
switch
(
$driver
)
{
case
'memcached'
:
self
::
$cacheDriver
=
new
Q2A_Storage_
MemcachedDriver
(
$config
);
self
::
$cacheDriver
=
new
MemcachedDriver
(
$config
);
break
;
case
'filesystem'
:
default
:
self
::
$cacheDriver
=
new
Q2A_Storage_
FileCacheDriver
(
$config
);
self
::
$cacheDriver
=
new
FileCacheDriver
(
$config
);
break
;
}
...
...
qa-
include/Q2A
/Storage/FileCacheDriver.php
→
qa-
src
/Storage/FileCacheDriver.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Storage/FileCacheDriver.php
Description: File-based driver for caching system.
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
...
...
@@ -20,10 +16,12 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Storage
;
/**
* Caches data (typically from database queries) to the filesystem.
*/
class
Q2A_Storage_FileCacheDriver
implements
Q2A_Storage_
CacheDriver
class
FileCacheDriver
implements
CacheDriver
{
private
$enabled
=
false
;
private
$keyPrefix
=
''
;
...
...
qa-
include/Q2A
/Storage/MemcachedDriver.php
→
qa-
src
/Storage/MemcachedDriver.php
View file @
1a9496fd
...
...
@@ -3,10 +3,6 @@
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-include/Q2A/Storage/MemcachedDriver.php
Description: Memcached-based driver for caching system.
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
...
...
@@ -20,10 +16,12 @@
More about this license: http://www.question2answer.org/license.php
*/
namespace
Q2A\Storage
;
/**
* Caches data (typically from database queries) in memory using Memcached.
*/
class
Q2A_Storage_MemcachedDriver
implements
Q2A_Storage_
CacheDriver
class
MemcachedDriver
implements
CacheDriver
{
private
$memcached
;
private
$enabled
=
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment