Fixed b4 js problem in acp

  • Thread starter Thread starter ragtek
  • Start date Start date
R

ragtek

Guest
As you see the last / is missing....
cachereb.webp

Possible fix:
Rich (BB code):
    protected function processJsUrls(array $jsFiles)
    {
        // add version number to each required file
        foreach ($jsFiles AS &$file)
        {
            $file = $file . (strpos($file, '?') ? '&' : '?') . '_v=' . XenForo_Application::$jsVersion;
        }

        // source XenForo JS from 'js/xenforo/x/' if required
        switch (XenForo_Application::get('options')->uncompressedJs)
        {
            case 1:
                $jsFiles = str_replace('js/xenforo/', 'js/xenforo/full/', $jsFiles);
                break;

            case 2:
                $jsFiles = str_replace('js/xenforo', 'js/xenforo/min/', $jsFiles);
                break;
        }

        // handle custom JS URL
        return preg_replace('#^js/#', XenForo_Application::$javaScriptUrl . '/', $jsFiles);
    }

then it's working in the acp, but in the frontend the url is:
bug2.webp
 
In the upgrade package that I used, I also do not see the fullcache_rebuild.js file.
 
And, if we already have upgraded, should we re-do it? Or can we just replace a file and rebuild caches somehow?
 
If you see message when appling patch: (Stripping trailing CRs from patch.) - and patch not appling.
You are can install tofrodos (in Debian/Ubuntu - sudo apt-get install tofrodos) and use it as:
Code:
serv:# fromdos changeset_5065.diff
serv:# fromdos Abstract.php
serv:# patch < changeset_5065.diff
serv:# todos Abstract.php
 
I hope seeing it visual like this perhaps makes more sense:

Screen shot 2011-10-27 at 8.09.42 PM.webp

You can either manually find the old code, and replace it with the new code.
Or load the old file in a diff handler and parse it with the .diff that Kier provided.
 
So rather than not hearing from the developers at all, who just reply (if you're lucky) pointing to "this is beta, we dont' support it) they (within a couple of minutes) provide a patch .. and you whine about it.
 
Top Bottom