Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split controller #575

Merged
merged 12 commits into from Jun 25, 2013
Merged
4 changes: 2 additions & 2 deletions install/upgrade_elk_1-0_mysql.sql
Expand Up @@ -518,7 +518,7 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
/******************************************************************************/

---# Creating likes log table...
CREATE TABLE {$db_prefix}log_likes (
CREATE TABLE IF NOT EXISTS {$db_prefix}log_likes (
action char(1) NOT NULL default '0',
id_target mediumint(8) unsigned NOT NULL default '0',
id_member mediumint(8) unsigned NOT NULL default '0',
Expand All @@ -529,7 +529,7 @@ CREATE TABLE {$db_prefix}log_likes (
---#

---# Creating likes message table...
CREATE TABLE {$db_prefix}message_likes (
CREATE TABLE IF NOT EXISTS {$db_prefix}message_likes (
id_member mediumint(8) unsigned NOT NULL default '0',
id_msg mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (id_msg, id_member)
Expand Down
12 changes: 6 additions & 6 deletions install/upgrade_elk_1-0_postgresql.sql
Expand Up @@ -9,7 +9,7 @@ CREATE SEQUENCE {$db_prefix}member_logins_seq;
---#

---# Creating login history table.
CREATE TABLE {$db_prefix}member_logins (
CREATE TABLE IF NOT EXISTS {$db_prefix}member_logins (
id_login int NOT NULL default nextval('{$db_prefix}member_logins_seq'),
id_member mediumint NOT NULL,
time int NOT NULL,
Expand Down Expand Up @@ -310,7 +310,7 @@ upgrade_query("
--- Adding support for drafts
/******************************************************************************/
---# Creating drafts table.
CREATE TABLE {$db_prefix}user_drafts (
CREATE TABLE IF NOT EXISTS {$db_prefix}user_drafts (
id_draft int unsigned NOT NULL auto_increment,
id_topic int unsigned NOT NULL default '0',
id_board smallint unsigned NOT NULL default '0',
Expand Down Expand Up @@ -486,7 +486,7 @@ WHERE url = 'http://custom.simplemachines.org/packages/mods';
/******************************************************************************/

---# Creating follow-up table...
CREATE TABLE {$db_prefix}follow_ups (
CREATE TABLE IF NOT EXISTS {$db_prefix}follow_ups (
follow_up int NOT NULL default '0',
derived_from int NOT NULL default '0',
PRIMARY KEY (follow_up, derived_from)
Expand All @@ -498,7 +498,7 @@ CREATE TABLE {$db_prefix}follow_ups (
/******************************************************************************/

---# Creating antispam questions table...
CREATE TABLE {$db_prefix}antispam_questions (
CREATE TABLE IF NOT EXISTS {$db_prefix}antispam_questions (
id_question tinyint(4) unsigned NOT NULL auto_increment,
question text NOT NULL default '',
answer text NOT NULL default '',
Expand Down Expand Up @@ -654,7 +654,7 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
/******************************************************************************/

---# Creating likes log table...
CREATE TABLE {$db_prefix}log_likes (
CREATE TABLE IF NOT EXISTS {$db_prefix}log_likes (
action char(1) NOT NULL default '0',
id_target int NOT NULL default '0',
id_member int NOT NULL default '0',
Expand All @@ -668,7 +668,7 @@ CREATE INDEX {$db_prefix}log_likes_log_time ON {$db_prefix}log_likes (log_time);
---#

---# Creating likes message table...
CREATE TABLE {$db_prefix}message_likes (
CREATE TABLE IF NOT EXISTS {$db_prefix}message_likes (
id_member int NOT NULL default '0',
id_msg int NOT NULL default '0',
PRIMARY KEY (id_msg, id_member)
Expand Down
10 changes: 5 additions & 5 deletions install/upgrade_elk_1-0_sqlite.sql
Expand Up @@ -303,7 +303,7 @@ upgrade_query("
--- Adding support for drafts
/******************************************************************************/
---# Creating drafts table.
CREATE TABLE {$db_prefix}user_drafts (
CREATE TABLE IF NOT EXISTS {$db_prefix}user_drafts (
id_draft int unsigned NOT NULL auto_increment,
id_topic int unsigned NOT NULL default '0',
id_board smallint unsigned NOT NULL default '0',
Expand Down Expand Up @@ -479,7 +479,7 @@ WHERE url = 'http://custom.simplemachines.org/packages/mods';
/******************************************************************************/

---# Creating follow-up table...
CREATE TABLE {$db_prefix}follow_ups (
CREATE TABLE IF NOT EXISTS {$db_prefix}follow_ups (
follow_up int NOT NULL default '0',
derived_from int NOT NULL default '0',
PRIMARY KEY (follow_up, derived_from)
Expand All @@ -491,7 +491,7 @@ CREATE TABLE {$db_prefix}follow_ups (
/******************************************************************************/

---# Creating antispam questions table...
CREATE TABLE {$db_prefix}antispam_questions (
CREATE TABLE IF NOT EXISTS {$db_prefix}antispam_questions (
id_question tinyint(4) unsigned NOT NULL auto_increment,
question text NOT NULL default '',
answer text NOT NULL default '',
Expand Down Expand Up @@ -645,7 +645,7 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
/******************************************************************************/

---# Creating likes log table...
CREATE TABLE {$db_prefix}log_likes (
CREATE TABLE IF NOT EXISTS {$db_prefix}log_likes (
action char(1) NOT NULL default '0',
id_target int NOT NULL default '0',
id_member int NOT NULL default '0',
Expand All @@ -659,7 +659,7 @@ CREATE INDEX {$db_prefix}log_likes_log_time ON {$db_prefix}log_likes (log_time);
---#

---# Creating likes message table...
CREATE TABLE {$db_prefix}message_likes (
CREATE TABLE IF NOT EXISTS {$db_prefix}message_likes (
id_member int NOT NULL default '0',
id_msg int NOT NULL default '0',
PRIMARY KEY (id_msg, id_member)
Expand Down
2 changes: 2 additions & 0 deletions sources/Load.php
Expand Up @@ -1451,6 +1451,8 @@ function loadTheme($id_theme = 0, $initialize = true)
if (isset($_REQUEST['xml']))
{
loadLanguage('index+Modifications');
// @todo added because some $settings in template_init are necessary even in xml mode. Maybe move template_init to a settings file?
loadTemplate('index');
loadTemplate('Xml');
Template_Layers::getInstance()->removeAll();
}
Expand Down
2 changes: 1 addition & 1 deletion sources/controllers/Markasread.controller.php
Expand Up @@ -195,7 +195,7 @@ public function action_marktopic()
$earlyMsg = 0;
else
{
$earlyMsg = messageAt((int) $_REQUEST['start'], $topic);
list($earlyMsg) = messageAt((int) $_REQUEST['start'], $topic);
$earlyMsg--;
}

Expand Down