Fix some issues with CreditConfigElement.php, a=chris
Fix some issues with CreditConfigElement.php, a=chris
<?php
/**
* SeekQuarry/Yioop --
* Open Source Pure PHP Search Engine, Crawler, and Indexer
*
* Copyright (C) 2009 - 2015 Chris Pollett chris@pollett.org
*
* LICENSE:
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* END LICENSE
*
* @author Chris Pollett chris@pollett.org
* @license http://www.gnu.org/licenses/ GPL3
* @link http://www.seekquarry.com/
* @copyright 2009 - 2015
* @filesource
*/
namespace seekquarry\yioop;
use seekquarry\yioop\configs as C;
class Routes
{
public static function getRoutes()
{
$routes = [
"download" => "routeDownload",
"adscript" => "routeStore"
];
return $routes;
}
}
function routeDownload($route_args)
{
$handled = true;
if (!empty($route_args[1]) && $route_args[1] == floatval($route_args[1])) {
$_REQUEST['c'] = "main";
$_REQUEST['a'] = "download";
$_REQUEST['version'] = $route_args[1];
$_REQUEST['route']['c'] = true;
$_REQUEST['route']['a'] = true;
$_REQUEST['route']['version'] = true;
} else {
$handled = false;
}
return $handled;
}
function routeStore($route_args)
{
$handled = true;
$_REQUEST['c'] = "main";
$_REQUEST['a'] = "store";
return $handled;
}