replacing common::egw_exit() with exit, there is no more extra cleanup

This commit is contained in:
Ralf Becker 2016-03-20 16:30:01 +00:00
parent 67cb60b972
commit 1b5429f0ff
8 changed files with 11 additions and 24 deletions

View File

@ -17,7 +17,6 @@ use EGroupware\Api;
// explicitly import old not yet ported classes // explicitly import old not yet ported classes
use egw_framework; use egw_framework;
use common; // egw_exit
/** /**
* Class to represent the persitent information of an eTemplate request * Class to represent the persitent information of an eTemplate request
@ -208,7 +207,7 @@ class Request
{ {
$response = Api\Json\Response::get(); $response = Api\Json\Response::get();
$response->redirect($index_url, false, $app); $response->redirect($index_url, false, $app);
common::egw_exit(); exit;
} }
} }
else else

View File

@ -16,9 +16,6 @@ namespace EGroupware\Api\Etemplate\Widget;
use EGroupware\Api\Etemplate; use EGroupware\Api\Etemplate;
use EGroupware\Api; use EGroupware\Api;
// explicitly import old not yet ported classes
use common; // egw_exit
/** /**
* eTemplate link widgets * eTemplate link widgets
* Deals with creation and display of links between entries in various participating egw applications * Deals with creation and display of links between entries in various participating egw applications
@ -292,7 +289,7 @@ class Link extends Etemplate\Widget
array_shift($files); array_shift($files);
} }
Api\Vfs::download_zip($files, Api\Link::title($app, $id)); Api\Vfs::download_zip($files, Api\Link::title($app, $id));
common::egw_exit(); exit;
} }
} }

View File

@ -17,7 +17,6 @@ use EGroupware\Api\Etemplate;
use EGroupware\Api; use EGroupware\Api;
// explicitly import old not yet ported classes // explicitly import old not yet ported classes
use common;
use mail_compose; use mail_compose;
/** /**
@ -77,7 +76,7 @@ class Taglist extends Etemplate\Widget
header('Content-Type: application/json; charset=utf-8'); header('Content-Type: application/json; charset=utf-8');
echo json_encode($results); echo json_encode($results);
common::egw_exit(); exit;
} }
/** /**

View File

@ -17,7 +17,6 @@ use EGroupware\Api\Etemplate;
use EGroupware\Api; use EGroupware\Api;
// explicitly import old not yet ported classes // explicitly import old not yet ported classes
use common; // egw_exit
use egw_framework; use egw_framework;
egw_framework::includeCSS('/phpgwapi/js/dhtmlxtree/codebase/dhtmlXTree.css'); egw_framework::includeCSS('/phpgwapi/js/dhtmlxtree/codebase/dhtmlXTree.css');
@ -155,7 +154,7 @@ class Tree extends Etemplate\Widget
header('Content-Type: application/json; charset=utf-8'); header('Content-Type: application/json; charset=utf-8');
echo json_encode(self::htmlencode_node($data)); echo json_encode(self::htmlencode_node($data));
common::egw_exit(); exit;
} }
/** /**

View File

@ -175,7 +175,7 @@ class Vfs extends File
header('Content-Type: application/json; charset=utf-8'); header('Content-Type: application/json; charset=utf-8');
echo json_encode($file); echo json_encode($file);
common::egw_exit(); exit;
} }
/** /**

View File

@ -17,7 +17,6 @@ use EGroupware\Api;
use EGroupware\Api\Vfs; use EGroupware\Api\Vfs;
// explicitly list old, not yet ported api classes // explicitly list old, not yet ported api classes
use common; // egw_exist
use egw_framework; use egw_framework;
use asyncservice; use asyncservice;
use egw; // link use egw; // link
@ -193,7 +192,7 @@ class Sharing
header("HTTP/1.1 $status"); header("HTTP/1.1 $status");
header("X-WebDAV-Status: $status", true); header("X-WebDAV-Status: $status", true);
echo "Requested resource '/".htmlspecialchars($token)."' does NOT exist!\n"; echo "Requested resource '/".htmlspecialchars($token)."' does NOT exist!\n";
common::egw_exit(); exit;
} }
// check password, if required // check password, if required
@ -208,7 +207,7 @@ class Sharing
header("HTTP/1.1 $status"); header("HTTP/1.1 $status");
header("X-WebDAV-Status: $status", true); header("X-WebDAV-Status: $status", true);
echo "<html>\n<head>\n<title>401 Unauthorized</title>\n<body>\nAuthorization failed.\n</body>\n</html>\n"; echo "<html>\n<head>\n<title>401 Unauthorized</title>\n<body>\nAuthorization failed.\n</body>\n</html>\n";
common::egw_exit(); exit;
} }
// need to reset fs_tab, as resolve_url does NOT work with just share mounted // need to reset fs_tab, as resolve_url does NOT work with just share mounted
@ -256,7 +255,7 @@ class Sharing
header("HTTP/1.1 $status"); header("HTTP/1.1 $status");
header("X-WebDAV-Status: $status", true); header("X-WebDAV-Status: $status", true);
echo "Requested resource '/".htmlspecialchars($token)."' does NOT exist!\n"; echo "Requested resource '/".htmlspecialchars($token)."' does NOT exist!\n";
common::egw_exit(); exit;
} }
Vfs::$is_root = false; Vfs::$is_root = false;
Vfs::clearstatcache(); Vfs::clearstatcache();
@ -284,7 +283,7 @@ class Sharing
header("HTTP/1.1 $status"); header("HTTP/1.1 $status");
header("X-WebDAV-Status: $status", true); header("X-WebDAV-Status: $status", true);
echo "Failed to create session: ".$GLOBALS['egw']->session->reason."\n"; echo "Failed to create session: ".$GLOBALS['egw']->session->reason."\n";
common::egw_exit(); exit;
} }
// only allow filemanager app (gets overwritten by session::create) // only allow filemanager app (gets overwritten by session::create)
$GLOBALS['egw_info']['user']['apps'] = array( $GLOBALS['egw_info']['user']['apps'] = array(

View File

@ -2,8 +2,6 @@
/** /**
* eGroupWare API: VFS - WebDAV access using the new stream wrapper VFS interface * eGroupWare API: VFS - WebDAV access using the new stream wrapper VFS interface
* *
* Using the PEAR HTTP/WebDAV/Server/Filesystem class (which need to be installed!)
*
* @link http://www.egroupware.org * @link http://www.egroupware.org
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package api * @package api
@ -22,9 +20,6 @@ use HTTP_WebDAV_Server;
use EGroupware\Api\Vfs; use EGroupware\Api\Vfs;
use EGroupware\Api; use EGroupware\Api;
// old, not yet ported api classes
use common; // egw_exit
/** /**
* FileManger - WebDAV access using the new stream wrapper VFS interface * FileManger - WebDAV access using the new stream wrapper VFS interface
* *
@ -783,7 +778,7 @@ class WebDAV extends HTTP_WebDAV_Server_Filesystem
echo "</body>\n</html>\n"; echo "</body>\n</html>\n";
common::egw_exit(); exit;
} }
/** /**

View File

@ -265,9 +265,8 @@ class common
/** /**
* function to stop running an app * function to stop running an app
* *
* used to stop running an app in the middle of execution <br>
* There may need to be some cleanup before hand
* @param $call_footer boolean value to if true then call footer else exit * @param $call_footer boolean value to if true then call footer else exit
* @deprecated use $GLOBALS['egw']->framework->footer(), if necessary, and exit
*/ */
static function egw_exit($call_footer = False) static function egw_exit($call_footer = False)
{ {