Does anyone have some thoughts on how best to simplify what appears to be these pretty convoluted lines of code?
$url = str_replace("\\", '/', dirname(__FILE__)); $root = qa_path_absolute($url); $pos = strpos($url, 'qa-plugin/'); $url = substr($url, $pos); $pos = strpos($root, 'index.php'); $root = substr($root, 0, $pos); $url = $root . $url; $qa_content['q_list']['form']['hidden']['viewedquestionsurl'] = $url;
$url = str_replace("\\", '/', dirname(__FILE__)); $root = qa_path_absolute($url);
$pos = strpos($url, 'qa-plugin/'); $url = substr($url, $pos);
$pos = strpos($root, 'index.php'); $root = substr($root, 0, $pos);
$url = $root . $url;
$qa_content['q_list']['form']['hidden']['viewedquestionsurl'] = $url;
Welcome to the Q&A site for Question2Answer.
If you have a question about Q2A, please ask here, in English.
To report a bug, please create a new issue on Github or ask a question here with the bug tag.
If you just want to try Q2A, please use the demo site.