use wcf\util\ClassUtil;
use wcf\util\JSON;
use wcf\util\StringUtil;
+use wcf\system\exception\InvalidSecurityTokenException;
/**
* Default implementation for AJAX-based method calls.
throw $e;
}
- if ($e instanceof IllegalLinkException) {
+ if ($e instanceof InvalidSecurityTokenException) {
throw new AJAXException(WCF::getLanguage()->get('wcf.ajax.error.sessionExpired'), AJAXException::SESSION_EXPIRED, $e->getTraceAsString());
}
else if ($e instanceof PermissionDeniedException) {
else if ($e instanceof SystemException) {
throw new AJAXException($e->getMessage(), AJAXException::INTERNAL_ERROR, $e->__getTraceAsString(), array(), $e->getExceptionID());
}
+ else if ($e instanceof IllegalLinkException) {
+ throw new AJAXException(WCF::getLanguage()->get('wcf.ajax.error.illegalLink'), AJAXException::ILLEGAL_LINK, $e->getTraceAsString());
+ }
else if ($e instanceof UserInputException) {
// repackage as ValidationActionException
$exception = new ValidateActionException($e->getField(), $e->getType(), $e->getVariables());
<?php
namespace wcf\action;
-use wcf\system\exception\IllegalLinkException;
+use wcf\system\exception\InvalidSecurityTokenException;
use wcf\system\WCF;
/**
*/
protected function checkSecurityToken() {
if (!isset($_REQUEST['t']) || !WCF::getSession()->checkSecurityToken($_REQUEST['t'])) {
- throw new IllegalLinkException();
+ throw new InvalidSecurityTokenException();
}
}
}
* AJAXException provides JSON-encoded exceptions.
*
* @author Alexander Ebert
- * @copyright 2001-2013 WoltLab GmbH
+ * @copyright 2001-2014 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package com.woltlab.wcf
* @subpackage system.exception
*/
const INSUFFICIENT_PERMISSIONS = 403;
+ /**
+ * illegal link
+ * @var integer
+ */
+ const ILLEGAL_LINK = 404;
+
/**
* bad parameters
* @var integer
</category>
<category name="wcf.ajax">
+ <item name="wcf.ajax.error.illegalLink"><![CDATA[Der Server konnte die Anfrage nicht verarbeiten, weil das Ziel unbekannt ist oder nicht mehr zur Verfügung steht.]]></item>
<item name="wcf.ajax.error.invalidParameter"><![CDATA[Der Parameter „{$fieldName}“ fehlt oder ist ungültig.]]></item>
<item name="wcf.ajax.error.badRequest"><![CDATA[Die Anfrage war unvollständig und konnte nicht verarbeitet werden.]]></item>
<item name="wcf.ajax.error.internalError"><![CDATA[Es ist ein Fehler bei der Verarbeitung aufgetreten, bitte versuchen Sie es später erneut.]]></item>
<category name="wcf.imageViewer">
<item name="wcf.imageViewer.button.enlarge"><![CDATA[Vollbild-Modus]]></item>
<item name="wcf.imageViewer.button.full"><![CDATA[Originalversion aufrufen]]></item>
+ <item name="wcf.imageViewer.button.openSlideshow"><![CDATA[Slideshow]]></item>
+
<item name="wcf.imageViewer.close"><![CDATA[Schließen]]></item>
<item name="wcf.imageViewer.counter"><![CDATA[{literal}Bild {x} von {y}{/literal}]]></item>
<item name="wcf.imageViewer.enlarge"><![CDATA[Bild direkt anzeigen]]></item>
</category>
<category name="wcf.ajax">
+ <item name="wcf.ajax.error.illegalLink"><![CDATA[The server was unable to process your request because the target is unknown or no longer available.]]></item>
<item name="wcf.ajax.error.invalidParameter"><![CDATA[Parameter “{$fieldName}” is missing or invalid.]]></item>
<item name="wcf.ajax.error.badRequest"><![CDATA[The server was unable to proceed your request due to an incomplete request.]]></item>
<item name="wcf.ajax.error.internalError"><![CDATA[The server encountered an unresolvable problem, please try again later.]]></item>
<category name="wcf.imageViewer">
<item name="wcf.imageViewer.button.enlarge"><![CDATA[Fullscreen Mode]]></item>
<item name="wcf.imageViewer.button.full"><![CDATA[View Source Image]]></item>
+ <item name="wcf.imageViewer.button.openSlideshow"><![CDATA[Slideshow]]></item>
+
<item name="wcf.imageViewer.close"><![CDATA[Close]]></item>
<item name="wcf.imageViewer.counter"><![CDATA[{literal}Image {x} of {y}{/literal}]]></item>
<item name="wcf.imageViewer.enlarge"><![CDATA[View Full Image]]></item>