]> git.mxchange.org Git - friendica.git/commitdiff
Remove App->error
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 2 May 2019 01:17:03 +0000 (21:17 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 2 May 2019 01:17:03 +0000 (21:17 -0400)
mod/hcard.php
mod/notice.php
mod/viewsrc.php
src/App.php
src/Model/Profile.php

index cbaebc8ff4819f558a42983c380dddf9cf39d37e..e27ea29be4b0f8bc5c3e645aee2a38619a8deda9 100644 (file)
@@ -18,7 +18,6 @@ function hcard_init(App $a)
                $which = $a->argv[1];
        } else {
                notice(L10n::t('No profile') . EOL);
-               $a->error = 404;
                return;
        }
 
index 1a584000c72d86eee8560391b8c6ad910033bdf9..edcbefdad2321d1e3515566e94f217fa3c4d9a33 100644 (file)
@@ -16,7 +16,6 @@ function notice_init(App $a)
                $nick = $r[0]['nickname'];
                $a->internalRedirect('display/' . $nick . '/' . $id);
        } else {
-               $a->error = 404;
                notice(L10n::t('Item not found.') . EOL);
        }
 
index f05996d2fbcf22ef9fb59724248548a4c370bcd6..939c73a142e21bb509240639c212a8244526bb14 100644 (file)
@@ -18,7 +18,6 @@ function viewsrc_content(App $a)
        $item_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
 
        if (!$item_id) {
-               $a->error = 404;
                notice(L10n::t('Item not found.') . EOL);
                return;
        }
index 9cde12499859cf5878910a87931f292374ae0725..328a1a15226652ff8b7cf0d1054b49ff07864088 100644 (file)
@@ -49,7 +49,6 @@ class App
        public $page_contact;
        public $content;
        public $data = [];
-       public $error = false;
        public $cmd = '';
        public $argv;
        public $argc;
@@ -1252,9 +1251,7 @@ class App
 
                        // "rawContent" is especially meant for technical endpoints.
                        // This endpoint doesn't need any theme initialization or other comparable stuff.
-                       if (!$this->error) {
                                call_user_func([$this->module_class, 'rawContent']);
-                       }
                }
 
                // Load current theme info after module has been initialized as theme could have been set in module
@@ -1269,24 +1266,20 @@ class App
                }
 
                if ($this->module_class) {
-                       if (! $this->error && $_SERVER['REQUEST_METHOD'] === 'POST') {
+                       if ($_SERVER['REQUEST_METHOD'] === 'POST') {
                                Core\Hook::callAll($this->module . '_mod_post', $_POST);
                                call_user_func([$this->module_class, 'post']);
                        }
 
-                       if (! $this->error) {
                                Core\Hook::callAll($this->module . '_mod_afterpost', $placeholder);
                                call_user_func([$this->module_class, 'afterpost']);
-                       }
 
-                       if (! $this->error) {
                                $arr = ['content' => $content];
                                Core\Hook::callAll($this->module . '_mod_content', $arr);
                                $content = $arr['content'];
                                $arr = ['content' => call_user_func([$this->module_class, 'content'])];
                                Core\Hook::callAll($this->module . '_mod_aftercontent', $arr);
                                $content .= $arr['content'];
-                       }
                }
 
                // initialise content region
index 79971cd9998e24045181d4249418220e00e11e68..3c4ca6fed5a66aca2b55495da4f9e8e767bfe428 100644 (file)
@@ -113,7 +113,6 @@ class Profile
                if (!DBA::isResult($user) && empty($profiledata)) {
                        Logger::log('profile error: ' . $a->query_string, Logger::DEBUG);
                        notice(L10n::t('Requested account is not available.') . EOL);
-                       $a->error = 404;
                        return;
                }
 
@@ -131,7 +130,6 @@ class Profile
                if (empty($pdata) && empty($profiledata)) {
                        Logger::log('profile error: ' . $a->query_string, Logger::DEBUG);
                        notice(L10n::t('Requested profile is not available.') . EOL);
-                       $a->error = 404;
                        return;
                }