Re: MPAAP: Modify Posts At Anytime Permissions
Reply #35 –
Hi @ahrasis ,
nice to see you back.
I'm with Elkarte 1.1.8.
It's at the end of the files :
/**
* Simple wrapper around chmod
*
* - Checks proper value for mode is supplied
* - Consolidates chmod error suppression to single function
*
* @param string $file
* @param string|int|null $mode
*
* @return bool
*/
function elk_chmod($file, $mode = null)
{
$result = false;
$mode = trim($mode);
if (empty($mode) || !is_numeric($mode))
{
if (is_dir($file))
{
$mode = 0755;
}
else
{
$mode = 0664;
}
}
// Make sure we have a form of 0777 or '777' or '0777' so its safe for intval '8'
if (($mode % 10) >= 8)
$mode = decoct($mode);
line 2932 if ($mode == decoct(octdec($mode)))
$result = @chmod($file, intval($mode, 8));
return $result;
}
I made the test today, but on the same elkarte when i got the error the first time, and i can't reproduce.