permission issues editing wall-to-wall posts

This commit is contained in:
redmatrix
2015-11-15 19:36:17 -08:00
parent 6ad35e3d84
commit fff30b1c3d
3 changed files with 19 additions and 9 deletions

View File

@@ -531,11 +531,12 @@ function attribute_contains($attr, $s) {
* LOGGER_DATA and LOGGER_ALL.
*
* Since PHP5.4 we get the file, function and line automatically where the logger
* was caleld, so no need to add it to the message anymore.
* was called, so no need to add it to the message anymore.
*
* @param string $msg Message to log
* @param int $level A log level.
*/
function logger($msg, $level = 0) {
// turn off logger in install mode
global $a;
@@ -557,7 +558,13 @@ function logger($msg, $level = 0) {
$where = basename($stack[0]['file']) . ':' . $stack[0]['line'] . ':' . $stack[1]['function'] . ': ';
}
@file_put_contents($logfile, datetime_convert() . ':' . session_id() . ' ' . $where . $msg . PHP_EOL, FILE_APPEND);
$s = datetime_convert() . ':' . session_id() . ' ' . $where . $msg . PHP_EOL;
$pluginfo = array('filename' => $logfile, 'loglevel' => $level, 'message' => $s,'logged' => false);
call_hooks('logger',$pluginfo);
if(! $pluginfo['logged'])
@file_put_contents($logfile, $s, FILE_APPEND);
}
/**