Lines Matching refs:DATA
642 private function __getInternalLinks(&$DATA) { argument
651 $DATA = preg_replace_callback("/$PATTERN/i", $CALLBACK, $DATA);
655 $DATA = preg_replace_callback("/$PATTERNCSS/i", $CALLBACK, $DATA);
659 $DATA = preg_replace_callback("/$PATTERNSRCSET/i", $CALLBACK, $DATA);
665 private function __fetchAndReplaceSrcset($DATA) { argument
667 $this->functions->debug->message("SRCSET", $DATA, 2);
668 if ( strtolower($DATA[1]) != 'srcset' ) { return $DATA[0]; }
670 $SRCSETS = array_map( 'trim', explode( ",", $DATA[2] ) );
691 private function __fetchAndReplaceLink($DATA) { argument
700 $DATA[2] = preg_replace("/^\s*?['\"]?(.*?)['\"]?\s*?$/", '\1', trim($DATA[2]));
702 …$this->functions->debug->message("Starting Link Replacement", array('data' => $DATA, 'additional P…
705 if ( $this->__fetchAndReplaceWellKnownLinks( $DATA ) ) {
706 return $this->__rebuildLink($DATA, "");
710 $ORIGDATA2 = $DATA;
716 $PARAMS = @parse_url($DATA[2], PHP_URL_QUERY);
717 $ANCHOR = @parse_url($DATA[2], PHP_URL_FRAGMENT);
718 $DATA[2] = @parse_url($DATA[2], PHP_URL_PATH);
721 if (preg_match("#^\.\.?/#", $DATA[2])) {
722 $DATA[2] = getNS($CURRENT_ID) . ':' . $DATA[2];
728 while ($tmpData2 != $DATA[2]) {
729 $tmpData2 = $DATA[2];
730 $DATA[2] = preg_replace("#/(?!\.\.)[^\/]*?/\.\./#", '/', $DATA[2]);
733 $temp = preg_replace("%^" . preg_quote(DOKU_BASE, '%') . "%", "", $DATA[2]);
734 if ($temp != $DATA[2]) {
735 $DATA[2] = $temp;
739 …s->debug->message("URL before rewriting option for others than 1", array($DATA, $PARAMS, $hadBase)…
743 $this->__fetchAndReplaceLinkHandleRewrite( $DATA, $PARAMS );
745 $this->functions->debug->message("URL before rewriting option", array($DATA, $PARAMS), 2);
748 $DATA[2] = str_replace('/', ':', $DATA[2]);
751 if (empty($DATA[2])) {
752 $DATA[2] = $CURRENT_ID;
755 $ID = $DATA[2];
757 $ISMEDIA = preg_match($MEDIAMATCHER, $DATA[2]) === 1;
762 $ID = $this->functions->cleanID($DATA[2], null, $ISMEDIA);
804 $DATA[2] = $uri['path'];
806 $this->functions->debug->message("DATA after parsing.", $DATA, 2);
809 …& preg_match("%((/lib/exe/(fetch|detail|indexer)|feed|doku)\.php)/?(.*?)$%", $DATA[2], $matches)) {
812 $DATA[2] = $matches[1];
815 …s->debug->message("DATA after second rewrite with UseRewrite = 2", array($DATA, $matches, $PARAMS)…
818 $DATA['ANCHOR'] = $ANCHOR;
819 $DATA['PARAMS'] = $PARAMS;
820 $elements = explode('/', $DATA[2]);
823 …$result = $this->__fetchAndReplaceLinkMainSwitch( $elements, $DATA, $url, $newAdditionalParameters…
828 …$this->functions->debug->message("DATA after SWITCH CASE decision", array($DATA, $noDeepReplace, $…
832 $DATA[2] = $url;
833 unset($DATA['PARAMS']);
834 $rebuilt = $this->__rebuildLink($DATA, '');
846 …return $this->__fetchAndReplaceLinkFinish( $DATA, $url, $noDeepReplace, $newAdditionalParameters, …
849 …private function __fetchAndReplaceLinkMainSwitch( &$elements, &$DATA, &$url, &$newAdditionalParame… argument
853 …$DATA[2] .= '.' . $this->functions->cleanID(preg_replace("/(=|\?|&)/", ".", $PARAMS)) . '.css'…
855 $DATA['PARAMS'] = "";
863 …$this->functions->debug->message("This is CSS file", array($DATA, $noDeepReplace, $fileName, $newD…
868 …$DATA[2] .= '.t.' . $this->functions->cleanID($_REQUEST['template']) . '.js'; // allways put param…
874 $DATA['PARAMS'] = "";
877 …$this->functions->debug->message("This is JS file", array($DATA, $url, $newAdditionalParameters), …
887 $this->__getParamsAndDataRewritten($DATA, $PARAMS, 'media');
888 … $ID = $this->functions->cleanID(str_replace('/', ':', $DATA[2]), null, strstr($DATA[2], 'media'));
892 $this->__rebuildDataForNormalFiles($DATA, $PARAMS);
893 $DATA[2] .= '.detail.html';
895 …unctions->debug->message("This is detail.php file with addParams", array($DATA, $ID, $fileName, $n…
900 $this->__getParamsAndDataRewritten($DATA, $PARAMS, 'id');
901 $ID = $this->functions->cleanID($DATA[2], null, strstr($DATA[2], 'id'));
908 $this->__rebuildDataForNormalFiles($DATA, $PARAMS);
910 $DATA[2] .= '.' . array_pop($DATA2Name);
912 …>functions->debug->message("This is doku.php file with addParams", array($DATA, $ID, $fileName, $n…
913 return $this->__rebuildLink($DATA);
917 $this->__getParamsAndDataRewritten($DATA, $PARAMS, 'media');
919 $DATA[2] = str_replace('/', ':', $DATA[2]);
920 $ID = $this->functions->cleanID($DATA[2], null, strstr($DATA[2], 'media'));
924 $DATA[2] = $this->functions->wl($ID, null, null, null, $IDexists, true);
925 $this->__rebuildDataForNormalFiles($DATA, $PARAMS);
927 $DATA['PARAMS'] = "";
930 … $this->functions->debug->message("This is fetch.php file", array($DATA, $ID, $PARAMS), 2);
937 if (preg_match("%" . preg_quote(DOKU_BASE, '%') . "_detail/%", $DATA[2])) {
940 preg_match("#id=(.*?)(&|\")#i", $DATA[0], $backlinkID);
941 $this->__rebuildDataForNormalFiles($DATA, $PARAMS);
946 …$DATA[2] .= ':' . $fileIDPart . '.' . $this->functions->settings->fileType; // add namespace and s…
949 $fileName = $this->functions->shortenName($DATA[2]);
953 $DATA['PARAMS'] = "";
955 …functions->debug->message("This is something with '_detail' file", array($DATA, $backlinkID, $newD…
956 …} else if (preg_match("%" . preg_quote(DOKU_BASE, '%') . "_export/(.*?)/%", $DATA[2], $fileType)) {
959 $this->__rebuildDataForNormalFiles($DATA, $PARAMS);
963 $DATA[2] .= (empty($PARAMS) ? '' : '/' . $PARAMS) . '.' . $fileType[1];
965 $DATA['PARAMS'] = "";
966 … $this->functions->debug->message("This is something with '_export' file", $DATA, 2);
970 …$DATA[2] .= (!$this->functions->settings->addParams || empty($PARAMS) ? '' : '.' . $this->function…
972 $DATA[2] = $this->functions->shortenName($DATA[2]);
975 if ($this->functions->settings->addParams) $DATA['PARAMS'] = "";
977 $this->functions->debug->message("This page really exists", $DATA, 1);
979 return $this->__rebuildLink($DATA, null, $ID);
981 $this->__rebuildDataForNormalFiles($DATA, $PARAMS, true);
992 …private function __fetchAndReplaceLinkFinish( $DATA, $url, $noDeepReplace, $newAdditionalParameter… argument
996 $DATA[2] = str_replace(':', '_', $DATA[2]);
997 $DATA[2] = $this->functions->shortenName($DATA[2]);
1003 $DATA[2] = $this->fileChecked[$url];
1004 … $this->functions->debug->message("File has been checked before.", array($DATA, $url), 2);
1005 return $this->__rebuildLink($DATA);
1009 if ($this->filewriter->fileExistsInZip($DATA[2])) {
1010 $this->functions->debug->message("File with DATA exists in ZIP.", $DATA, 3);
1011 return $this->__rebuildLink($DATA);
1039 $DATA[2] = $this->functions->shortenName($ORIGDATA2[2]); // get Origdata Path
1042 $this->fileChecked[$url] = $DATA[2]; // 2010-09-03 - One URL to one FileName
1043 $link = $this->__rebuildLink($DATA);
1053 $dirname = dirname($DATA[2]);
1057 … if ( $this->filewriter->canDoPDF() && !empty($tmpFile[1]) && !strstr($DATA[2], $tmpFile[1]) ) {
1058 $DATA[2] = $dirname . '/' . $tmpFile[1];
1059 $this->functions->debug->message("Changed filename.", $DATA[2], 2);
1063 if ( !empty($tmpFile[2]) && !preg_match("#\.{$tmpFile[2]}$#", $DATA[2]) ) {
1064 …$DATA[2] = preg_match("#(\.[^\.]+)$#", $DATA[2]) ? preg_replace("#(\.[^\.]+)$#", '.' . $tmpFile[2]…
1065 $this->functions->debug->message("Added extension provided from Server.", $DATA[2], 2);
1069 $this->fileChecked[$url] = $DATA[2]; // 2010-09-03 - One URL to one FileName
1071 $this->filewriter->__addFileToZip($tmpFile[0], $DATA[2]);
1076 $newURL = $this->__rebuildLink($DATA);
1082 private function __fetchAndReplaceWellKnownLinks( $DATA ) { argument
1085 if (preg_match("%^(https?://|mailto:|javascript:|data:)%", $DATA[2])) {
1091 if (preg_match("%media=(https?://.*?$)%", $DATA[2], $matches)) {
1092 $DATA[2] = $matches[1];
1093 $this->functions->debug->message("This is an HTTP like somewhere else", $DATA, 1);
1097 if (preg_match("%^#.*?$%", $DATA[2])) {
1106 private function __fetchAndReplaceLinkHandleRewrite( &$DATA, &$PARAMS ) { argument
1108 if ( !preg_match('$^(' . DOKU_BASE . ')?lib/$', $DATA[2]) ) {
1111 $DATA[2] = $this->__getInternalRewriteURL($DATA[2]);
1113 $this->__getParamsAndDataRewritten($DATA, $PARAMS);
1123 private function __rebuildLink($DATA, $DEPTH = null, $existingPageID = null) { argument
1128 …$DATA[2] .= (!empty($DATA['PARAMS']) && $this->functions->settings->addParams ? '?' . $DATA['PARAM…
1130 $intermediateURL = $DEPTH . $DATA[2];
1139 …$newURL = $DATA[1] == 'url' ? $DATA[1] . '(' . $intermediateURL . ')' : $DATA[1] . '="' . $interme…
1241 private function __getParamsAndDataRewritten(&$DATA, &$PARAMS, $IDKEY = 'id') { argument
1255 …$DATA[2] = preg_replace("%^" . preg_quote(DOKU_BASE, '%') . "%", "", str_replace(':', '/', $value)…
1270 private function __rebuildDataForNormalFiles(&$DATA, &$PARAMS, $addHash = false) { argument
1271 $PARTS = explode('.', $DATA[2]);
1281 $trimPath = ltrim($DATA[2], '/');
1293 …$DATA[2] = implode('.', $PARTS) . (empty($internalParams) ? '' : '.' . $this->functions->cleanID($…
1294 $DATA[2] = preg_replace("/\.+/", ".", $DATA[2]);
1295 $this->functions->debug->message("Rebuilding Data for normal file.", $DATA[2], 1);