Log file is not locked during read

A place to report and discuss bugs - please mention CMSimple-version, server, platform and browser version
Post Reply
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Log file is not locked during read

Post by cmb » Tue Jan 21, 2014 3:16 pm

Hello Community,

I already hinted at this issue in another thread, but for the sake of separating concerns, I report this bug here.

While the log file is read in CMSimple_XH 1.6 (XH_logFileView()), it is not properly locked. This is a minor issue, but should be fixed nonetheless. It is sufficient to replace XH_logFileView() in cmsimple/adminfuncs.php with the following:

Code: Select all

function XH_logFileView()
{
    global $pth, $tx;

    return '<h1>' . $tx['title']['log'] . '</h1>'
        . '<pre id="xh_logfile">' . XH_hsc(XH_readFile($pth['file']['log']))
        . '</pre>'
        . '<script type="text/javascript">/* <![CDATA[ */'
        . '(function () {'
        . 'var elt = document.getElementById("xh_logfile");'
        . 'elt.scrollTop = elt.scrollHeight;'
        . '}())'
        . '/* ]]> */</script>';
}
Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply