mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 11:50:30 +02:00
Tagwords: URL config refactoring
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
* $Id$
|
||||
*
|
||||
* eURL configuration script
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
require_once(e_HANDLER.'news_class.php');
|
||||
define('TAGWORDS_REWRITE', true);
|
||||
|
||||
function url_tagwords_main($parms = array())
|
||||
{
|
||||
//$base = e_HTTP.$sefbase.$parms['action'];
|
||||
$base = e_HTTP.(e107::getPref('tagwords_sefbase') ? e107::getPref('tagwords_sefbase').'/' : 'tagwords/');
|
||||
return $base.urlencode(varset($parms['q']));
|
||||
}
|
||||
|
||||
function parse_url_tagwords_main($request)
|
||||
{
|
||||
$request = urldecode($request);
|
||||
parse_str($request, $request);
|
||||
|
||||
if(isset($request['q']))
|
||||
{
|
||||
return array('q' => $request['q']);
|
||||
}
|
||||
|
||||
return $request;
|
||||
}
|
||||
|
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<urlprofile>
|
||||
<title>{LAN_EURL_MODREWR_TITLE}</title>
|
||||
<description>{LAN_EURL_MODREWR_DESCR}</description>
|
||||
</urlprofile>
|
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
* $Id$
|
||||
*
|
||||
* eURL configuration script
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
define('TAGWORDS_REWRITE', false);
|
||||
|
||||
function url_tagwords_main($parms = array())
|
||||
{
|
||||
$base = e_PLUGIN_ABS.'tagwords/tagwords.php';
|
||||
if(isset($parms['q'])) return $base.'?q='.urlencode(varset($parms['q']));
|
||||
return $base;
|
||||
|
||||
}
|
||||
|
||||
function parse_url_tagwords_main($request)
|
||||
{
|
||||
parse_str($request, $parsed);
|
||||
return $parsed;
|
||||
}
|
Reference in New Issue
Block a user