Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.9.4

Request #9605 Enhancement in external link handling
Submitted: 2006-12-13 14:11 UTC
From: dischinger at vdi dot de Assigned:
Status: Open Package: Spreadsheet_Excel_Writer (version 0.9.1)
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2006-12-13 14:11 UTC] dischinger at vdi dot de (Klaus Dischinger)
Description: ------------ File "Worksheet.php", line 2023-2036 // Determine if the external link is relative or absolute: // relative if link contains no dir separator, "somefile.xls" // relative if link starts with up-dir, "..\..\somefile.xls" // otherwise, absolute A relative external link starting from the current directory is not recognized as relative link, e.g. ".\data\somefile.xls" Test script: --------------- // Determine if the link is relative or absolute: // relative if link contains no dir separator, "somefile.xls" // relative if link starts with up-dir, "..\..\somefile.xls" ADDED // relative if link starts with acutal dir ".\data\somefile.xls" // otherwise, absolute $absolute = 0x02; // Bit mask if (!preg_match("/\\\/", $url)) { $absolute = 0x00; } if (preg_match("/^\.\.\\\/", $url)) { $absolute = 0x00; } ADDED if (preg_match("/^\.\\\/", $url)) { ADDED $absolute = 0x00; ADDED }

Comments