🏡 index : ~doyle/koselig.git

author Jordan Doyle <jordan@doyle.wf> 2016-10-26 23:28:36.0 +00:00:00
committer Jordan Doyle <jordan@doyle.wf> 2016-10-26 23:28:36.0 +00:00:00
commit
6da84014cffe95d73458434358e3eabac8bbeece [patch]
tree
16963a2cfbf28fa607fc2dbd4b69c3e9eb4d747b
parent
e63778895836536ad08647067e423a50418b294f
download
6da84014cffe95d73458434358e3eabac8bbeece.tar.gz

more wp/laravel compatibility tweaks



Diff

 src/Proxy/WordpressDatabase.php | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/Proxy/WordpressDatabase.php b/src/Proxy/WordpressDatabase.php
index af5e14d..1a9b3a9 100644
--- a/src/Proxy/WordpressDatabase.php
+++ b/src/Proxy/WordpressDatabase.php
@@ -36,6 +36,18 @@ class WordpressDatabase extends wpdb
    }

    /**
     * Laravel handles all the connection handling for us including reconnecting
     * so we'll just pretend we're always connected to whatever is calling us.
     *
     * @param bool $allow_bail
     * @return bool
     */
    public function check_connection($allow_bail = true)
    {
        return true;
    }

    /**
     * Set the properties Wordpress expects so it will run queries for us
     * through this class.
     *
@@ -127,11 +139,10 @@ class WordpressDatabase extends wpdb
     * @since 0.71
     *
     * @param string $query Database query
     * @param bool $skipCache
     *
     * @return false|int Number of rows affected/selected or false on error
     */
    public function query($query, $skipCache = false)
    public function query($query)
    {
        if (!$this->ready) {
            $this->check_current_query = true;