Skip to content

Commit

Permalink
Fixes for setting the default table storage (MySQL 5.5+), reset autho…
Browse files Browse the repository at this point in the history
…r password, page manager fix
  • Loading branch information
brendo committed Mar 9, 2016
1 parent a2755bb commit 5e3bf4f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions symphony/content/content.blueprintspages.php
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,8 @@ public function __actionEdit()
$types = @array_map('trim', $types);
unset($fields['type']);

$fields = array_filter($fields);

$fields['parent'] = ($fields['parent'] != __('None') ? $fields['parent'] : null);
$fields['data_sources'] = is_array($fields['data_sources']) ? implode(',', $fields['data_sources']) : null;
$fields['events'] = is_array($fields['events']) ? implode(',', $fields['events']) : null;
Expand Down
10 changes: 5 additions & 5 deletions symphony/content/content.login.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,18 @@ public function action()
SELECT `id`, `email`, `first_name`
FROM `tbl_authors`
WHERE `email` = ? OR `username` = ?
",
",
array(
$_POST['email'],
$_POST['email'],
$_POST['email']
)
);

if (!empty($author)) {
// Delete all expired tokens
Symphony::Database()->delete('tbl_forgotpass', "
`expiry` < ?", DateTimeObj::getGMT('c')
);
Symphony::Database()->delete('tbl_forgotpass', "`expiry` < ?", array(
DateTimeObj::getGMT('c')
));

// Attempt to retrieve the token that is not expired for this Author ID,
// otherwise generate one.
Expand Down
2 changes: 1 addition & 1 deletion symphony/lib/toolkit/class.mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public function connect($host = null, $user = null, $password = null, $port = '3
MySQL::$_conn_pdo = new Database($config);

// Ensure that the default storage engine is InnoDB:
MySQL::$_conn_pdo->conn->exec('SET storage_engine = "InnoDB"');
MySQL::$_conn_pdo->conn->exec('SET default_storage_engine = "InnoDB"');

This comment has been minimized.

Copy link
@brendo

brendo Mar 30, 2016

Author Member

@nitriques This probably should be backported to 2.x.x as MySQL 5.7 will freak out. default_storage_engine was introduced in MySQL 5.5, so backwards compatibility should be ok.

This comment has been minimized.

Copy link
@nitriques

nitriques Apr 12, 2016

Member

Done in 9363d50. Thanks!


return true;
}
Expand Down
2 changes: 1 addition & 1 deletion symphony/lib/toolkit/class.pagemanager.php
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ public static function fetchPageTypes($page_id = null)
SELECT
type
FROM
`tbl_pages_types` AS pt "
`tbl_pages_types` AS pt "
. $where . "
GROUP BY
pt.type
Expand Down

0 comments on commit 5e3bf4f

Please sign in to comment.