Class cModuleSynchronizer
This class synchronized the contents of modul dir with the table $cfg['tab']['mod']. If a modul exist in modul dir but not in $cfg['tab']['mod'] this class will insert the modul in the table.
- cModuleHandler
- cModuleSynchronizer
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Rusmir Jusufovic
Located at classes/module/class.module.synchronizer.php
private
|
#
_syncModule( string $dir, string $oldModulName, string $newModulName )
This method insert a new modul in $cfg['tab']['mod'] table, if the name of modul dont exist |
private
|
#
_renameFiles( string $dir, string $oldModulName, string $newModulName )
Rename css, js and input/output file |
private
boolean
|
#
_renameFileAndDir( string $dir, string $dirNameOld, string $dirNameNew, integer $client )
Rename the Modul files and Modul dir |
public
integer
|
#
compareFileAndModuleTimestamp( )
Compare file change timestemp and the timestemp in ['tab']['mod']. If file had changed make new code :conGenerateCodeForAllArtsUsingMod |
private
integer
|
#
_synchronizeFilesystemAndDb( mixed $db )
If someone delete a moduldir with ftp/ssh. We have a modul in db but not in directory, if the modul in use make a new modul in fileystem but if not clear it from filesystem. |
private
boolean
|
|
public
integer
|
#
synchronize( )
Depending on the client, this method will check the modul dir of the client and if found a Modul(Dir) that not exist in Db-table this method will insert the Modul in Db-table ([tab][mod]). |
private
boolean
|
#
_isExistInTable( mixed $alias, integer $idclient )
This method look in the db-table $cfg['tab']['mod'] for a modul name. If the modul name exist it will return true |
private
|
#
_updateModulnameInDb( string $oldName, string $newName, integer $idclient )
Update the name of module (if the name not allowes) |
private
|
|
public
|
private
integer
|
$_lastIdMod | 0 |
#
The last id of the module that had changed or had added. |
$_cfg,
$_cfgClient,
$_client,
$_description,
$_directories,
$_encoding,
$_encodingStore,
$_fileEncoding,
$_idlang,
$_idmod,
$_input,
$_moduleAlias,
$_output,
$_type
|