Author: ralfbecker
New Revision: 55980
URL: http://svn.stylite.de/viewvc/egroupware?rev=55980&view=rev
Log:
to allow installing api or EGroupware without phpgwapi, old exceptions which we have to extend in order allow old apps to catch exceptions thrown from new api, have to reside in api/inc and get autoloaded
Added:
trunk/egroupware/api/inc/
trunk/egroupware/api/inc/class.egw_exception_db.inc.php
- copied, changed from r55978, trunk/phpgwapi/inc/class.egw_exception.inc.php
trunk/egroupware/api/inc/class.egw_exception_db_invalid_sql.inc.php
- copied, changed from r55978, trunk/phpgwapi/inc/class.egw_exception.inc.php
trunk/egroupware/api/inc/class.egw_exception_no_permission.inc.php
- copied, changed from r55978, trunk/phpgwapi/inc/class.egw_exception.inc.php
Modified:
trunk/egroupware/api/src/Accounts/Sql.php
trunk/egroupware/api/src/Etemplate/Widget/ItemPicker.php
trunk/egroupware/api/src/Etemplate/Widget/Select.php
trunk/egroupware/api/src/Etemplate/Widget/Taglist.php
trunk/egroupware/api/src/Etemplate/Widget/Textbox.php
trunk/egroupware/api/src/Mail.php
trunk/egroupware/api/src/MimeMagic.php
trunk/egroupware/api/src/Vfs/Sharing.php
trunk/egroupware/api/src/autoload.php
trunk/egroupware/api/src/loader/exception.php
trunk/phpgwapi/inc/class.egw_exception.inc.php
— trunk/phpgwapi/inc/class.egw_exception.inc.php (original)
+++ trunk/egroupware/api/inc/class.egw_exception_db.inc.php Mon May 2 18:57:50 2016
@@ -14,61 +14,6 @@
use EGroupware\Api;
/**
-
- eGroupWare API - Exceptions
-
-
- All eGroupWare exceptions should extended this class, so we are able to eg. add some logging later.
-
-
- The messages for most exceptions should be translated and ready to be displayed to the user.
-
- Only exception to this are exceptions like egw_exception_assertion_fails, egw_exception_wrong_parameter
-
- or egw_exception_db, which are suppost to happen only during program development.
-
-
-
@deprecated use Api\Exception
- */
-class egw_exception extends Api\Exception {}
-
-/**
-
- Base class for all exceptions about missing permissions
-
-
- New NoPermisison excpetion has to extend deprecated egw_exception_no_permission
-
- to allow legacy code to catch them!
-
-
-
@deprecated use Api\Exception\NoPermission
- */
-class egw_exception_no_permission extends Api\Exception {}
-
-/**
-
- A record or application entry was not found for the given id
-
-
-
@deprecated use Api\Exception\NotFound
- */
-class egw_exception_not_found extends Api\Exception\NotFound {}
-
-/**
-
- An necessary assumption the developer made failed, regular execution can not continue
-
-
- As you get this only by an error in the code or during development, the message does not need to be translated
-
-
-
@deprecated use Api\Exception\AssertionFailed
- */
-class egw_exception_assertion_failed extends Api\Exception\AssertionFailed {}
-
-/**
-
- A method or function was called with a wrong or missing parameter
-
-
- As you get this only by an error in the code or during development, the message does not need to be translated
-
-
-
@deprecated use Api\Exception\WrongParameter
- */
-class egw_exception_wrong_parameter extends Api\Exception\WrongParameter {}
-
-/**
-
- Wrong or missing required user input: message should be translated so it can be shown directly to the user
-
-
-
@deprecated use Api\Exception\WrongUserInput
- */
-class egw_exception_wrong_userinput extends Api\Exception\WrongUserInput {}
-
-/**
- Exception thrown by the egw_db class for everything not covered by extended classed below
-
- New Db\Exception has to extend deprecated egw_exception_db to allow legacy code
@@ -77,22 +22,3 @@
-
@deprecated use Api\Db\Exception
*/
class egw_exception_db extends Api\Exception {}
-/**
-
- Classic invalid SQL error
-
-
- New InvalidSql exception has to extend deprecated egw_exception_db_invalid_sql
-
- to allow legacy code to catch exceptions thrown by Api\Db!
-
-
-
@deprecated use Api\Db\Exception\InvalidSql
- */
-class egw_exception_db_invalid_sql extends Api\Db\Exception {}
-
-/**
-
- Allow callbacks to request a redirect
-
-
- Can be caught be applications and is otherwise handled by global exception handler.
-
-
-
@deprecated use Api\Db\Exception\Redirect
- */
-class egw_exception_redirect extends Api\Exception\Redirect {}
— trunk/phpgwapi/inc/class.egw_exception.inc.php (original)
+++ trunk/egroupware/api/inc/class.egw_exception_db_invalid_sql.inc.php Mon May 2 18:57:50 2016
@@ -14,71 +14,6 @@
use EGroupware\Api;
/**
-
- eGroupWare API - Exceptions
-
-
- All eGroupWare exceptions should extended this class, so we are able to eg. add some logging later.
-
-
- The messages for most exceptions should be translated and ready to be displayed to the user.
-
- Only exception to this are exceptions like egw_exception_assertion_fails, egw_exception_wrong_parameter
-
- or egw_exception_db, which are suppost to happen only during program development.
-
-
-
@deprecated use Api\Exception
- */
-class egw_exception extends Api\Exception {}
-
-/**
-
- Base class for all exceptions about missing permissions
-
-
- New NoPermisison excpetion has to extend deprecated egw_exception_no_permission
-
- to allow legacy code to catch them!
-
-
-
@deprecated use Api\Exception\NoPermission
- */
-class egw_exception_no_permission extends Api\Exception {}
-
-/**
-
- A record or application entry was not found for the given id
-
-
-
@deprecated use Api\Exception\NotFound
- */
-class egw_exception_not_found extends Api\Exception\NotFound {}
-
-/**
-
- An necessary assumption the developer made failed, regular execution can not continue
-
-
- As you get this only by an error in the code or during development, the message does not need to be translated
-
-
-
@deprecated use Api\Exception\AssertionFailed
- */
-class egw_exception_assertion_failed extends Api\Exception\AssertionFailed {}
-
-/**
-
- A method or function was called with a wrong or missing parameter
-
-
- As you get this only by an error in the code or during development, the message does not need to be translated
-
-
-
@deprecated use Api\Exception\WrongParameter
- */
-class egw_exception_wrong_parameter extends Api\Exception\WrongParameter {}
-
-/**
-
- Wrong or missing required user input: message should be translated so it can be shown directly to the user
-
-
-
@deprecated use Api\Exception\WrongUserInput
- */
-class egw_exception_wrong_userinput extends Api\Exception\WrongUserInput {}
-
-/**
-
- Exception thrown by the egw_db class for everything not covered by extended classed below
-
-
- New Db\Exception has to extend deprecated egw_exception_db to allow legacy code
-
- to catch exceptions thrown by Api\Db class!
-
-
-
@deprecated use Api\Db\Exception
- */
-class egw_exception_db extends Api\Exception {}
-
-/**
- Classic invalid SQL error
-
- New InvalidSql exception has to extend deprecated egw_exception_db_invalid_sql
@@ -87,12 +22,3 @@
-
@deprecated use Api\Db\Exception\InvalidSql
*/
class egw_exception_db_invalid_sql extends Api\Db\Exception {}
-/**
-
- Allow callbacks to request a redirect
-
-
- Can be caught be applications and is otherwise handled by global exception handler.
-
-
-
@deprecated use Api\Db\Exception\Redirect
- */
-class egw_exception_redirect extends Api\Exception\Redirect {}
— trunk/phpgwapi/inc/class.egw_exception.inc.php (original)
+++ trunk/egroupware/api/inc/class.egw_exception_no_permission.inc.php Mon May 2 18:57:50 2016
@@ -14,19 +14,6 @@
use EGroupware\Api;
/**
-
- eGroupWare API - Exceptions
-
-
- All eGroupWare exceptions should extended this class, so we are able to eg. add some logging later.
-
-
- The messages for most exceptions should be translated and ready to be displayed to the user.
-
- Only exception to this are exceptions like egw_exception_assertion_fails, egw_exception_wrong_parameter
-
- or egw_exception_db, which are suppost to happen only during program development.
-
-
-
@deprecated use Api\Exception
- */
-class egw_exception extends Api\Exception {}
-
-/**
- Base class for all exceptions about missing permissions
-
- New NoPermisison excpetion has to extend deprecated egw_exception_no_permission
@@ -35,64 +22,3 @@
-
@deprecated use Api\Exception\NoPermission
*/
class egw_exception_no_permission extends Api\Exception {}
-/**
-
- A record or application entry was not found for the given id
-
-
-
@deprecated use Api\Exception\NotFound
- */
-class egw_exception_not_found extends Api\Exception\NotFound {}
-
-/**
-
- An necessary assumption the developer made failed, regular execution can not continue
-
-
- As you get this only by an error in the code or during development, the message does not need to be translated
-
-
-
@deprecated use Api\Exception\AssertionFailed
- */
-class egw_exception_assertion_failed extends Api\Exception\AssertionFailed {}
-
-/**
-
- A method or function was called with a wrong or missing parameter
-
-
- As you get this only by an error in the code or during development, the message does not need to be translated
-
-
-
@deprecated use Api\Exception\WrongParameter
- */
-class egw_exception_wrong_parameter extends Api\Exception\WrongParameter {}
-
-/**
-
- Wrong or missing required user input: message should be translated so it can be shown directly to the user
-
-
-
@deprecated use Api\Exception\WrongUserInput
- */
-class egw_exception_wrong_userinput extends Api\Exception\WrongUserInput {}
-
-/**
-
- Exception thrown by the egw_db class for everything not covered by extended classed below
-
-
- New Db\Exception has to extend deprecated egw_exception_db to allow legacy code
-
- to catch exceptions thrown by Api\Db class!
-
-
-
@deprecated use Api\Db\Exception
- */
-class egw_exception_db extends Api\Exception {}
-
-/**
-
- Classic invalid SQL error
-
-
- New InvalidSql exception has to extend deprecated egw_exception_db_invalid_sql
-
- to allow legacy code to catch exceptions thrown by Api\Db!
-
-
-
@deprecated use Api\Db\Exception\InvalidSql
- */
-class egw_exception_db_invalid_sql extends Api\Db\Exception {}
-
-/**
-
- Allow callbacks to request a redirect
-
-
- Can be caught be applications and is otherwise handled by global exception handler.
-
-
-
@deprecated use Api\Db\Exception\Redirect
- */
-class egw_exception_redirect extends Api\Exception\Redirect {}
— trunk/egroupware/api/src/Accounts/Sql.php (original)
+++ trunk/egroupware/api/src/Accounts/Sql.php Mon May 2 18:57:50 2016
@@ -148,7 +148,7 @@
$this->table.’.account_id=’.abs($account_id),
LINE, FILE, false, ‘’, false, 0, $join);
}
@@ -261,7 +261,7 @@
}
}
// ignore not (yet) existing mailaccounts table (does NOT work in PostgreSQL, because of transaction!)
— trunk/egroupware/api/src/Etemplate/Widget/ItemPicker.php (original)
+++ trunk/egroupware/api/src/Etemplate/Widget/ItemPicker.php Mon May 2 18:57:50 2016
@@ -27,7 +27,7 @@
* Constructor
*
* @param string|XMLReader $xml string with xml or XMLReader positioned on the element to construct
-
-
@throws egw_exception_wrong_parameter
-
-
@throws Api\Exception\WrongParameter
*/
public function __construct($xml = ‘’)
{
— trunk/egroupware/api/src/Etemplate/Widget/Select.php (original)
+++ trunk/egroupware/api/src/Etemplate/Widget/Select.php Mon May 2 18:57:50 2016
@@ -77,7 +77,7 @@
* Constructor
*
* @param string|XMLReader $xml string with xml or XMLReader positioned on the element to construct
-
-
@throws egw_exception_wrong_parameter
-
-
@throws Api\Exception\WrongParameter
*/
public function __construct($xml = ‘’)
{
— trunk/egroupware/api/src/Etemplate/Widget/Taglist.php (original)
+++ trunk/egroupware/api/src/Etemplate/Widget/Taglist.php Mon May 2 18:57:50 2016
@@ -30,7 +30,7 @@
* Overrides parent to check for $xml first, prevents errors when instanciated without (via AJAX)
*
* @param string|XMLReader $xml string with xml or XMLReader positioned on the element to construct
-
-
@throws egw_exception_wrong_parameter
-
-
@throws Api\Exception\WrongParameter
*/
public function __construct($xml = ‘’)
{
— trunk/egroupware/api/src/Etemplate/Widget/Textbox.php (original)
+++ trunk/egroupware/api/src/Etemplate/Widget/Textbox.php Mon May 2 18:57:50 2016
@@ -32,7 +32,7 @@
* Constructor
*
* @param string|XMLReader $xml string with xml or XMLReader positioned on the element to construct
-
-
@throws egw_exception_wrong_parameter
-
-
@throws Api\Exception\WrongParameter
*/
public function __construct($xml)
{
— trunk/egroupware/api/src/Mail.php (original)
+++ trunk/egroupware/api/src/Mail.php Mon May 2 18:57:50 2016
@@ -6403,11 +6403,11 @@
}
elseif (is_uploaded_file($_formData[‘file’]))
{
@@ -6808,7 +6808,7 @@
$message = Link::get_data(parse_url($tmpFileName, PHP_URL_HOST), true);
break;
default:
— trunk/egroupware/api/src/MimeMagic.php (original)
+++ trunk/egroupware/api/src/MimeMagic.php Mon May 2 18:57:50 2016
@@ -195,7 +195,7 @@
}
mt_srand(time());
— trunk/egroupware/api/src/Vfs/Sharing.php (original)
+++ trunk/egroupware/api/src/Vfs/Sharing.php Mon May 2 18:57:50 2016
@@ -385,8 +385,8 @@
* @param string $name filename to use for $mode==self::LINK, default basename of $path
* @param string|array $recipients one or more recipient email addresses
* @param array $extra =array() extra data to store
-
-
@throw egw_exception_not_found if $path not found
-
-
@throw egw_excpetion_assertion_failed if user temp. directory does not exist and can not be created
-
-
@throw Api\Exception\NotFound if $path not found
-
-
@throw Api\Exception\AssertionFailed if user temp. directory does not exist and can not be created
-
@return array with share data, eg. value for key ‘share_token’
*/
public static function create($path, $mode, $name, $recipients, $extra=array())
— trunk/egroupware/api/src/autoload.php (original)
+++ trunk/egroupware/api/src/autoload.php Mon May 2 18:57:50 2016
@@ -69,6 +69,8 @@
$app = array_shift($components);
// classes using the new naming schema app_class_name, eg. admin_cmd
if (file_exists($file = EGW_INCLUDE_ROOT.’/’.$app.’/inc/class.’.$class.’.inc.php’) ||
-
// compatibility class in new eGW api dir, eg. exceptions
-
file_exists($file = EGW_INCLUDE_ROOT.'/api/inc/class.'.$class.'.inc.php') ||
// classes using the new naming schema app_class_name, eg. admin_cmd
isset($components[0]) && file_exists($file = EGW_INCLUDE_ROOT.'/'.$app.'/inc/class.'.$app.'_'.$components[0].'.inc.php') ||
// classes with an underscore in their name
— trunk/egroupware/api/src/loader/exception.php (original)
+++ trunk/egroupware/api/src/loader/exception.php Mon May 2 18:57:50 2016
@@ -90,7 +90,7 @@
function egw_exception_handler($e)
{
// handle redirects without logging
- if (is_a($e, ‘egw_exception_redirect’))
- if ($e instanceof Api\Exception\Redirect)
{
egw::redirect($e->url, $e->app);
}
— trunk/phpgwapi/inc/class.egw_exception.inc.php (original)
+++ trunk/phpgwapi/inc/class.egw_exception.inc.php Mon May 2 18:57:50 2016
@@ -25,16 +25,6 @@
-
@deprecated use Api\Exception
*/
class egw_exception extends Api\Exception {}
-/**
-
- Base class for all exceptions about missing permissions
-
-
- New NoPermisison excpetion has to extend deprecated egw_exception_no_permission
-
- to allow legacy code to catch them!
-
-
-
@deprecated use Api\Exception\NoPermission
- */
-class egw_exception_no_permission extends Api\Exception {}
/**
- A record or application entry was not found for the given id
@@ -69,26 +59,6 @@
class egw_exception_wrong_userinput extends Api\Exception\WrongUserInput {}
/**
-
- Exception thrown by the egw_db class for everything not covered by extended classed below
-
-
- New Db\Exception has to extend deprecated egw_exception_db to allow legacy code
-
- to catch exceptions thrown by Api\Db class!
-
-
-
@deprecated use Api\Db\Exception
- */
-class egw_exception_db extends Api\Exception {}
-
-/**
-
- Classic invalid SQL error
-
-
- New InvalidSql exception has to extend deprecated egw_exception_db_invalid_sql
-
- to allow legacy code to catch exceptions thrown by Api\Db!
-
-
-
@deprecated use Api\Db\Exception\InvalidSql
- */
-class egw_exception_db_invalid_sql extends Api\Db\Exception {}
-
-/**
- Allow callbacks to request a redirect
-
- Can be caught be applications and is otherwise handled by global exception handler.
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs