Merge branch 'flatpressblog:master' into Akismet-out,-DateChanger-in
This commit is contained in:
		
						commit
						61c78261dd
					
				
							
								
								
									
										10
									
								
								defaults.php
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								defaults.php
									
									
									
									
									
								
							| @ -18,10 +18,11 @@ | |||||||
| define('DUMB_MODE_ENABLED', false); | define('DUMB_MODE_ENABLED', false); | ||||||
| 
 | 
 | ||||||
| // default file permissions
 | // 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.
 | // Note: Lowering the directory and file permissions may result in FlatPress or some additional plugins not working correctly.
 | ||||||
| define('FILE_PERMISSIONS', 0776); | define('FILE_PERMISSIONS', 0666); | ||||||
| define('DIR_PERMISSIONS', 0776); | define('DIR_PERMISSIONS', 0777); | ||||||
| 
 | 
 | ||||||
| // first some webserver setup...
 | // first some webserver setup...
 | ||||||
| 
 | 
 | ||||||
| @ -34,6 +35,9 @@ define('SESSION_PATH', ''); | |||||||
| define('ABS_PATH', dirname(__FILE__) . '/'); | define('ABS_PATH', dirname(__FILE__) . '/'); | ||||||
| // here was blog root in earlier versions. This has been moved to config_load()
 | // 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
 | // here are default config files
 | ||||||
| define('FP_DEFAULTS', 'fp-defaults/'); | 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
									
								
							
							
						
						
									
										9
									
								
								docs/spb_db.txt → docs/fp_db.txt
									
									
									
									
									
										
										
										Executable file → Normal 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] |     [$content] | ||||||
|         | |         | | ||||||
| @ -33,3 +33,4 @@ | |||||||
|     the entry, deprived of its extension (.txt) as the name of the directory  |     the entry, deprived of its extension (.txt) as the name of the directory  | ||||||
|     which will contain them. |     which will contain them. | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| @ -1,37 +1,37 @@ | |||||||
| <?php | <?php | ||||||
| error_reporting($_SERVER ["SERVER_NAME"] == "localhost" ? E_ALL : 0); | @error_reporting($_SERVER ["SERVER_NAME"] == "localhost" ? E_ALL : 0); | ||||||
| 
 | 
 | ||||||
| // Changing file/directory permissions recursively
 | // 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 ['file'] = FILE_PERMISSIONS; // chmod value for files
 | ||||||
| $perms ['folder'] = DIR_PERMISSIONS; // chmod value for folders
 | $perms ['folder'] = DIR_PERMISSIONS; // chmod value for folders
 | ||||||
| 
 | 
 | ||||||
| function chmod_file_folder($dir) { | function chmod_r($dir) { | ||||||
| 	global $perms; | 	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(is_dir($fullPath)) { | ||||||
| 
 | 			// echo('DIR:' . $fullPath . "\n");
 | ||||||
| 			if ($file != "." && $file != "..") { | 			@chmod($fullPath, $perms ['folder']); | ||||||
| 
 | 			chmod_r($fullPath, $perms ['folder'], $perms ['file']); | ||||||
| 				$fullpath = $dir . '/' . $file; |  | ||||||
| 				if (!is_dir($fullpath)) { |  | ||||||
| 
 |  | ||||||
| 					chmod($fullpath, $perms ['file']); |  | ||||||
| 		} else { | 		} else { | ||||||
| 					chmod($fullpath, $perms ['folder']); | 			// echo('FILE:' . $fullPath . "\n");
 | ||||||
| 					chmod_file_folder($fullpath); | 			@chmod($fullPath, $perms ['file']); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 		} | 	closedir($dp); | ||||||
| 		closedir($dh); |  | ||||||
| 	} |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| $language = @$_POST ['language'] ?$_POST ['language'] : $browserLang; | 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"; | $lf = "lang.$language.php"; | ||||||
| if (!preg_match('|^lang\.[a-z]{2}-[a-z]{2}\.php$|', $lf)) | if (!preg_match('|^lang\.[a-z]{2}-[a-z]{2}\.php$|', $lf)) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Frank Hochmuth
						Frank Hochmuth