Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cAjaxRequest
  • cAutoload
  • cBackend
  • cEffectiveSetting
  • cGuiScrollListAlltranslations
  • cHTMLValidator
  • cMailer
  • cModuleFileTranslation
  • cModuleHandler
  • cModuleSearch
  • cModuleSynchronizer
  • cModuleTemplateHandler
  • CodeMirror
  • cPasswordRequest
  • cPermission
  • cRegistry
  • cSystemPurge
  • cSystemtest
  • cTinymce4Configuration
  • cTinyMCE4Editor
  • cTinyMCEEditor
  • cWYSIWYGEditor
  • FrontendList
  • HtmlParser
  • TODOBackendList
  • TreeItem
  • UploadList
  • UploadSearchResultList

Functions

  • addArtspec
  • addSortImages
  • backToMainArea
  • buildArticleSelect
  • buildCategorySelect
  • buildCategorySelectRights
  • buildHeapTable
  • buildStackString
  • buildTree
  • buildUserOrGroupPermsFromRequest
  • callPluginStore
  • cApiCatGetLevelNode
  • cApiImageCheckCachedImageValidity
  • cApiImageCheckImageEditingPosibility
  • cApiImageGetCacheFileName
  • cApiImageGetTargetDimensions
  • cApiImageIsAnimGif
  • cApiImgScale
  • cApiImgScaleGetMD5CacheFile
  • cApiImgScaleHQ
  • cApiImgScaleImageMagick
  • cApiImgScaleLQ
  • cApiIsImageMagickAvailable
  • cApiStrCleanURLCharacters
  • cApiStrNormalizeLineEndings
  • cApiStrRecodeString
  • cApiStrReplaceDiacritics
  • cApiStrTrimAfterWord
  • cApiStrTrimHard
  • cApiStrTrimSentence
  • cDeprecated
  • cDie
  • cError
  • checkLangInClients
  • checkPathInformation
  • cInclude
  • compareUrlStrings
  • conChangeTemplateForCat
  • conCopyArticle
  • conCopyArtLang
  • conCopyContainerConf
  • conCopyContent
  • conCopyMetaTags
  • conCopyTemplateConfiguration
  • conCreateLocationString
  • conDeeperCategoriesArray
  • conDeleteart
  • conEditArt
  • conEditFirstTime
  • conFetchCategoryTree
  • conFlagOnOffline
  • conGenerateCode
  • conGenerateCodeForAllArts
  • conGenerateCodeForAllArtsInCategory
  • conGenerateCodeForAllartsUsingLayout
  • conGenerateCodeForAllartsUsingMod
  • conGenerateCodeForAllArtsUsingTemplate
  • conGenerateCodeForArtInAllCategories
  • conGenerateCodeForClient
  • conGenerateKeywords
  • conGetAvailableMetaTagTypes
  • conGetCategoryArticleId
  • conGetCategoryAssignments
  • conGetContainerConfiguration
  • conGetContentFromArticle
  • conGetHtmlTranslationTable
  • conGetMetaValue
  • conGetTemplateConfigurationIdForArticle
  • conGetTemplateConfigurationIdForCategory
  • conGetTopmostCat
  • conGetUsedModules
  • conHtmlentities
  • conHtmlEntityDecode
  • conHtmlSpecialChars
  • conIsLocked
  • conLock
  • conLockBulkEditing
  • conMakeArticleIndex
  • conMakeCatOnline
  • conMakeInlineScript
  • conMakeOnline
  • conMakeOnlineBulkEditing
  • conMakePublic
  • conMakeStart
  • conMoveArticles
  • conPhp54Check
  • conRemoveOldCategoryArticle
  • conSaveContentEntry
  • conSetCodeFlag
  • conSetCodeFlagBulkEditing
  • conSetMetaValue
  • conSyncArticle
  • copyRightsForElement
  • createBulkEditingFunction
  • createRandomName
  • createRightsForElement
  • cWarning
  • dbGetColumns
  • dbGetIndexes
  • dbGetPrimaryKeyName
  • dbTableExists
  • dbUpgradeTable
  • defineIfNotDefined
  • deleteArtspec
  • deleteRightsForElement
  • deleteSystemProperty
  • displayDatetime
  • emptyLogFile
  • endAndLogTiming
  • extractNumber
  • generateDisplayFilePath
  • generateJs
  • getAllClientsAndLanguages
  • getArtLang
  • getArtspec
  • getAvailableContentTypes
  • getCanonicalDay
  • getCanonicalMonth
  • getDirectorySize
  • getEffectiveSetting
  • getEffectiveSettingsByType
  • getEncodingByLanguage
  • getFileContents
  • getFileInformation
  • getFileType
  • getGroupOrUserName
  • getIDForArea
  • getJsHelpContext
  • getLanguageNamesByClient
  • getLanguagesByClient
  • getmicrotime
  • getNamedFrame
  • getParam
  • getParentAreaId
  • getSearchResults
  • getStrExpandCollapseButton
  • getSystemProperties
  • getSystemPropertiesByType
  • getSystemProperty
  • getTemplateSelect
  • getUplExpandCollapseButton
  • htmldecode
  • htmlentities_iso88592
  • humanReadableSize
  • includePlugins
  • insertEmptyStrRow
  • ipMatch
  • isAlphanumeric
  • isArchive
  • isArtInMultipleUse
  • isFunctionDisabled
  • isGroup
  • isIPv4
  • isRunningFromWeb
  • isStartArticle
  • isUtf8
  • isValidMail
  • langActivateDeactivateLanguage
  • langDeleteLanguage
  • langEditLanguage
  • langGetTextDirection
  • langNewLanguage
  • langRenameLanguage
  • layDeleteLayout
  • layEditLayout
  • machineReadableSize
  • mailLogBulkEditingFunctions
  • mailLogDecodeAddresses
  • markSubMenuItem
  • mask
  • modDeleteModule
  • modEditModule
  • phpInfoToHtml
  • plugin_include
  • prCreateURLNameLocationString
  • prDeleteCacheFileContent
  • prGetCacheFileContent
  • prResolvePathViaCategoryNames
  • prResolvePathViaURLNames
  • prWriteCacheFileContent
  • putFileContents
  • recursiveCopy
  • removeFileInformation
  • renderBackendBreadcrumb
  • renderLabel
  • renderSelectProperty
  • renderTextProperty
  • saveGroupRights
  • saveRights
  • scanDirectory
  • scanPlugins
  • sendEncodingHeader
  • set_magic_quotes_gpc
  • setArtspecDefault
  • setArtspecOnline
  • setSystemProperty
  • showTree
  • startTiming
  • statCreateLocationString
  • statDisplayTopChooser
  • statDisplayYearlyTopChooser
  • statGetAvailableMonths
  • statGetAvailableYears
  • statResetStatistic
  • statsArchive
  • statsDisplayInfo
  • statsOverviewAll
  • statsOverviewTop
  • statsOverviewTopYear
  • statsOverviewYear
  • strAssignTemplate
  • strBuildSqlValues
  • strCheckTreeForErrors
  • strCopyCategory
  • strCopyTree
  • strDeeperCategoriesArray
  • strDeleteCategory
  • strHasArticles
  • strHasStartArticle
  • strMakePublic
  • strMakeVisible
  • strMoveCatTargetallowed
  • strMoveDownCategory
  • strMoveSubtree
  • strMoveUpCategory
  • strNewCategory
  • strNewTree
  • strNextBackwards
  • strNextDeeper
  • strNextDeeperAll
  • strNextPost
  • strOrderedPostTreeList
  • strRemakeTreeTable
  • strRenameCategory
  • strRenameCategoryAlias
  • strSortPrePost
  • strSyncCategory
  • systemHavePerm
  • tplAutoFillModules
  • tplBrowseLayoutForContainers
  • tplcfgDuplicate
  • tplDeleteTemplate
  • tplDuplicateTemplate
  • tplEditTemplate
  • tplGetContainerDefault
  • tplGetContainerMode
  • tplGetContainerName
  • tplGetContainerNumbersInLayout
  • tplGetContainerTypes
  • tplGetInUsedData
  • tplIsTemplateInUse
  • tplPreparseLayout
  • tplProcessSendContainerConfiguration
  • updateClientCache
  • updateFileInformation
  • uplCreateFriendlyName
  • uplDirectoryListRecursive
  • uplGetDirectoriesToExclude
  • uplGetFileExtension
  • uplGetFileIcon
  • uplGetFileTypeDescription
  • uplGetThumbnail
  • uplHasFiles
  • uplHasSubdirs
  • uplmkdir
  • uplRecursiveDBDirectoryList
  • uplRecursiveDirectoryList
  • uplRenameDirectory
  • uplSearch
  • uplSyncDirectory
  • uplSyncDirectoryDBFS
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  1: <?php
  2: 
  3: /**
  4:  * This file contains the module synchronizer class.
  5:  *
  6:  * @todo refactor documentation
  7:  *
  8:  * @package    Core
  9:  * @subpackage Backend
 10:  * @author     Rusmir Jusufovic
 11:  * @copyright  four for business AG <www.4fb.de>
 12:  * @license    http://www.contenido.org/license/LIZENZ.txt
 13:  * @link       http://www.4fb.de
 14:  * @link       http://www.contenido.org
 15:  */
 16: 
 17: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
 18: 
 19: cInclude('includes', 'functions.api.string.php');
 20: cInclude('includes', 'functions.con.php');
 21: 
 22: /**
 23:  * This class synchronized the contents of modul dir with the table
 24:  * $cfg['tab']['mod']. If a modul exist in modul dir but not in
 25:  * $cfg['tab']['mod'] this class will insert the modul in the table.
 26:  *
 27:  * @package    Core
 28:  * @subpackage Backend
 29:  */
 30: class cModuleSynchronizer extends cModuleHandler {
 31: 
 32:     /**
 33:      * The last id of the module that had changed or had added.
 34:      *
 35:      * @var int
 36:      */
 37:     private $_lastIdMod = 0;
 38: 
 39:     /**
 40:      * This method insert a new modul in $cfg['tab']['mod'] table, if
 41:      * the name of modul dont exist
 42:      *
 43:      * @param string $dir
 44:      * @param string $oldModulName
 45:      * @param string $newModulName
 46:      */
 47:     private function _syncModule($dir, $oldModulName, $newModulName) {
 48:         global $client;
 49:         // if modul dont exist in the $cfg['tab']['mod'] table.
 50:         if ($this->_isExistInTable($oldModulName, $client) == false) {
 51:             // add new Module in db-tablle
 52:             $this->_addModule($newModulName);
 53:             cRegistry::appendLastOkMessage(sprintf(i18n('Module %s successfully synchronized'), $newModulName));
 54:         } else {
 55:             // update the name of the module
 56:             if ($oldModulName != $newModulName) {
 57:                 $this->_updateModulnameInDb($oldModulName, $newModulName, $client);
 58:             }
 59:         }
 60:     }
 61: 
 62:     /**
 63:      * Rename css, js and input/output file
 64:      *
 65:      * @param string $dir
 66:      * @param string $oldModulName
 67:      * @param string $newModulName
 68:      */
 69:     private function _renameFiles($dir, $oldModulName, $newModulName) {
 70:         if (cFileHandler::exists($dir . $newModulName . '/' . $this->_directories['php'] . $oldModulName . '_input.php') == true) {
 71:             rename($dir . $newModulName . '/' . $this->_directories['php'] . $oldModulName . '_input.php', $dir . $newModulName . '/' . $this->_directories['php'] . $newModulName . '_input.php');
 72:         }
 73: 
 74:         if (cFileHandler::exists($dir . $newModulName . '/' . $this->_directories['php'] . $oldModulName . '_output.php') == true) {
 75:             rename($dir . $newModulName . '/' . $this->_directories['php'] . $oldModulName . '_output.php', $dir . $newModulName . '/' . $this->_directories['php'] . $newModulName . '_output.php');
 76:         }
 77: 
 78:         if (cFileHandler::exists($dir . $newModulName . '/' . $this->_directories['css'] . $oldModulName . '.css') == true) {
 79:             rename($dir . $newModulName . '/' . $this->_directories['css'] . $oldModulName . '.css', $dir . $newModulName . '/' . $this->_directories['css'] . $newModulName . '.css');
 80:         }
 81: 
 82:         if (cFileHandler::exists($dir . $newModulName . '/' . $this->_directories['js'] . $oldModulName . '.js') == true) {
 83:             rename($dir . $newModulName . '/' . $this->_directories['js'] . $oldModulName . '.js', $dir . $newModulName . '/' . $this->_directories['js'] . $newModulName . '.js');
 84:         }
 85:     }
 86: 
 87:     /**
 88:      * Rename the Modul files and Modul dir
 89:      *
 90:      * @param string $dir
 91:      *         path the the moduls
 92:      * @param string $dirNameOld
 93:      *         old dir name
 94:      * @param string $dirNameNew
 95:      *         new dir name
 96:      * @param int $client
 97:      *         idclient
 98:      * @return bool
 99:      *         true on success or false on failure
100:      */
101:     private function _renameFileAndDir($dir, $dirNameOld, $dirNameNew, $client) {
102:         if (rename($dir . $dirNameOld, $dir . $dirNameNew) == FALSE) {
103:             return false;
104:         } else { // change names of the files
105:             $this->_renameFiles($dir, $dirNameOld, $dirNameNew);
106:         }
107:         return true;
108:     }
109: 
110:     /**
111:      * Compare file change timestemp and the timestemp in ['tab']['mod'].
112:      * If file had changed make new code :conGenerateCodeForAllArtsUsingMod
113:      *
114:      * @return int
115:      *         id of last update module
116:      */
117:     public function compareFileAndModuleTimestamp() {
118:         global $cfgClient;
119: 
120:         $synchLock = 0;
121: 
122:         $sql = sprintf('SELECT UNIX_TIMESTAMP(mod1.lastmodified) AS lastmodified,mod1.idclient,description,type, mod1.name, mod1.alias, mod1.idmod FROM %s AS mod1 WHERE mod1.idclient = %s', $this->_cfg['tab']['mod'], $this->_client);
123: 
124:         $db = cRegistry::getDb();
125:         $db->query($sql);
126:         $retIdMod = 0;
127: 
128:         while ($db->nextRecord()) {
129:             $showMessage = false;
130: 
131:             $modulePath = $cfgClient[$db->f('idclient')]['module']['path'] . $db->f('alias') . '/';
132:             $modulePHP = $modulePath . $this->_directories['php'] . $db->f('alias');
133: 
134:             $lastmodified = $db->f('lastmodified');
135: 
136:             $lastmodInput = $lastmodOutput = 0;
137: 
138:             if (cFileHandler::exists($modulePHP . '_input.php')) {
139:                 $lastmodInput = filemtime($modulePHP . '_input.php');
140:             }
141: 
142:             if (cFileHandler::exists($modulePHP . '_output.php')) {
143:                 $lastmodOutput = filemtime($modulePHP . '_output.php');
144:             }
145: 
146:             if (cFileHandler::exists($modulePath . "info.xml")) {
147:                 $lastModInfo = filemtime($modulePath . "info.xml");
148:                 if ($lastModInfo > $lastmodified) {
149:                     $modInfo = cXmlBase::xmlStringToArray(cFileHandler::read($modulePath . "info.xml"));
150:                     $mod = new cApiModule($db->f("idmod"));
151:                     if ($modInfo["description"] != $mod->get("description")) {
152:                         $mod->set("description", $modInfo["description"]);
153:                         $this->setLastModified($lastModInfo, $db->f('idmod'));
154:                     }
155:                     if ($modInfo["type"] != $mod->get("type")) {
156:                         $mod->set("type", $modInfo["type"]);
157:                         $this->setLastModified($lastModInfo, $db->f('idmod'));
158:                     }
159: 
160:                     if ($modInfo["name"] != $mod->get("name")) {
161:                         $mod->set("name", $modInfo["name"]);
162:                         $this->setLastModified($lastModInfo, $db->f('idmod'));
163:                     }
164: 
165:                     if ($modInfo["alias"] != $mod->get("alias")) {
166:                         $mod->set("alias", $modInfo["alias"]);
167:                         $this->setLastModified($lastModInfo, $db->f('idmod'));
168:                     }
169:                     $mod->store();
170:                     $synchLock = 1;
171:                     $showMessage = true;
172:                 }
173:             }
174: 
175:             $lastmodabsolute = max($lastmodInput, $lastmodOutput);
176:             if ($lastmodified < $lastmodabsolute) {
177:                 // update
178:                 $synchLock = 1;
179:                 $this->setLastModified($lastmodabsolute, $db->f('idmod'));
180:                 conGenerateCodeForAllartsUsingMod($db->f('idmod'));
181:                 $showMessage = true;
182:             }
183: 
184:             if (($idmod = $this->_synchronizeFilesystemAndDb($db)) != 0) {
185:                 $retIdMod = $idmod;
186:             }
187: 
188:             if ($showMessage) {
189:                 cRegistry::appendLastOkMessage(sprintf(i18n('Module %s successfully synchronized'), $db->f('name')));
190:             }
191:         }
192: 
193:         if ($synchLock == 0) {
194:             cRegistry::addInfoMessage(i18n('All modules are already synchronized'));
195:         }
196: 
197:         // we need it for the update of moduls on the left site (module/backend)
198:         return $retIdMod;
199:     }
200: 
201:     /**
202:      * If someone delete a moduldir with ftp/ssh.
203:      * We have a modul
204:      * in db but not in directory, if the modul in use make a new modul in
205:      * fileystem but if not
206:      * clear it from filesystem.
207:      *
208:      * @param cDb $db
209:      * @return int
210:      *         id of last update module
211:      */
212:     private function _synchronizeFilesystemAndDb($db) {
213:         $returnIdMod = 0;
214:         $this->initWithDatabaseRow($db);
215:         // modul dont exist in filesystem
216:         if ($this->modulePathExists() == false) {
217:             $modul = new cApiModule($db->f('idmod'));
218:             $returnIdMod = $db->f('idmod');
219:             if ($modul->moduleInUse($db->f('idmod')) == true) {
220:                 // modul in use, make new modul in filesystem
221:                 if ($this->createModule() == false) {
222:                     $notification = new cGuiNotification();
223:                     $notification->displayNotification('error', i18n("Can not create module") . " " . $db->f('name'));
224:                 }
225:             } else {
226:                 // modul not in use, delete it
227:                 $sql = sprintf('DELETE  FROM %s WHERE idmod = %s AND idclient = %s', $this->_cfg['tab']['mod'], $db->f('idmod'), $this->_client);
228:                 $myDb = cRegistry::getDb();
229:                 $myDb->query($sql);
230:             }
231:         }
232:         return $returnIdMod;
233:     }
234: 
235:     /**
236:      * Depending on the client, this method
237:      * will check the modul dir of the client and if found
238:      * a Modul(Dir) that not exist in Db-table this method will
239:      * insert the Modul in Db-table ([tab][mod]).
240:      *
241:      * @return int
242:      *         last id of synchronized module
243:      */
244:     public function synchronize() {
245:         global $cfgClient;
246: 
247:         // get the path to the modul dir from the client
248:         $dir = $cfgClient[$this->_client]['module']['path'];
249: 
250:         if (is_dir($dir)) {
251:             if (false !== ($handle = cDirHandler::read($dir))) {
252:                 foreach ($handle as $file) {
253:                     if (false === cFileHandler::fileNameBeginsWithDot($file) && is_dir($dir . $file . '/')) {
254:                         $newFile = cString::cleanURLCharacters($file);
255:                         // dir is ok
256:                         if ($newFile == $file) {
257:                             $this->_syncModule($dir, $file, $newFile);
258:                         } else { // dir not ok (with not allowed characters)
259:                             if (is_dir($dir . $newFile)) { // exist the new dir
260:                                 // name?
261:                                 // make new dirname
262:                                 $newDirName = $newFile . substr(md5(time() . rand(0, time())), 0, 4);
263: 
264:                                 // rename
265:                                 if ($this->_renameFileAndDir($dir, $file, $newDirName, $this->_client) != false) {
266:                                     $this->_syncModule($dir, $file, $newDirName);
267:                                 }
268:                             } else { // $newFile (dir) not exist
269:                                 // rename dir old
270:                                 if ($this->_renameFileAndDir($dir, $file, $newFile, $this->_client) != false) {
271:                                     $this->_syncModule($dir, $file, $newFile);
272:                                 }
273:                             }
274:                         }
275:                     }
276:                 }
277:             }
278:         }
279: 
280:         // last Modul Id that will refresh the windows /modul overview
281:         return $this->_lastIdMod;
282:     }
283: 
284:     /**
285:      * This method look in the db-table $cfg['tab']['mod'] for a modul
286:      * name.
287:      * If the modul name exist it will return true
288:      *
289:      * @param string $alias
290:      * @param int $idclient
291:      *         idclient
292:      * @return bool
293:      *         if a modul with the $name exist in the $cfg['tab']['mod'] table
294:      *         return true else false
295:      */
296:     private function _isExistInTable($alias, $idclient) {
297:         $db = cRegistry::getDb();
298: 
299:         // Select depending from idclient all moduls wiht the name $name
300:         $sql = sprintf("SELECT * FROM %s WHERE alias='%s' AND idclient=%s", $this->_cfg['tab']['mod'], $alias, $idclient);
301: 
302:         $db->query($sql);
303: 
304:         // a record is found
305:         if ($db->nextRecord()) {
306:             return true;
307:         } else {
308:             return false;
309:         }
310:     }
311: 
312:     /**
313:      * Update the name of module (if the name not allowes)
314:      *
315:      * @param string $oldName
316:      *         old name
317:      * @param string $newName
318:      *         new module name
319:      * @param int $idclient
320:      *         id of client
321:      */
322:     private function _updateModulnameInDb($oldName, $newName, $idclient) {
323:         $db = cRegistry::getDb();
324: 
325:         // Select depending from idclient all modules wiht the name $name
326:         $sql = sprintf("SELECT * FROM %s WHERE alias='%s' AND idclient=%s", $this->_cfg['tab']['mod'], $oldName, $idclient);
327: 
328:         $db->query($sql);
329: 
330:         // a record is found
331:         if ($db->nextRecord()) {
332:             $sqlUpdateName = sprintf("UPDATE %s SET alias='%s' WHERE idmod=%s", $this->_cfg['tab']['mod'], $newName, $db->f('idmod'));
333:             $db->query($sqlUpdateName);
334:             return;
335:         }
336:     }
337: 
338:     /**
339:      * This method add a new Modul in the table $cfg['tab']['mod'].
340:      *
341:      * @param string $name
342:      *         name of the new module
343:      */
344:     private function _addModule($name) {
345: 
346:         // initializing variables
347:         $client = cRegistry::getClientId();
348:         $cfgClient = cRegistry::getClientConfig($client);
349: 
350:         // initializing module class
351:         $oModColl = new cApiModuleCollection();
352: 
353:         // get module path
354:         $modulePath = $cfgClient['module']['path'] . $name . '/';
355: 
356:         // get module type
357:         $modInfo = cXmlBase::xmlStringToArray(cFileHandler::read($modulePath . 'info.xml'));
358: 
359:         // create mew module
360:         $mod = $oModColl->create($modInfo['name'], $client, $modInfo['alias'], $modInfo['type']);
361: 
362:         if (is_object($mod)) {
363:             // save the last id from modul
364:             $this->_lastIdMod = $mod->get('idmod');
365:         }
366:     }
367: 
368:     /**
369:      * Update the con_mod, the field lastmodified
370:      *
371:      * @param int $timestamp
372:      *         timestamp of last modification
373:      * @param int $idmod
374:      *         id of module
375:      */
376:     public function setLastModified($timestamp, $idmod) {
377:         $oMod = new cApiModule((int) $idmod);
378:         if ($oMod->isLoaded()) {
379:             $oMod->set('lastmodified', date('Y-m-d H:i:s', $timestamp));
380:             $oMod->store();
381:         }
382:     }
383: 
384: }
385: 
CMS CONTENIDO 4.9.11 API documentation generated by ApiGen 2.8.0