Created
October 8, 2015 21:53
-
-
Save josheinstein/5e9def87cc95132dbe75 to your computer and use it in GitHub Desktop.
WARNING -- I made this quick patch because my Brandoo MSSQL Wordpress installation got hosed when my site auto upgraded to 4.2.2. Brandoo no longer supports or updates their abstraction layer, so I, and many others, are SOL. However, making this change to translations.php I was able to log into the dashboard. Everything mostly works, but do your…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// In /wp-content/mu-plugins/wp-db-abstraction/translations/sqlsrv/translations.php, | |
// search for the lines that read: | |
// | |
// // SHOW COLUMNS | |
// if ( stripos($query, 'SHOW COLUMNS FROM ') === 0 ) { | |
// $end_pos = strlen($query); | |
// $param = substr($query, 18, $end_pos - 18); | |
// $param = "'". trim($param, "'") . "'"; | |
// $query = 'SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ' . $param; | |
// } | |
// | |
// Then directly underneath that block, add this code. | |
// SHOW FULL COLUMNS | |
if ( stripos($query, 'SHOW FULL COLUMNS FROM ') === 0 ) { | |
$end_pos = strlen($query); | |
$param = substr($query, 23, $end_pos - 23); | |
$param = "'". trim($param, "'") . "'"; | |
$query = 'SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ' . $param; | |
} | |
// I am not in any way, shape, or form responsible for this code. It might help you get | |
// into your dashboard, or it might give you cancer. I have no idea. But I hope it helps | |
// someone else out there because this was a pain in the ass to troubleshoot. | |
// - Josh Einstein | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment