11 private static $jsMobileCorePath =
"/bitrix/cache/js/mobileapp_designer/mobile_core.js";
15 self::generateMobileJSFile();
16 return self::$jsMobileCorePath;
19 private static function generateMobileJSFile()
21 $lastModificationHash = Option::get(
"mobileapp",
"mobile_core_modification",
"");
22 $coreMobileFileList = array(
23 "/bitrix/js/main/core/core.js",
24 "/bitrix/js/main/core/core_promise.js",
25 "/bitrix/js/main/core/core_ajax.js",
26 "/bitrix/js/main/core/core_db.js",
27 "/bitrix/js/mobileapp/bitrix_mobile.js",
28 "/bitrix/js/mobileapp/mobile_lib.js"
31 $modificationHash = self::getArrayFilesHash($coreMobileFileList);
35 if($modificationHash == $lastModificationHash && $coreFile->isExists())
41 foreach ($coreMobileFileList as $filePath)
46 $fileContent = $file->getContents();
47 $content.=
"\n\n".$fileContent;
53 $coreFile->open(
"w+");
54 $coreFile->putContents($content);
57 Option::set(
"mobileapp",
"mobile_core_modification", $modificationHash);
63 $fileModificationString =
"";
64 foreach ($fileList as $item)
67 $fileModificationString .= $item.
"|";
70 $file->getModificationTime();
71 $fileModificationString .=
"|".$file->getModificationTime();
75 return md5($fileModificationString);