mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:29 +01:00
Property and type handling improvements from Scrutinizer
This commit is contained in:
parent
672c407804
commit
d45070f322
@ -17,8 +17,8 @@ use EGroupware\Api;
|
||||
* @property-read string $app app whos category to change (Categories->app_name)
|
||||
* @property-read array $set category data to set, value of null or "" to remove
|
||||
* @property-read array $old old values to record
|
||||
* @property-read int $cat_id Category ID
|
||||
* @property-read string $cat_name Category name at the time of the change
|
||||
* @property int $cat_id Category ID
|
||||
* @property string $cat_name Category name at the time of the change
|
||||
*/
|
||||
class admin_cmd_category extends admin_cmd
|
||||
{
|
||||
|
@ -14,6 +14,8 @@ use EGroupware\Api;
|
||||
|
||||
/**
|
||||
* admin command: change the password of a given user
|
||||
*
|
||||
* @property int $account Account ID
|
||||
*/
|
||||
class admin_cmd_change_pw extends admin_cmd
|
||||
{
|
||||
|
@ -16,9 +16,9 @@ use EGroupware\Api;
|
||||
*
|
||||
* @property-read string $app app whos category to delete (Categories->app_name)
|
||||
* @property-read array $set category data to set, value of null or "" to remove
|
||||
* @property-read array $old old values to record
|
||||
* @property array $old old values to record
|
||||
* @property-read int $cat_id category ID to delete
|
||||
* @property-read string $cat_name Category name at the time of the change
|
||||
* @property string $cat_name Category name at the time of the change
|
||||
* @property-read boolean $subs Delete subs as well
|
||||
*/
|
||||
class admin_cmd_delete_category extends admin_cmd
|
||||
@ -62,7 +62,7 @@ class admin_cmd_delete_category extends admin_cmd
|
||||
protected function exec($check_only=false)
|
||||
{
|
||||
$cats = new Api\Categories('',$this->app);
|
||||
if(!$this->old && $this->cat_id)
|
||||
if(empty($this->old) && $this->cat_id)
|
||||
{
|
||||
$this->old = $cats->read($this->cat_id);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user