Lines Matching refs:DATA

643     private function __getInternalLinks(&$DATA) {  argument
652 $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 $url = $this->__rebuildLink($DATA, '');
842 …return $this->__fetchAndReplaceLinkFinish( $DATA, $url, $noDeepReplace, $newAdditionalParameters, …
845 …private function __fetchAndReplaceLinkMainSwitch( &$elements, &$DATA, &$url, &$newAdditionalParame… argument
849 …$DATA[2] .= '.' . $this->functions->cleanID(preg_replace("/(=|\?|&)/", ".", $PARAMS)) . '.css'…
851 $DATA['PARAMS'] = "";
859 …$this->functions->debug->message("This is CSS file", array($DATA, $noDeepReplace, $fileName, $newD…
864 …$DATA[2] .= '.t.' . $this->functions->cleanID($_REQUEST['template']) . '.js'; // allways put param…
870 $DATA['PARAMS'] = "";
873 …$this->functions->debug->message("This is JS file", array($DATA, $url, $newAdditionalParameters), …
883 $this->__getParamsAndDataRewritten($DATA, $PARAMS, 'media');
884 … $ID = $this->functions->cleanID(str_replace('/', ':', $DATA[2]), null, strstr($DATA[2], 'media'));
888 $this->__rebuildDataForNormalFiles($DATA, $PARAMS);
889 $DATA[2] .= '.detail.html';
891 …unctions->debug->message("This is detail.php file with addParams", array($DATA, $ID, $fileName, $n…
896 $this->__getParamsAndDataRewritten($DATA, $PARAMS, 'id');
897 $ID = $this->functions->cleanID($DATA[2], null, strstr($DATA[2], 'id'));
904 $this->__rebuildDataForNormalFiles($DATA, $PARAMS);
906 $DATA[2] .= '.' . array_pop($DATA2Name);
908 …>functions->debug->message("This is doku.php file with addParams", array($DATA, $ID, $fileName, $n…
909 return $this->__rebuildLink($DATA);
913 $this->__getParamsAndDataRewritten($DATA, $PARAMS, 'media');
915 $DATA[2] = str_replace('/', ':', $DATA[2]);
916 $ID = $this->functions->cleanID($DATA[2], null, strstr($DATA[2], 'media'));
920 $DATA[2] = $this->functions->wl($ID, null, null, null, $IDexists, true);
921 $this->__rebuildDataForNormalFiles($DATA, $PARAMS);
923 $DATA['PARAMS'] = "";
926 … $this->functions->debug->message("This is fetch.php file", array($DATA, $ID, $PARAMS), 2);
933 if (preg_match("%" . preg_quote(DOKU_BASE, '%') . "_detail/%", $DATA[2])) {
936 preg_match("#id=(.*?)(&|\")#i", $DATA[0], $backlinkID);
937 $this->__rebuildDataForNormalFiles($DATA, $PARAMS);
942 …$DATA[2] .= ':' . $fileIDPart . '.' . $this->functions->settings->fileType; // add namespace and s…
945 $fileName = $this->functions->shortenName($DATA[2]);
949 $DATA['PARAMS'] = "";
951 …functions->debug->message("This is something with '_detail' file", array($DATA, $backlinkID, $newD…
952 …} else if (preg_match("%" . preg_quote(DOKU_BASE, '%') . "_export/(.*?)/%", $DATA[2], $fileType)) {
955 $this->__rebuildDataForNormalFiles($DATA, $PARAMS);
959 $DATA[2] .= (empty($PARAMS) ? '' : '/' . $PARAMS) . '.' . $fileType[1];
961 $DATA['PARAMS'] = "";
962 … $this->functions->debug->message("This is something with '_export' file", $DATA, 2);
966 …$DATA[2] .= (!$this->functions->settings->addParams || empty($PARAMS) ? '' : '.' . $this->function…
968 $DATA[2] = $this->functions->shortenName($DATA[2]);
971 if ($this->functions->settings->addParams) $DATA['PARAMS'] = "";
973 $this->functions->debug->message("This page really exists", $DATA, 1);
975 return $this->__rebuildLink($DATA, null, $ID);
977 $this->__rebuildDataForNormalFiles($DATA, $PARAMS, true);
988 …private function __fetchAndReplaceLinkFinish( $DATA, $url, $noDeepReplace, $newAdditionalParameter… argument
992 $DATA[2] = str_replace(':', '_', $DATA[2]);
993 $DATA[2] = $this->functions->shortenName($DATA[2]);
999 $DATA[2] = $this->fileChecked[$url];
1000 … $this->functions->debug->message("File has been checked before.", array($DATA, $url), 2);
1001 return $this->__rebuildLink($DATA);
1005 if ($this->filewriter->fileExistsInZip($DATA[2])) {
1006 $this->functions->debug->message("File with DATA exists in ZIP.", $DATA, 3);
1007 return $this->__rebuildLink($DATA);
1035 $DATA[2] = $this->functions->shortenName($ORIGDATA2[2]); // get Origdata Path
1038 $this->fileChecked[$url] = $DATA[2]; // 2010-09-03 - One URL to one FileName
1039 $link = $this->__rebuildLink($DATA);
1046 $dirname = dirname($DATA[2]);
1050 … if ( $this->filewriter->canDoPDF() && !empty($tmpFile[1]) && !strstr($DATA[2], $tmpFile[1]) ) {
1051 $DATA[2] = $dirname . '/' . $tmpFile[1];
1052 $this->functions->debug->message("Changed filename.", $DATA[2], 2);
1056 if ( !empty($tmpFile[2]) && !preg_match("#\.{$tmpFile[2]}$#", $DATA[2]) ) {
1057 …$DATA[2] = preg_match("#(\.[^\.]+)$#", $DATA[2]) ? preg_replace("#(\.[^\.]+)$#", '.' . $tmpFile[2]…
1058 $this->functions->debug->message("Added extension provided from Server.", $DATA[2], 2);
1062 $this->fileChecked[$url] = $DATA[2]; // 2010-09-03 - One URL to one FileName
1064 $this->filewriter->__addFileToZip($tmpFile[0], $DATA[2]);
1069 $newURL = $this->__rebuildLink($DATA);
1075 private function __fetchAndReplaceWellKnownLinks( $DATA ) { argument
1078 if (preg_match("%^(https?://|mailto:|javascript:|data:)%", $DATA[2])) {
1084 if (preg_match("%media=(https?://.*?$)%", $DATA[2], $matches)) {
1085 $DATA[2] = $matches[1];
1086 $this->functions->debug->message("This is an HTTP like somewhere else", $DATA, 1);
1090 if (preg_match("%^#.*?$%", $DATA[2])) {
1099 private function __fetchAndReplaceLinkHandleRewrite( &$DATA, &$PARAMS ) { argument
1101 if ( !preg_match('$^(' . DOKU_BASE . ')?lib/$', $DATA[2]) ) {
1104 $DATA[2] = $this->__getInternalRewriteURL($DATA[2]);
1106 $this->__getParamsAndDataRewritten($DATA, $PARAMS);
1116 private function __rebuildLink($DATA, $DEPTH = null, $existingPageID = null) { argument
1121 …$DATA[2] .= (!empty($DATA['PARAMS']) && $this->functions->settings->addParams ? '?' . $DATA['PARAM…
1123 $intermediateURL = $DEPTH . $DATA[2];
1132 …$newURL = $DATA[1] == 'url' ? $DATA[1] . '(' . $intermediateURL . ')' : $DATA[1] . '="' . $interme…
1234 private function __getParamsAndDataRewritten(&$DATA, &$PARAMS, $IDKEY = 'id') { argument
1245 …$DATA[2] = preg_replace("%^" . preg_quote(DOKU_BASE, '%') . "%", "", str_replace(':', '/', $value)…
1260 private function __rebuildDataForNormalFiles(&$DATA, &$PARAMS, $addHash = false) { argument
1261 $PARTS = explode('.', $DATA[2]);
1276 …$DATA[2] = implode('.', $PARTS) . (empty($internalParams) ? '' : '.' . $this->functions->cleanID($…
1277 $DATA[2] = preg_replace("/\.+/", ".", $DATA[2]);
1278 $this->functions->debug->message("Rebuilding Data for normal file.", $DATA[2], 1);