Fixed bug #32487: Remove reference to mediunDoc
[TYPO3CMS/Extensions/sr_freecap.git] / pi3 / audioCaptcha.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 2008-2011 Stanislas Rolland <typo3(arobas)sjbr.ca>
6 * All rights reserved
7 *
8 * This script is part of the Typo3 project. The Typo3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 *
17 * This script is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * This copyright notice MUST APPEAR in all copies of the script!
23 ***************************************************************/
24 /**
25 * This script invokes SysTurn speech generation
26 *
27 */
28 // Exit, if script is called directly (must be included via eID in index_ts.php)
29 if (!defined ('TYPO3_MODE') || (TYPO3_MODE !== 'FE') {
30 die ('Could not access this script directly!');
31 }
32 require_once(t3lib_extMgm::extPath('sr_freecap').'pi3/class.tx_srfreecap_pi3.php');
33 if (t3lib_div::int_from_ver($GLOBALS['TYPO_VERSION']) < 4003000) {
34 require_once(PATH_tslib.'class.tslib_fe.php');
35 require_once(PATH_t3lib.'class.t3lib_userauth.php');
36 require_once(PATH_tslib.'class.tslib_feuserauth.php');
37 require_once(PATH_t3lib.'class.t3lib_tstemplate.php');
38 require_once(PATH_t3lib.'class.t3lib_page.php');
39 require_once(PATH_tslib.'class.tslib_content.php');
40 }
41
42 // ***********************************
43 // Creating a $TSFE object
44 // ***********************************
45 $id = t3lib_div::_GET('id');
46 if (!isset($id)) $id = 0;
47 $id = htmlspecialchars($id);
48 $MP = htmlspecialchars(t3lib_div::_GET('MP'));
49 $GLOBALS['TSFE'] = t3lib_div::makeInstance('tslib_fe', $GLOBALS['TYPO3_CONF_VARS'], $id, '0', 1, '', '', $MP, '');
50 $GLOBALS['TSFE']->connectToDB();
51 $GLOBALS['TSFE']->initFEuser();
52 $GLOBALS['TSFE']->determineId();
53 // *******************************************
54 // Get compressed $TCA-Array();
55 // After this, we should now have a valid $TCA, though minimized
56 // *******************************************
57 $GLOBALS['TSFE']->getCompressedTCarray();
58 $GLOBALS['TSFE']->initTemplate();
59 $GLOBALS['TSFE']->tmpl->getFileName_backPath = PATH_site;
60
61 // ******************************************************
62 // Get config if not already gotten
63 // After this, we should have a valid config-array ready
64 // ******************************************************
65 $GLOBALS['TSFE']->getConfigArray();
66
67 // *******************************************
68 // Setting language and locale
69 // *******************************************
70 $GLOBALS['TT']->push('Setting language and locale','');
71 $GLOBALS['TSFE']->settingLanguage();
72 $GLOBALS['TSFE']->settingLocale();
73 $GLOBALS['TT']->pull();
74
75 // *******************************************
76 // Invoke the freecap plugin
77 // *******************************************
78 $freecap = t3lib_div::makeInstance('tx_srfreecap_pi3');
79 $freecap->cObj = t3lib_div::makeInstance('tslib_cObj');
80 $conf = $GLOBALS['TSFE']->tmpl->setup['plugin.'][$freecap->prefixId.'.'];
81 $freecap->main($conf);
82 ?>