based on a mistake observed on the site. This problem led to Translation by Search, where different Search Providers allowed to search for a given translation, and receive methods to edit it. Since Translation by Search and it's Search Providers worked in a stable and modular way, I decided to rewrite these Search Providers into Translation Providers, which also allow for paging in addition to the usual search procedure. In addition to the now completely modular, unified approach to translation, the site also got a new JavaScript interface, which uses the methods supplied by this file. */ require_once 'translationClass.php'; // chdir('..'); require_once 'common.php'; session_validate() or Config::error('403 Forbidden'); session_mayTranslate() or Config::error('403 Forbidden'); //Actions: switch ($_GET['action']) { /** @param $_GET['TranslationName'] @param $_GET['BrowserMatch'] @param $_GET['ImagePath'] @param $_GET['RfcLanguage'] @param $_GET['Active'] @returns TranslationId */ case 'createTranslation': Translation::createTranslation($_GET['TranslationName'], $_GET['BrowserMatch'], $_GET['ImagePath'], $_GET['RfcLanguage'], $_GET['Active']); header('Location: ' . $_SERVER['HTTP_REFERER'], 302); break; /**
<?php require_once 'common.php'; require_once 'query/translationClass.php'; /*Login check and procedure*/ if (!session_validate($dbConnection)) { header('LOCATION: index.php'); } if (!session_mayTranslate($dbConnection)) { header('LOCATION: index.php'); } ?> <!DOCTYPE HTML> <html> <?php $title = "The new translation…"; $jsFiles = array('extern/jquery.dataTables.js', 'dataTables.js'); require_once 'head.php'; ?> <body> <?php require_once 'topmenu.php'; $action = array_key_exists('action', $_GET) ? $_GET['action'] : ''; switch ($action) { case 'translation': require_once 'translation/translation.php'; break; case 'search': require_once 'translation/search.php'; break; case 'missing':