Merge branch 'flatpressblog:master' into Akismet-out,-DateChanger-in

This commit is contained in:
Frank Hochmuth 2024-02-03 13:04:01 +01:00 committed by GitHub
commit 61c78261dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 32 additions and 1116 deletions

View File

@ -18,10 +18,11 @@
define('DUMB_MODE_ENABLED', false);
// default file permissions
// change file to 776 and dir to 776 if your webserver "complains"
// https://binary-butterfly.de/artikel/dateirechte-wie-stelle-ich-das-bei-meinem-hoster-ein/
// change file to 666 and dir to 777 if your webserver "complains"
// Note: Lowering the directory and file permissions may result in FlatPress or some additional plugins not working correctly.
define('FILE_PERMISSIONS', 0776);
define('DIR_PERMISSIONS', 0776);
define('FILE_PERMISSIONS', 0666);
define('DIR_PERMISSIONS', 0777);
// first some webserver setup...
@ -34,6 +35,9 @@ define('SESSION_PATH', '');
define('ABS_PATH', dirname(__FILE__) . '/');
// here was blog root in earlier versions. This has been moved to config_load()
// Is required so that the file and directory permissions can be set when executing the setup
define('BASE_DIR', dirname(__FILE__));
// here are default config files
define('FP_DEFAULTS', 'fp-defaults/');

File diff suppressed because it is too large Load Diff

9
docs/spb_db.txt → docs/fp_db.txt Executable file → Normal file
View File

@ -1,9 +1,9 @@
==========================================================
CONSIDERATIONS AROUND SIMPLEPHPBLOG AND ITS STORING SYSTEM
==========================================================
======================================================
CONSIDERATIONS AROUND FLATPRESS AND ITS STORING SYSTEM
======================================================
- SimplePHPBlog flat "db" structure
- FlatPress "db" structure
[$content]
|
@ -33,3 +33,4 @@
the entry, deprived of its extension (.txt) as the name of the directory
which will contain them.

View File

@ -1,36 +1,36 @@
<?php
error_reporting($_SERVER ["SERVER_NAME"] == "localhost" ? E_ALL : 0);
@error_reporting($_SERVER ["SERVER_NAME"] == "localhost" ? E_ALL : 0);
// Changing file/directory permissions recursively
$start_dir = FP_CONTENT; // Starting directory
$start_dir = BASE_DIR; // Starting directory
$perms ['file'] = FILE_PERMISSIONS; // chmod value for files
$perms ['folder'] = DIR_PERMISSIONS; // chmod value for folders
function chmod_file_folder($dir) {
function chmod_r($dir) {
global $perms;
$dh = @opendir($dir);
$dp = @opendir($dir);
while($file = readdir($dp)) {
if (($file == ".") || ($file == ".."))
continue;
if ($dh) {
$fullPath = $dir . '/' . $file;
while (false !== ($file = readdir($dh))) {
if ($file != "." && $file != "..") {
$fullpath = $dir . '/' . $file;
if (!is_dir($fullpath)) {
chmod($fullpath, $perms ['file']);
if(is_dir($fullPath)) {
// echo('DIR:' . $fullPath . "\n");
@chmod($fullPath, $perms ['folder']);
chmod_r($fullPath, $perms ['folder'], $perms ['file']);
} else {
chmod($fullpath, $perms ['folder']);
chmod_file_folder($fullpath);
// echo('FILE:' . $fullPath . "\n");
@chmod($fullPath, $perms ['file']);
}
}
}
closedir($dh);
}
closedir($dp);
}
chmod_r($start_dir, $perms ['folder'], $perms ['file']);
// Sets the local language based on the browser
$language = @$_POST ['language'] ? $_POST ['language'] : $browserLang;
$lf = "lang.$language.php";