Implement a class for automatic temporary file handling

And adopt it all over the code.
This commit is contained in:
Alexei Sorokin
2020-09-04 13:15:23 +03:00
committed by Diogo Peralta Cordeiro
parent 590891139f
commit 7fa4d56f05
9 changed files with 626 additions and 362 deletions

View File

@@ -74,7 +74,7 @@ if ($plugin) {
function getVersion()
{
// define('GNUSOCIAL_VERSION', '0.9.1');
$source = file_get_contents(INSTALLDIR . '/lib/common.php');
$source = file_get_contents(INSTALLDIR . '/lib/util/common.php');
if (preg_match('/^\s*define\s*\(\s*[\'"]GNUSOCIAL_VERSION[\'"]\s*,\s*[\'"](.*)[\'"]\s*\)\s*;/m', $source, $matches)) {
return $matches[1];
}