Skip to content

Commit 41724fa

Browse files
committed
fix turning workflow off fails to remove revisions
1 parent 288dbc9 commit 41724fa

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

framework/core/subsystems/expDatabase.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ public static function install_dbtables($aggressive=false, $workflow=ENABLE_WORK
208208
$rev_aggressive = true;
209209
}
210210
}
211-
if (is_readable("$dirpath/$tablename.info.php")) $info = include("$dirpath/$tablename.info.php");
211+
if (is_readable("$dirpath/$tablename.info.php"))
212+
$info = include("$dirpath/$tablename.info.php");
212213
if (!$db->tableExists($tablename)) {
213214
foreach ($db->createTable($tablename, $dd, $info) as $key=>$status) {
214215
$tables[$key] = $status;
@@ -1718,7 +1719,7 @@ abstract function updateObject($object, $table, $where=null, $identifier='id', $
17181719
* @param int|string $workflow is workflow turned on (or force)
17191720
*/
17201721
public function trim_revisions($table, $id, $num, $workflow=ENABLE_WORKFLOW) {
1721-
if ($workflow && $num) {
1722+
if (1) { //($workflow && $num) {
17221723
$max_revision = $this->max($table, 'revision_id', null, 'id='.$id);
17231724
$max_approved = $this->max($table, 'revision_id', null, 'id='.$id.' AND approved=1');
17241725
$min_revision = $this->min($table, 'revision_id', null, 'id='.$id);

0 commit comments

Comments
 (0)