Commit 5098c5f0 authored by Thomas Löffler's avatar Thomas Löffler
Browse files

Add 'data/typo3/html/typo3conf/ext/ter_fe2/' from commit 'e9b02de6'

git-subtree-dir: data/typo3/html/typo3conf/ext/ter_fe2
git-subtree-mainline: 2eda71a1
git-subtree-split: e9b02de6
parents 2eda71a1 e9b02de6
#########################
# TYPO3CMS/Extensions/terfe.git
# global ignore file
########################
# ignoring temporary files (left by e.g. vim)
# ignoring by common IDE's used directories/files
# dont ignore .rej and .orig as we want to see/clean files after conflict resolution
#
# if you feel this file needs adaption please report on http://forge.typo3.org/issues/13627
#
# for local exclude patterns please edit .git/info/exclude
#
*~
*.bak
*.idea
*.project
*.swp
.buildpath
.cache
.project
.session
.settings
.TemporaryItems
.webprj
nbproject
03.11.2010 Marcus Krause <marcus#exp2010@t3sec.info>
* Bugfix #10613: Typo in variable names
28.10.2010 Marcus Krause <marcus#exp2010@t3sec.info>
* Bugfix #10489: Extension uses file resources stored only in typo3.org fileadmin
27.10.2010 Steffen Kamper <steffen@typo3.org>
* cleanup of pi2
* TYPO3 TER (soap server) unable to handle multiple requests within one tcp connection (forge #10481)
26.10.2010 Steffen Kamper <steffen@typo3.org>
* Resolve code errors (forge #10470)
* Sync svn with version on typo3.org (forge #10469), raised version to 1.0.8
12.02.2009 Steffen Kamper <info@sk-typo3.de>
* fixed bug with feedback mail (typo in extensionkey) thx to Bernhard Kraft
17.12.2008 Steffen Kamper <info@sk-typo3.de>
* added select-part for insecure extensions (reviewstate<0) to standardClause in pi1
Version 1.0.5 16.09.2008 Robert Lemke <robert@typo3.org>
* Checked in the most recent version from typo3.org into Forge
- Removed the reviewed / unreviewed list view for extensions from the menu
- The extension version number is not shown in the URL anymore
- Obsolete extensions are now marked as such (again)
Version 1.0.4 20.03.2007 Robert Lemke <robert@typo3.org>
+ Improved the caching of extension files for the ter_fe details view: Files are now only unpacked again if the md5 sum of the T3X file (not the extensions.xml.gz) changed.
+ Changed the tx_terfe / contentcache file structure: now the files of each extension reside in their own subdirectory.
Version 1.0.3 16.12.2006 Robert Lemke <robert@typo3.org>
# Fixed bug 0004086: extension rating shows 0 (zero) instead of "-" or nothing
# If no title was defined for an extension, links in ter_fe will now have the label "Untitled"
+ Added a little feature (#0004053): You can now link to the single view of the most current version of an extension by omitting the "version" get parameter or setting version to "current".
Version 1.0.2 15.12.2006 Robert Lemke <robert@typo3.org>
+ Added feature "Render Problems" link which explains why documents were not rendered. (See extension ter_doc_renderproblems)
Version 1.0.1, 14.12.2006 Robert Lemke <robert@typo3.org>
# Fixed download counter display
01.09.2005 Robert Lemke <robert@typo3.org>
+ Added extension and extension key management for administrators to ter_fe_pi2. A fe_usergroup for administrators has to be created, and specified in plugin.tx_terfe_pi2.adminFEUserGroup
15.05.2006 Michael Scharkow <michael@underused.org>
* Finished ratings, with changes from public beta
* ATTN: Please remove reference to my server in common class icon
function (although it should never occur on typo3.org
* Fixed a lot of small bugs
22.03.2006 Michael Scharkow <michael@underused.org>
* Fixed small issues (locallang, docstrings, variable names)
* Added stylesheet file and icons in res/ (copy to fileadmin, please!)
16.03.2006 Robert Lemke <robert@typo3.org>
* Removed dummy content from renderListView_detailledExtensionRecord(). That was very confusing because in the list view the documentation link was always "not available" and downloadcounter "12333/32111" - because it was hardcoded. Please make sure to clean up before you commit.
16.03.2006 Robert Lemke <robert@typo3.org>
* Only a few cosmetic changes after the review of Michaels code
13.03.2006 Michael Scharkow <michael@underused.org>
* more refactoring
* complete overhaul of all output (thanks to Ingo Renner and Joey Hasenau)
* info and detail view merged
* stdSelection for all queries (no obsolete, testing and documentation)
* added simple upload comment changelog in single view
12.03.2006 Michael Scharkow <michael@underused.org>
* refactoring of pi1, compact lists use a common function now
* added state and last update in compact lists
* zebra table rows for CSS, less classes in table view (check CSS!)
* added sorting by common criteria
* changed links, so that single view is consistently prefixed with /view
05.03.2006 Robert Lemke <robert@typo3.org>
+ File downloads are now passed through a function which sends correct HTTP headers and nicer file names.
17.01.2006 Robert Lemke <robert@typo3.org>
~ Changed a lot ...
~ Converted locallang to XML
+ Extracted many functions from tx_terfe_pi1 and created a new common library "tx_terfe_common"
09.01.2006 Robert Lemke <robert@typo3.org>
~ Commit of merge between Michael's and my modifications
09.01.2006 Michael Scharkow <michael@underused.org>
* Update for pi3: Delete reviews, better list views, etc.
* TODO: E-Mail-Notification and review-editing (delete+new works!)
07.01.2006 Michael Scharkow <michael@underused.org>
* Initial upload of rating framework (in p1)
06.01.2006 Michael Scharkow <michael@underused.org>
* Initial upload of /pi3 (Reviewing framework)
08.12.2005 Robert Lemke <robert@typo3.org>
* Initial upload
<?php
/*******************************************************************
* Copyright notice
*
* (c) 2011 Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project 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 2 of
* the License, or (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script 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.
*
* This copyright notice MUST APPEAR in all copies of the script!
******************************************************************/
/**
* Cache for extension files
*/
class Tx_TerFe2_Cache_FileCache implements \TYPO3\CMS\Core\SingletonInterface
{
/**
* @var string
*/
protected $cacheDirectory;
/**
* Set cache directory path
*
* @param string $cacheDirectory Path to cache directory
* @return void
*/
public function setCacheDirectory($cacheDirectory)
{
if (empty($cacheDirectory)) {
throw new Exception('An empty cache directory is not allowed');
}
$this->cacheDirectory = Tx_TerFe2_Utility_File::getAbsoluteDirectory($cacheDirectory);
}
/**
* Get cache directory path
*
* @return string Path of the cache directory
*/
public function getCacheDirectory()
{
return $this->cacheDirectory;
}
/**
* Get filename
*
* @param string $filename Name of the file
* @return string Local filename
*/
public function getFile($filename)
{
$filename = $this->getFilePath($filename);
if (Tx_TerFe2_Utility_File::fileExists($filename)) {
return $filename;
}
return '';
}
/**
* Returns an extension related filename
*
* @param string $extensionKey Extension key
* @param string $filename Name of the file
* @return string Local filename
*/
public function getExtensionFile($extensionKey, $filename)
{
$filename = $this->getExtensionFilename($extensionKey, $filename);
return $this->getFile($filename);
}
/**
* Copy a file to local cache
*
* @param string $fileUrl Url to the file
* @param string $filename Name of the file
* @return string Local filename
*/
public function addFile($fileUrl, $filename)
{
if (empty($fileUrl)) {
return '';
}
$filename = $this->getFilePath($filename);
if (Tx_TerFe2_Utility_File::copyFile($fileUrl, $filename)) {
return $filename;
}
return '';
}
/**
* Copy an extension file to local cache
*
* @param string $extensionKey Extension key
* @param string $fileUrl Url to the file
* @param string $filename Name of the file
* @return string Local filename
*/
public function addExtensionFile($extensionKey, $fileUrl, $filename)
{
$filename = $this->getExtensionFilename($extensionKey, $filename);
return $this->addFile($fileUrl, $filename);
}
/**
* Remove a file from local cache
*
* @param string $filename Name of the file
* @return boolean TRUE if success
*/
public function removeFile($filename)
{
$filename = $this->getFilePath($filename);
if (!Tx_TerFe2_Utility_File::fileExists($fileUrl)) {
return FALSE;
}
return unlink($filename);
}
/**
* Remove an extension file from local cache
*
* @param string $extensionKey Extension key
* @param string $filename Name of the file
* @return string Local filename
*/
public function removeExtensionFile($extensionKey, $filename)
{
$filename = $this->getExtensionFilename($extensionKey, $filename);
return $this->removeFile($filename);
}
/**
* Returns the filename of a file
*
* @param string $filename Name of the file
* @return string Absolute path to file
*/
protected function getFilePath($filename)
{
if (empty($filename)) {
return '';
}
$cacheDirectory = $this->getCacheDirectory();
if (empty($cacheDirectory)) {
throw new Exception('No cache directory defined');
}
return $cacheDirectory . $filename;
}
/**
* Returns the filename of an extension file
*
* @param string $extensionKey Extension key
* @param string $filename Name of the file
* @return string Extension filename
*/
protected function getExtensionFilename($extensionKey, $filename)
{
if (empty($extensionKey) || empty($filename)) {
return '';
}
return strtolower($extensionKey) . '/' . basename($filename);
}
}
?>
\ No newline at end of file
<?php
/*******************************************************************
* Copyright notice
*
* (c) 2011 Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project 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 2 of
* the License, or (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script 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.
*
* This copyright notice MUST APPEAR in all copies of the script!
******************************************************************/
/**
* Abstract controller
*/
abstract class Tx_TerFe2_Controller_AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
{
/**
* @var Tx_TerFe2_Security_Role
*/
protected $securityRole;
/**
* @param Tx_TerFe2_Security_Role $securityRole
*/
public function injectSecurityRole(Tx_TerFe2_Security_Role $securityRole)
{
$this->securityRole = $securityRole;
}
/**
* Pre-parse TypoScript setup
*
* @return void
*/
public function initializeAction()
{
// Pre-parse settings
$this->settings = Tx_TerFe2_Utility_TypoScript::parse($this->settings);
// Initialize the controller
$this->initializeController();
}
/**
* Override in concrete controller to initialize it
*
* @return void
*/
protected function initializeController()
{
}
/**
* Translate a label
*
* @param string $label Label to translate
* @param array $arguments Optional arguments array
* @return string Translated label
*/
protected function translate($label, array $arguments = array())
{
$extensionKey = $this->request->getControllerExtensionKey();
return \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate($label, $extensionKey, $arguments);
}
/**
* Send flash message and redirect to given action
*
* @param string $message Identifier of the message to send
* @param string $action Name of the action
* @param string $title Title for the flash message
* @param int $severity Severity for the flash message
* @param string $controller Unqualified object name of the controller
* @param string $extension Name of the extension containing the controller
* @param array $arguments Arguments to pass to the target action
* @return void
*/
protected function redirectWithMessage($message, $action, $title = '', $severity = \TYPO3\CMS\Core\Messaging\FlashMessage::OK,
$controller = NULL, $extension = NULL, array $arguments = NULL)
{
$this->addFlashMessage($message, $title, $severity);
$this->clearPageCache($GLOBALS['TSFE']->id);
$this->redirect($action, $controller, $extension, $arguments);
}
/**
* Send flash message and forward to given action
*
* @param string $message Identifier of the message to send
* @param string $action Name of the action
* @param string $controller Unqualified object name of the controller
* @param string $extension Name of the extension containing the controller
* @param array $arguments Arguments to pass to the target action
* @return void
*/
protected function forwardWithMessage($message, $action, $controller = NULL, $extension = NULL, array $arguments = NULL)
{
$this->addFlashMessage($message);
$this->clearPageCache($GLOBALS['TSFE']->id);
$this->forward($action, $controller, $extension, $arguments);
}
/**
* Send flash message and redirect to given action
*
* @param string $message Identifier of the message to send
* @param string $action Name of the action
* @param string $controller Unqualified object name of the controller
* @param string $extension Name of the extension containing the controller
* @param array $arguments Arguments to pass to the target action
* @return void
*/
protected function redirectWithError($message, $action, $controller = NULL, $extension = NULL, array $arguments = NULL)
{
$this->addFlashMessage($message, '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
$this->clearPageCache($GLOBALS['TSFE']->id);
$this->redirect($action, $controller, $extension, $arguments);
}
/**
* Send flash message and forward to given action
*
* @param string $message Identifier of the message to send
* @param string $action Name of the action
* @param string $controller Unqualified object name of the controller
* @param string $extension Name of the extension containing the controller
* @param array $arguments Arguments to pass to the target action
* @return void
*/
protected function forwardWithError($message, $action, $controller = NULL, $extension = NULL, array $arguments = NULL)
{
$this->addFlashMessage($message, '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
$this->clearPageCache($GLOBALS['TSFE']->id);
$this->forward($action, $controller, $extension, $arguments);
}
/**
* Clear cache of given pages
*
* @param string $pages List of page ids
* @return void
*/
protected function clearPageCache($pages)
{
if (!empty($pages)) {
$pages = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $pages, TRUE);
$this->cacheService->clearPageCache([$pages]);
}
}
/**
* Adds the base uri if not already in place.
*
* WORKAROUND for #33788
*
* @param string $uri The URI
* @return void
*/
protected function addBaseUriIfNecessary($uri)
{
return \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($uri);
}
}
?>
\ No newline at end of file
<?php
/*******************************************************************
* Copyright notice
*
* (c) 2011 Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project 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 2 of
* the License, or (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script 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.
*
* This copyright notice MUST APPEAR in all copies of the script!
******************************************************************/
/**
* Abstract controller
*/
abstract class Tx_TerFe2_Controller_AbstractTerBasedController extends Tx_TerFe2_Controller_AbstractController
{
/**
* @var array
*/
protected $frontendUser = array();
/**
* @var Tx_TerFe2_Service_Ter
*/
protected $terConnection;
/**
* @var array
*/
protected $terSettings = array();
/**
* @var array
*/
protected $terAccount = array();
/**
* Initialize action
*
* @return void
*/
public function initializeAction()
{
parent::initializeAction();
$this->frontendUser = (!empty($GLOBALS['TSFE']->fe_user->user) ? $GLOBALS['TSFE']->fe_user->user : array());
$this->terSettings = (!empty($this->settings['terConnection']) ? $this->settings['terConnection'] : array());
$this->terAccount = $this->getTerAccount();
$this->terConnection = $this->getTerConnection();
}
/**
* Initializes the view, add login state to template variables
*
* @return void
*/
public function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view)
{
$this->view = $view;
$this->view->assign('loggedIn', FALSE);
if (!empty($this->frontendUser)) {
$this->view->assign('loggedIn', TRUE);
$this->view->assign('userName', $this->frontendUser['username']);