Lines Matching refs:offlineConf
12 $offlineConf = array(); variable
18 $offlineConf['offlineMode'] = strtolower(htmlentities(strip_tags(stripslashes($_REQUEST['offlineMod…
20 $offlineConf['pathDelimiterStr'] = strstr(PHP_OS, 'WIN') ? "\\" : "/";
29 …E__) . $offlineConf['pathDelimiterStr'] . '..' . $offlineConf['pathDelimiterStr'] . '..' . $offlin…
48 delete_old_tmp_session_directory($offlineConf['absolutePathToTmpSessionDirStr']);
51 create_directory($offlineConf['absolutePathToTmpSessionDirStr'], 0777);
71 delete_old_tmp_session_directory($offlineConf['absolutePathToTmpSessionDirStr']);
92 global $offlineConf;
95 $offlineConf['logWriteToFile'] = true;
96 $offlineConf['logPrintToScreen'] = true;
97 $offlineConf['logDirectory'] = dirname(__FILE__);
98 $offlineConf['logDefaultFileName'] = 'offline.log';
101 delete_file($offlineConf['logDirectory'] . '/' . $offlineConf['logDefaultFileName'], false);
126 global $offlineConf;// Variables for offline plugin
132 …'plugin']['offline'][$optionStr]) ? $offlineConf[$optionStr] = $conf['plugin']['offline'][$optionS…
133 log_msg(__LINE__, $optionStr . ' = ' . $offlineConf[$optionStr]);
136 …offlineConf['absolutePathToDokuwikiDirStr'] = dirname(__FILE__) . $offlineConf['pathDelimiter…
137 $offlineConf['absolutePathToOfflinePluginDirStr'] = dirname(__FILE__);
138 …$offlineConf['absolutePathToDataDirStr'] = $offlineConf['absolutePathToDokuwikiDirStr'] .…
139 …offlineConf['absolutePathToMediaDirStr'] = $offlineConf['absolutePathToDokuwikiDirStr'] . …
140 …offlineConf['absolutePathToPagesDirStr'] = $offlineConf['absolutePathToDokuwikiDirStr'] . …
141 …offlineConf['absolutePathToTmpDirStr'] = $offlineConf['absolutePathToDokuwikiDirStr'] . …
143 …offlineConf['absolutePathToTmpSessionDirStr'] = $offlineConf['absolutePathToDokuwikiDirStr'] . …
144 $offlineConf['pageExtensionStr'] = 'txt';
146 if ($offlineConf['dokuwikiRelativePath'] != '') {
147 …$offlineConf['dokuwikiBaseUrlStr'] = $offlineConf['dokuwikiProtocol'] . '://' . $of…
149 …$offlineConf['dokuwikiBaseUrlStr'] = $offlineConf['dokuwikiProtocol'] . '://' . $of…
151 …$offlineConf['dokuwikiShowPageUrlStr'] = $offlineConf['dokuwikiBaseUrlStr'] . '/doku.ph…
152 $offlineConf['dokuwikiExportCommandSuffixStr'] = '&do=export_offline';
153 $offlineConf['wgetCommandStr'] = assemble_wget_command();
154 $offlineConf['pageDirectoriesArr'] = array();
155 $offlineConf['wgetCommandsArr'] = array();
156 $offlineConf['mediaDirectoriesArr'] = array();
157 $offlineConf['mediaFilesSourceAndTargetArr'] = array();
160 foreach ($offlineConf as $key => $value) {
180 global $offlineConf;
183 retrieve_page_tree($offlineConf['absolutePathToPagesDirStr']);
184 log_msg(__LINE__, join("\n", $offlineConf['wgetCommandsArr']));
186 foreach ($offlineConf['pageDirectoriesArr'] as $currentDirStr => $count) {
187 …create_directory($offlineConf['absolutePathToTmpSessionDirStr'] . $offlineConf['pathDelimiterStr']…
190 foreach ($offlineConf['wgetCommandsArr'] as $currentWgetCommandStr) {
192 if ($offlineConf['offlineMode'] != 'dryrun') system($currentWgetCommandStr);
194 unset($offlineConf['wgetCommandsArr']);
211 global $offlineConf;
215 …if (is_dir($pathStr . $offlineConf['pathDelimiterStr'] . $element) && $element != "." && $element …
216 $array[$element] = retrieve_page_tree($pathStr . $offlineConf['pathDelimiterStr'] . $element);
218 $array[] = $pathStr . $offlineConf['pathDelimiterStr'] . $element;
219 …offlineConf['dokuwikiShowPageUrlStr'] . convert_absolute_file_system_path_to_relative_dokuwiki_pat…
220 …hPathStr = str_replace($offlineConf['absolutePathToDataDirStr'] . $offlineConf['pathDelimiterStr']…
221 …$tmpOutputFilenameWithPathStr = '"' . $offlineConf['absolutePathToTmpSessionDirStr'] . $offlineCon…
222 …$offlineConf['wgetCommandsArr'][] = $offlineConf['wgetCommandStr'] . ' ' . $tmpDokuwikiUrlStr . ' …
223 …$offlineConf['pageDirectoriesArr'][str_replace($offlineConf['absolutePathToDataDirStr'] . $offline…
224 $offlineConf['indexHierarchicalArr'][] = $tmpRelativeFilenameWithPathStr;
226 $offlineConf['indexAlphabeticalArr'][$element] = $tmpRelativeFilenameWithPathStr;
255 global $offlineConf;
257 …$elementStr = str_replace($offlineConf['absolutePathToPagesDirStr'] . $offlineConf['pathDelimiterS…
258 $elementStr = ereg_replace('^(.*)\.' . $offlineConf['pageExtensionStr'] . '$', '\\1', $elementStr);
259 $elementStr = str_replace($offlineConf['pathDelimiterStr'], ':', $elementStr);
270 global $offlineConf;
273 check_existence($offlineConf['wgetPathToBinary'], 'file');
275 if (($offlineConf['wgetHttpUser'] != '') || ($offlineConf['wgetHttpPasswd'] != '')) {
276 …$commandStr = ' --http-user="' . $offlineConf['wgetHttpUser'] . '" --http-passwd="' . $offlineCon…
279 $commandStr = escapeshellcmd($offlineConf['wgetPathToBinary'] . ' --proxy=off ' . $commandStr);
291 global $offlineConf;
294 if ($offlineConf['template'] == 'default') {
296 …download_css_files($offlineConf['absolutePathToTmpSessionDirStr'], $offlineConf['wgetCommandStr']);
299 copy_css_files($offlineConf['absolutePathToTmpSessionDirStr'], $offlineConf['template']);
309 global $offlineConf;
313 create_directory($absolutePathToTmpDirStr . $offlineConf['pathDelimiterStr'] . 'css', 0777);
319 …offlineConf['wgetCommandStr'] . ' "' . $offlineConf['dokuwikiBaseUrlStr'] . $currentCssSubPathStr …
321 if ($offlineConf['offlineMode'] != 'dryrun') system($currentWgetCommandStr);
331 global $offlineConf;
335 create_directory($absolutePathToTmpDirStr . $offlineConf['pathDelimiterStr'] . 'css', 0777);
337 …offlineConf['absolutePathToOfflinePluginDirStr'] . $offlineConf['pathDelimiterStr'] . 'ui' . $offl…
338 …ilenameWithPathStr = $absolutePathToTmpDirStr . $offlineConf['pathDelimiterStr'] . 'css' . $offlin…
355 global $offlineConf;
363 $singleDirectoriesArr = explode($offlineConf['pathDelimiterStr'] , $dirStr);
369 $singleDirectoriesArr = explode($offlineConf['pathDelimiterStr'] , $dirStr);
374 $currentDirStr .= $offlineConf['pathDelimiterStr'] . $singleDirectoriesArr[$d];
377 if ($offlineConf['offlineMode'] != 'dryrun') {
402 global $offlineConf;
405 if ($offlineConf['offlineMode'] != 'dryrun') {
420 global $offlineConf;
424 if ($offlineConf['offlineMode'] != 'dryrun') {
438 global $offlineConf;
442 if ($offlineConf['offlineMode'] != 'dryrun') {
495 global $offlineConf;
500 …if (is_dir($pathStr . $offlineConf['pathDelimiterStr'] . $element) && $element != "." && $element …
501 … $offlineConf['directoriesToDeleteArr'][] = $pathStr . $offlineConf['pathDelimiterStr'] . $element;
502 …$array[$element] = delete_tmp_session_tree($pathStr . $offlineConf['pathDelimiterStr'] . $element);
503 remove_directory($pathStr . $offlineConf['pathDelimiterStr'] . $element);
506 delete_file($pathStr . $offlineConf['pathDelimiterStr'] . $element);
507 $array[] = $pathStr . $offlineConf['pathDelimiterStr'] . $element;
521 global $offlineConf;
542 global $offlineConf;
546 if ($offlineConf['offlineMode'] != 'dryrun') {
563 global $offlineConf;
567 if (($offlineConf['archiverPathToBinary'] != '') && ($offlineConf['archiverOptions'] != '')) {
568 …log_msg(__LINE__, 'Changing working directory to "' . $offlineConf['absolutePathToTmpDirStr'] . '"…
569 if (!chdir($offlineConf['absolutePathToTmpDirStr'])) {
570 …log_msg(__LINE__, 'Could not change directory to "' . $offlineConf['absolutePathToTmpDirStr'] . '"…
573 …$commandStr = escapeshellcmd($offlineConf['archiverPathToBinary'] . ' ' . $offlineConf['archiverOp…
574 …$commandStr .= ' "' . dirname(__FILE__) . $offlineConf['pathDelimiterStr'] . 'offline.zip" "offlin…
575 …$commandStr .= $offlineConf['logDirectory'] . $offlineConf['pathDelimiterStr'] . $offlineConf['log…
577 if ($offlineConf['offlineMode'] != 'dryrun') system($commandStr);
595 global $offlineConf;
598 retrieve_media_tree($offlineConf['absolutePathToMediaDirStr']);
599 log_msg(__LINE__, '--' . join("\n--", array_keys($offlineConf['mediaDirectoriesArr'])));
601 foreach ($offlineConf['mediaDirectoriesArr'] as $currentDirStr => $count) {
602 …create_directory($offlineConf['absolutePathToTmpSessionDirStr'] . $offlineConf['pathDelimiterStr']…
606 foreach ($offlineConf['mediaFilesSourceAndTargetArr'] as $currentSourceAndTargetArr) {
607 …if ($offlineConf['offlineMode'] != 'dryrun') copy_file($currentSourceAndTargetArr[0], $currentSour…
609 unset($offlineConf['mediaFilesSourceAndTargetArr']);
626 global $offlineConf;
630 …if (is_dir($pathStr . $offlineConf['pathDelimiterStr'] . $element) && $element != "." && $element …
631 $array[$element] = retrieve_media_tree($pathStr . $offlineConf['pathDelimiterStr'] . $element);
633 $array[] = $pathStr . $offlineConf['pathDelimiterStr'] . $element;
634 …$currentMediaSubDirStr = str_replace($offlineConf['absolutePathToDataDirStr'] . $offlineConf['path…
635 $tmpSourceFilenameWithPathStr = $pathStr . $offlineConf['pathDelimiterStr'] . $element;
636 …eWithPathStr = $offlineConf['absolutePathToTmpSessionDirStr'] . $offlineConf['pathDelimiterStr'] .…
637 …$offlineConf['mediaFilesSourceAndTargetArr'][] = array($tmpSourceFilenameWithPathStr, $tmpTargetFi…
638 $offlineConf['mediaDirectoriesArr'][$currentMediaSubDirStr]++;
682 global $offlineConf;
689 …$absolutePathToIndexDirStr = $offlineConf['absolutePathToTmpSessionDirStr'] . $offlineConf['pathDe…
694 …write_file($absolutePathToIndexDirStr . $offlineConf['pathDelimiterStr'] . 'alphabetical.html', $i…
705 global $offlineConf;
720 …write_file($offlineConf['absolutePathToTmpSessionDirStr'] . $offlineConf['pathDelimiterStr'] . 'i…
729 global $offlineConf;
735 ksort($offlineConf['indexAlphabeticalArr']);
737 foreach($offlineConf['indexAlphabeticalArr'] as $pagenameStr => $relativePathToPageStr) {
760 unset($offlineConf['indexAlphabeticalArr']);