Skip to content

Commit

Permalink
Fixed errors while updating from 2.2.1sr1 to 2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mystralkk committed Jan 25, 2022
1 parent 8ff72fc commit eee4699
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
10 changes: 10 additions & 0 deletions sql/updates/mysql_2.2.1_to_2.2.2.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
use Geeklog\DAO\UserAttributeDAO;
use Geeklog\Entity\UserAttributeEntity;

global $_DB_table_prefix, $_TABLES;

// The following entries are no longer defined in 'lib-database.php', so define them here
$_TABLES['cookiecodes'] = $_DB_table_prefix . 'cookiecodes';
$_TABLES['dateformats'] = $_DB_table_prefix . 'dateformats';
$_TABLES['usercomment'] = $_DB_table_prefix . 'usercomment';
$_TABLES['userindex'] = $_DB_table_prefix . 'userindex';
$_TABLES['userinfo'] = $_DB_table_prefix . 'userinfo';
$_TABLES['userprefs'] = $_DB_table_prefix . 'userprefs';

// Add missing route into routing table for articles that have page breaks (issue #746)
$_SQL[] = "INSERT INTO {$_TABLES['routes']} (method, rule, route, priority) VALUES (1, '/article/@sid/@page', '/article.php?story=@sid&page=@page', 1000)"; // Priority should default to 120 but we need to mage sure it comes after the route for article print

Expand Down
10 changes: 10 additions & 0 deletions sql/updates/pgsql_2.2.1_to_2.2.2.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
use Geeklog\DAO\UserAttributeDAO;
use Geeklog\Entity\UserAttributeEntity;

global $_DB_table_prefix, $_TABLES;

// The following entries are no longer defined in 'lib-database.php', so define them here
$_TABLES['cookiecodes'] = $_DB_table_prefix . 'cookiecodes';
$_TABLES['dateformats'] = $_DB_table_prefix . 'dateformats';
$_TABLES['usercomment'] = $_DB_table_prefix . 'usercomment';
$_TABLES['userindex'] = $_DB_table_prefix . 'userindex';
$_TABLES['userinfo'] = $_DB_table_prefix . 'userinfo';
$_TABLES['userprefs'] = $_DB_table_prefix . 'userprefs';

// Add missing route into routing table for articles that have page breaks (issue #746)
$_SQL[] = "INSERT INTO {$_TABLES['routes']} (method, rule, route, priority) VALUES (1, '/article/@sid/@page', '/article.php?story=@sid&page=@page', 1000)"; // Priority should default to 120 but we need to mage sure it comes after the route for article print

Expand Down
2 changes: 1 addition & 1 deletion system/classes/Entity/UserAttributeEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ public static function fromArray(array $A, $fromDatabase = true)
$entity->setUid($A['uid']);
$entity->setCommentmode($A['commentmode']);
$entity->setCommentorder($A['commentorder']);
$entity->setCommentlimit($A['commetlimit']);
$entity->setCommentlimit($A['commentlimit']);

$entity->setEtids($A['etids']);
$entity->setNoboxes($A['noboxes']);
Expand Down

0 comments on commit eee4699

Please sign in to comment.