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
  • Function
  • Tree
  • Deprecated
  • Todo
  1: <?php
  2: 
  3: /**
  4:  * This file contains the CONTENIDO path resolver functions.
  5:  *
  6:  * @package          Core
  7:  * @subpackage       Backend
  8:  * @author           Timo Hummel
  9:  * @copyright        four for business AG <www.4fb.de>
 10:  * @license          http://www.contenido.org/license/LIZENZ.txt
 11:  * @link             http://www.4fb.de
 12:  * @link             http://www.contenido.org
 13:  */
 14: 
 15: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
 16: 
 17: /**
 18:  * Resolves a path using some fuzzy logic.
 19:  *
 20:  * Warning: If you use this function, try to pass a 'good' path. This function
 21:  *          doesn't guarantee that the matches are logically best-matches.
 22:  *
 23:  * This function operates on the category aliases. It compares the given path with the
 24:  * urlpaths generated by function prCreateURLNameLocationString() based on category aliases.
 25:  *
 26:  * @param string $path
 27:  *         Path to resolve
 28:  * @return int
 29:  *         Closest matching category ID (idcat)
 30:  */
 31: function prResolvePathViaURLNames($path) {
 32:     global $cfg, $lang, $client;
 33: 
 34:     $handle = startTiming('prResolvePathViaURLNames', array($path));
 35: 
 36:     // Initialize variables
 37:     $db = cRegistry::getDb();
 38:     $categories = array();
 39:     $results = array();
 40: 
 41:     // Pre-process path
 42:     $path = strtolower(str_replace(' ', '', $path));
 43: 
 44:     // Delete outdated entry in heapcache table, if enabled.
 45:     if ($cfg['pathresolve_heapcache'] == true) {
 46:         $oPathresolveCacheColl = new cApiPathresolveCacheCollection();
 47:         $oPathresolveCache = $oPathresolveCacheColl->fetchLatestByPathAndLanguage($path, $lang);
 48:         if (is_object($oPathresolveCache)) {
 49:             if ($oPathresolveCache->isCacheTimeExpired()) {
 50:                 $cacheIdcat = $oPathresolveCache->get('idcat');
 51:                 $oPathresolveCacheColl->delete($oPathresolveCache->get('idpathresolvecache'));
 52:                 return $cacheIdcat;
 53:             }
 54:         }
 55:     }
 56: 
 57:     // Fetch all category names, build path strings
 58:     // @todo change the where statement for get all languages
 59:     $sql = "SELECT * FROM " . $cfg["tab"]["cat_tree"] . " AS A, " . $cfg["tab"]["cat"] . " AS B, " . $cfg["tab"]["cat_lang"] . " AS C WHERE A.idcat=B.idcat AND B.idcat=C.idcat AND C.idlang=" . (int) $lang . "
 60:             AND C.visible = 1 AND B.idclient=" . (int) $client . " ORDER BY A.idtree";
 61:     $db->query($sql);
 62: 
 63:     $catpath = array();
 64:     while ($db->nextRecord()) {
 65:         $cat_str = '';
 66:         prCreateURLNameLocationString($db->f('idcat'), '/', $cat_str, false, '', 0, 0, true, true);
 67: 
 68:         // Store path
 69:         $catpath[$db->f('idcat')] = $cat_str;
 70:         $catnames[$db->f('idcat')] = $db->f('name');
 71:         $catlevels[$db->f('idcat')] = $db->f('level');
 72:     }
 73: 
 74:     // Compare strings using the similar_text algorithm
 75:     $percent = 0;
 76:     foreach ($catpath as $key => $value) {
 77:         $value = strtolower(str_replace(' ', '', $value));
 78: 
 79:         similar_text($value, $path, $percent);
 80: 
 81:         $firstpath = strpos($value, '/');
 82: 
 83:         if ($firstpath !== 0) {
 84:             $xpath = substr($value, $firstpath);
 85:             $ypath = substr($path, 0, strlen($path) - 1);
 86:             if ($xpath == $ypath) {
 87:                 $results[$key] = 100;
 88:             } else {
 89:                 $results[$key] = $percent;
 90:             }
 91:         } else {
 92:             $results[$key] = $percent;
 93:         }
 94:     }
 95: 
 96:     arsort($results, SORT_NUMERIC);
 97:     reset($results);
 98: 
 99:     endAndLogTiming($handle);
100: 
101:     if ($cfg['pathresolve_heapcache'] == true) {
102:         $oPathresolveCacheColl = new cApiPathresolveCacheCollection();
103:         $oPathresolveCache = $oPathresolveCacheColl->create($path, key($results), $lang, time());
104:     }
105: 
106:     return (int) key($results);
107: }
108: 
109: /**
110:  * Resolves a path using some fuzzy logic.
111:  *
112:  * Warning: If you use this function, try to pass a 'good' path. This function
113:  *          doesn't guarantee that the matches are logically best-matches.
114:  *
115:  * This function operates on the actual category names.
116:  *
117:  * @param string $path
118:  *         Path to resolve
119:  * @param string $iLangCheck
120:  * @return int
121:  *         Closest matching category ID (idcat)
122:  */
123: function prResolvePathViaCategoryNames($path, &$iLangCheck) {
124:     global $cfg, $lang, $client;
125: 
126:     $handle = startTiming('prResolvePathViaCategoryNames', array($path));
127: 
128:     // Initialize variables
129:     $db = cRegistry::getDb();
130:     $categories = array();
131:     $results = array();
132:     $iLangCheckOrg = $iLangCheck;
133: 
134:     // To take only path body
135:     if (preg_match('/^\/(.*)\/$/', $path, $aResults)) {
136:         $aResult = explode('/', $aResults[1]);
137:     } elseif (preg_match('/^\/(.*)$/', $path, $aResults)) {
138:         $aResult = explode('/', $aResults[1]);
139:     } else {
140:         $aResults[1] = $path;
141:     }
142: 
143:     $aResults[1] = strtolower(preg_replace('/-/', ' ', $aResults[1]));
144: 
145:     // Init to Compare, save path in array
146:     $aPathsToCompare = explode('/', $aResults[1]);
147:     $iCountPath = count($aPathsToCompare);
148: 
149:     // init lang id
150:     $iLangCheck = 0;
151: 
152:     // Pre-process path
153:     $path = strtolower(str_replace(' ', '', $path));
154: 
155:     // Fetch all category names, build path strings
156:     // @todo change the where statement for get all languages
157:     $sql = "SELECT * FROM " . $cfg["tab"]["cat_tree"] . " AS A, " . $cfg["tab"]["cat"] . " AS B, " . $cfg["tab"]["cat_lang"] . " AS C WHERE A.idcat=B.idcat AND B.idcat=C.idcat
158:             AND C.visible = 1 AND B.idclient= " . (int) $client . " ORDER BY A.idtree";
159:     $db->query($sql);
160: 
161:     $catpath = array();
162:     $arrLangMatches = array();
163: 
164:     while ($db->nextRecord()) {
165:         $cat_str = '';
166:         $aTemp = '';
167:         $iFor = 0;
168:         $bLang = false;
169: 
170:         // $level is changeless 0!!!
171:         conCreateLocationString($db->f('idcat'), '/', $cat_str, false, '', 0, $db->f('idlang'));
172:         // Store path
173:         $catpath[$db->f('idcat')] = $cat_str;
174:         $catnames[$db->f('idcat')] = $db->f('name');
175:         $catlevels[$db->f('idcat')] = $db->f('level');
176: 
177:         // Init variables for take a language id
178:         $aTemp = strtolower($cat_str);
179:         $aDBToCompare = explode('/', $aTemp);
180:         $iCountDB = count($aDBToCompare);
181:         $iCountDBFor = $iCountDB - 1;
182:         // take min. count of two arrays
183:         ($iCountDB > $iCountPath) ? $iFor = $iCountPath : $iFor = $iCountDB;
184:         $iCountM = $iFor - 1;
185: 
186:         for ($i = 0; $i < $iFor; $i++) {
187:             if ($aPathsToCompare[$iCountM] == $aDBToCompare[$iCountDBFor]) {
188:                 $bLang = true;
189:             } else {
190:                 $bLang = false;
191:             }
192:             $iCountM--;
193:             $iCountDBFor--;
194:             // compare, only if current element is lastone and we are in true path
195:             if ($i == $iFor - 1 && $bLang) {
196:                 $iLangCheck = $db->f('idlang');
197:                 $arrLangMatches[] = $iLangCheck;
198:             }
199:         }
200:     }
201: 
202:     // Suppress wrongly language change if url name can be found in current language
203:     if ($iLangCheckOrg == 0) {
204:         if (in_array($lang, $arrLangMatches)) {
205:             $iLangCheck = $lang;
206:         }
207:     }
208: 
209:     // Compare strings using the similar_text algorithm
210:     $percent = 0;
211:     foreach ($catpath as $key => $value) {
212:         $value = strtolower(str_replace(' ', '', $value));
213:         similar_text($value, $path, $percent);
214:         $results[$key] = $percent;
215:     }
216: 
217:     foreach ($catnames as $key => $value) {
218:         $value = strtolower(str_replace(' ', '', $value));
219:         similar_text($value, $path, $percent);
220: 
221:         // Apply weight
222:         $percent = $percent * $catlevels[$key];
223: 
224:         if ($results[$key] > $percent) {
225:             $results[$key] = $percent;
226:         }
227:     }
228: 
229:     arsort($results, SORT_NUMERIC);
230:     reset($results);
231: 
232:     endAndLogTiming($handle);
233:     return (int) key($results);
234: }
235: 
236: /**
237:  * Recursive function to create an URL name location string.
238:  *
239:  * @param int $idcat
240:  *         ID of the starting category
241:  * @param string $seperator
242:  *         Seperation string
243:  * @param string $cat_str
244:  *         Category location string (by reference)
245:  * @param bool $makeLink
246:  *         create location string with links
247:  * @param string $linkClass
248:  *         stylesheet class for the links
249:  * @param int $firstTreeElementToUse
250:  *         first navigation level location string should be printed out (first level = 0!!)
251:  * @param int $uselang
252:  * @param bool $final
253:  * @param bool $usecache
254:  * @return string
255:  *         location string
256:  */
257: function prCreateURLNameLocationString($idcat, $seperator, & $cat_str, $makeLink = false, $linkClass = '', $firstTreeElementToUse = 0, $uselang = 0, $final = true, $usecache = false) {
258:     global $cfg, $client, $cfgClient, $lang, $sess, $_URLlocationStringCache;
259: 
260:     if ($final == true) {
261:         $cat_str = '';
262:     }
263: 
264:     if ($idcat == 0) {
265:         $cat_str = i18n("Lost and found");
266:         return;
267:     }
268: 
269:     if ($uselang == 0) {
270:         $uselang = $lang;
271:     }
272: 
273:     if ($final == true && $usecache == true) {
274:         if (!is_array($_URLlocationStringCache)) {
275:             $_URLlocationStringCache = prGetCacheFileContent($client, $uselang);
276:         }
277: 
278:         if (array_key_exists($idcat, $_URLlocationStringCache)) {
279:             if ($_URLlocationStringCache[$idcat]['expires'] > time()) {
280:                 $cat_str = $_URLlocationStringCache[$idcat]['name'];
281:                 return;
282:             }
283:         }
284:     }
285: 
286:     $db = cRegistry::getDb();
287: 
288:     $sql = "SELECT
289:                 a.urlname AS urlname,
290:                 a.name    AS name,
291:                 a.idcat AS idcat,
292:                 b.parentid AS parentid,
293:                 c.level as level,
294:                 d.idtpl as idtpl
295:             FROM
296:                 " . $cfg["tab"]["cat_lang"] . " AS a
297:                 LEFT JOIN " . $cfg["tab"]["tpl_conf"] . " AS d on a.idtplcfg  = d.idtplcfg,
298:                 " . $cfg["tab"]["cat"] . " AS b,
299:                 " . $cfg["tab"]["cat_tree"] . " AS c
300:             WHERE
301:                 a.idlang    = " . (int) $uselang . " AND
302:                 b.idclient  = " . (int) $client . " AND
303:                 b.idcat     = " . (int) $idcat . " AND
304:                 a.idcat     = b.idcat AND
305:                 c.idcat     = b.idcat";
306: 
307:     $db->query($sql);
308:     $db->nextRecord();
309: 
310:     if ($db->f('level') >= $firstTreeElementToUse) {
311:         $name = $db->f('urlname');
312: 
313:         if (trim($name) == '') {
314:             $name = $db->f('name');
315:         }
316: 
317:         $parentid = $db->f('parentid');
318:         $idtpl = (int) $db->f('idtpl');
319: 
320:         //create link
321: 
322:         if ($makeLink == true) {
323:             $linkUrl = $sess->url("front_content.php?idcat=$idcat&idtpl=$idtpl");
324:             $name = '<a href="' . $linkUrl . '" class="' . $linkClass . '">' . $name . '</a>';
325:         }
326: 
327:         $tmp_cat_str = $name . $seperator . $cat_str;
328:         $cat_str = $tmp_cat_str;
329:     }
330: 
331:     if ($parentid != 0) {
332:         prCreateURLNameLocationString($parentid, $seperator, $cat_str, $makeLink, $linkClass, $firstTreeElementToUse, $uselang, false, $usecache);
333:     } else {
334:         $sep_length = strlen($seperator);
335:         $str_length = strlen($cat_str);
336:         $tmp_length = $str_length - $sep_length;
337:         $cat_str = substr($cat_str, 0, $tmp_length);
338:     }
339: 
340:     if ($final == true && $usecache == true) {
341:         $_URLlocationStringCache[$idcat]['name'] = $cat_str;
342:         $_URLlocationStringCache[$idcat]['expires'] = time() + 3600;
343: 
344:         prWriteCacheFileContent($_URLlocationStringCache, $client, $uselang);
345:     }
346: }
347: 
348: /**
349:  * Writes path location string cache data file.
350:  *
351:  * @global array $cfgClient
352:  * @param array $data
353:  * @param int $client
354:  * @param int $lang
355:  * @return bool
356:  */
357: function prWriteCacheFileContent($data, $client, $lang) {
358:     global $cfgClient;
359: 
360:     $path = $cfgClient[$client]['cache']['path'];
361:     $filename = "locationstring-url-cache-$lang.txt";
362: 
363:     $res = false;
364:     if (is_writable($path)) {
365:         $res = cFileHandler::write($path . $filename, serialize($data));
366:     }
367: 
368:     return ($res) ? true : false;
369: }
370: 
371: /**
372:  * Get path location string cache data file content.
373:  *
374:  * @global array $cfgClient
375:  * @param int $client
376:  * @param int $lang
377:  * @return array $data
378:  */
379: function prGetCacheFileContent($client, $lang) {
380:     global $cfgClient;
381: 
382:     $path = $cfgClient[$client]['cache']['path'];
383:     $filename = "locationstring-url-cache-$lang.txt";
384: 
385:     if (cFileHandler::exists($path . $filename)) {
386:         $data = unserialize(cFileHandler::read($path . $filename));
387:     } else {
388:         $data = array();
389:     }
390: 
391:     return (is_array($data)) ? $data : array();
392: }
393: 
394: /**
395:  * Deletes path location string cache data file.
396:  *
397:  * @global array $cfgClient
398:  * @param int $client
399:  * @param int $lang
400:  * @return bool
401:  */
402: function prDeleteCacheFileContent($client, $lang) {
403:     global $cfgClient;
404: 
405:     $path = $cfgClient[$client]['cache']['path'];
406:     $filename = "locationstring-url-cache-$lang.txt";
407: 
408:     $res = false;
409:     if (is_writable($path . $filename)) {
410:         $res = @unlink($path . $filename);
411:     }
412: 
413:     return ($res) ? true : false;
414: }
415: 
CMS CONTENIDO 4.9.11 API documentation generated by ApiGen 2.8.0