spiralApplication/classes/meta.php
144 header("Location: " . $mediaURL);
145 header("Connection: close");
146 spiralCore::closeOutput(false);
147 }
148 }
149
150 //For media
151 if ($url[0] == 'clipfolders' && ($url[1] == 'viewclipfolder' || $url[1] == 'publicview'))
152 {
153 //Media file
154 $album = dbal::select()->from('lightboxes')->where('id', '=', $url[3])->makeQuery()->fetchRow();
155
156 if ($album)
157 {
158 header("HTTP/1.1 301 Moved Permanently");
159 header("Location: /lightbox/" . $album['id'] . '-' . html::url($album['title']) . '/');
160 header("Connection: close");
161
162 }
163 }
164
spiralCore/events.php
43 * @static
44 * @param string $event
45 * @param mixed $data
46 */
47 static public function callEvent($event, $data = false)
48 {
49 if (!empty(self::$events[$event]))
50 {
51 foreach (self::$events[$event] as $callback)
52 {
53 $data = call_user_func($callback, $event, $data);
54 }
55
56 spiralDebug && spiralCore::debugMessage("Event $event was successfully processed.");
57 }
58
59 return $data;
60 }
61
62 /**
63 * Adds event callback.
spiralCore/spiral.php
305 * Also you can track errors by using event callError.
306 *
307 * @static
308 * @event callError(errorType)
309 * @param string $errorType
310 * @return void
311 */
312 final static public function callError($errorType = 'notFound')
313 {
314 //Some classes can be connected to catch errors
315 spiralEvents::callEvent('callError', $errorType);
316
317 if (!isset(self::$globalConfig['spiral']['errorHandlers'][$errorType]))
318 {
319 //Unspecified error
320 self::closeOutput(null);
321 }
322
323 $errorHandler = self::$globalConfig['spiral']['errorHandlers'][$errorType];
324
325 if ($errorHandler['header'])
spiralCore/spiral.php
285
286if($_SERVER['REMOTE_ADDR'] == '86.57.152.109')
287{
288throw $exception;
289}
290 if (spiralDebug && !self::$globalConfig['spiral']['forceErrors'])
291 {
292 // throw $exception;
293 }
294
295 self::callError('notFound');
296 }
297 }
298
299 /**
300 * Closes processing with some specified error,
301 * error can back header, and http response code,
302 * also you can attach views to error.
303 *
304 * To describe new error, just add it into spiral configuration.
305 * Also you can track errors by using event callError.
spiralRoot/index.php
125}
126
127/**
128 * Nothing should be sent to user if there is not spiralDebug.
129 */
130ob_start();
131
132/**
133 * Calling parent action.
134 */
135spiralCore::callAction(request::$action, request::$method, request::$arguments);
System messages
Configuration section 'loadmap' was successfully loaded.
Loadmap was successfully loaded from disc.
Route 'spiralCore/helpers/' was successfully added into loader.
Route 'spiralCore/components/' was successfully added into loader.
Route 'spiralCore/extensions/' was successfully added into loader.
Route 'spiralApplication/' was successfully added into loader.
Route 'spiralApplication/classes/' was successfully added into loader.
Declaration file './spiral/exception.php' was successfully loaded for class 'spiralException' (using loadmap).
Declaration file 'spiralCore/components/i18n.php' was successfully loaded for class 'i18n' (using loadmap).
Configuration section 'i18n' was successfully loaded.
Class 'i18n' was aliased into the core as component.
Declaration file 'spiralApplication/classes/meta.php' was successfully loaded for class 'meta' (using loadmap).
Configuration section 'models/meta' was successfully loaded.
Declaration file 'spiralCore/components/request.php' was successfully loaded for class 'request' (using loadmap).
Enterpoint ('/clipfolders/PublicView/') was allocated as as action 'clipfolders' with method 'PublicView'.
Class 'request' was aliased into the core as component.
Class 'meta' was aliased into the core as component.
Declaration file 'spiralApplication/classes/member.php' was successfully loaded for class 'member' (using loadmap).
Configuration section 'models/member' was successfully loaded.
Class 'member' was aliased into the core as component.
Declaration file 'spiralApplication/classes/commerce.php' was successfully loaded for class 'commerce' (using loadmap).
Configuration section 'models/commerce' was successfully loaded.
Declaration file 'spiralCore/components/session.php' was successfully loaded for class 'session' (using loadmap).
Class 'session' was aliased into the core as component.
Class 'commerce' was aliased into the core as component.
Declaration file 'spiralCore/helpers/inflector.php' was successfully loaded for class 'inflector' (using loadmap).
Configuration section 'helpers/inflector' was successfully loaded.
Declaration file 'spiralCore/components/dbal.php' was successfully loaded for class 'dbal' (using loadmap).
Configuration section 'dbal' was successfully loaded.
Class 'dbal' was aliased into the core as component.
Declaration file 'spiralCore/components/dbal/builders/select.php' was successfully loaded for class 'dbalBuilderSelect' (using loadmap).