API - XOOPS 2.5.11 Beta 2
By monxoops.fr
page_configsave.php File Reference

Namespaces

namespace  installer
 

Functions

 writeConfigurationFile ($vars, $path, $sourceName, $fileName)
 
 getStats ($filename)
 
 getTmpStats ()
 
 prepStats ($stat)
 
 checkFileWriteablity ($files)
 
 copyConfigDistFiles ($vars)
 

Variables

 $pageHasForm = false
 
 $pageHasHelp = false
 
 $vars =& $_SESSION['settings']
 
if(empty( $vars[ 'ROOT_PATH'])) elseif(empty($vars['DB_HOST'])) $writeFiles
 
 $writeCheck = checkFileWriteablity($writeFiles)
 
if(true===$writeCheck) else
 
 foreach ( $writeCheck as $errorMsg)
 

Function Documentation

◆ checkFileWriteablity()

checkFileWriteablity (   $files)

Attempt to check if a set of files can be written

Parameters
string[]$filesfully qualified file names to check
Returns
string[]|true true if no issues found, array
Here is the call graph for this function:

◆ copyConfigDistFiles()

copyConfigDistFiles (   $vars)

Install working versions of various *.dist.php files to xoops_data/configs/

Parameters
$varsarray of system variables, we care about ROOT_PATH and VAR_PATH keys
Returns
true|string true if all files were copied, otherwise error message

◆ getStats()

getStats (   $filename)

Get file stats

Parameters
string$filenamefile or directory name
Returns
array|false false on error, or array of file stat information
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTmpStats()

getTmpStats ( )

Get file stats on a created temp file

Returns
array|false false on error, or array of file stat information
Here is the call graph for this function:
Here is the caller graph for this function:

◆ prepStats()

prepStats (   $stat)

Get stat() info in a more usable form

Parameters
array$statreturn from PHP stat()
Returns
array selected information gleaned from $stat
Here is the caller graph for this function:

◆ writeConfigurationFile()

writeConfigurationFile (   $vars,
  $path,
  $sourceName,
  $fileName 
)

Copy a configuration file from template, then rewrite with actual configuration values

Parameters
string[]$varsconfig values
string$pathdirectory path where files reside
string$sourceNametemplate file name
string$fileNameconfiguration file name
Returns
true|string true on success, error message on failure

Variable Documentation

◆ $pageHasForm

$pageHasForm = false

◆ $pageHasHelp

$pageHasHelp = false

◆ $vars

$vars =& $_SESSION['settings']

◆ $writeCheck

$writeCheck = checkFileWriteablity($writeFiles)

◆ $writeFiles

if(empty($vars['ROOT_PATH'])) elseif (empty( $vars[ 'DB_HOST'])) $writeFiles
Initial value:
= array(
$vars['ROOT_PATH'] . '/mainfile.php',
$vars['VAR_PATH'] . '/data/secure.php',
)
$vars
Definition: page_configsave.php:35

◆ else

if (true===$writeCheck) else
Initial value:
{
$content = ''
$content
Definition: formdhtmltextarea_preview.php:25

◆ foreach

foreach($writeCheck as $errorMsg) (   $writeCheck as)