HowTo strip links from generated documents

1.8 related questions and discussions.
Please upgrade to LATEST 1.9.x.
No more fixes for 1.8.

Moderators: TurboPT, Amaradana, TL Developers

HowTo strip links from generated documents

Postby havlatm » Thu Jul 29, 2010 10:19 am

Edit lib/results/printDocument.php. Find the request: "echo $generatedText;" and add the code below above. Set configuration parameter as described.

Code: Select all
// Strip links from a generated document (except the document internals; i.e. content links)
// Add into custom_config.inc.php: $tlCfg->document_generator->stripLinks = ENABLED;
// @author havlatm (20100729)
if (isset($tlCfg->document_generator->stripLinks) && $tlCfg->document_generator->stripLinks)
{
    $generatedText = preg_replace('/<a href="http:[\/\w.]*">|<\/a>/i', '', $generatedText);
}

// send out the data
echo $generatedText;
havlatm
Member of TestLink Community
 
Posts: 940
Joined: Mon Oct 31, 2005 1:24 am
Location: Czech

Return to TestLink 1.8 (OBSOLETE => EOL)



Who is online

Users browsing this forum: No registered users and 1 guest