+* option for sorting direction
* Automatic upgrades of DB
+* drop in updates
* Definition of fields in "card view"
* User and groupmanagement: Check where a user or group is used!
* Better error handling and display while adding / update and delete
* Export of an entry, collection or everything. Stored on disk.
* Import of the export
-* drop in updates
+
* responsive and breakpoints
* Field management: Web interface
* minimal theme
-* Automatic upgrade from DB changes
*
* @var mysqli
*/
- private $_DB;
+ private mysqli $_DB;
/**
* The user object to query with
*
* @var Doomguy
*/
- private $_User;
+ private Doomguy $_User;
/**
* The collection we are working with
*
- * @var integer
+ * @var string
*/
- private $_collectionId;
+ private string $_collectionId;
/**
* Which db cols should not be removed
*
* @var array
*/
- private $_protectedDBCols = array(
+ private array $_protectedDBCols = array(
'id','created','modified','modificationuser','owner','group','rights'
);
*
* @var array
*/
- private $_cacheExistingSysFields = array();
+ private array $_cacheExistingSysFields = array();
/**
* Store available fields info for runtime
*
* @var array
*/
- private $_cacheAvailableFields = array();
+ private array $_cacheAvailableFields = array();
/**
* ManageCollections constructor
/**
* The id from the collection we are working with
*
- * @param integer $id
+ * @param string $id
*/
- public function setCollection($id) {
+ public function setCollection(string $id): void {
if(!empty($id)) {
$this->_collectionId = $id;
}
* @return array
* @todo No rights implemented yet. Maybe not needed. Management done by hand directly on DB
*/
- public function getAvailableFields($refresh=false): array {
+ public function getAvailableFields(bool $refresh=false): array {
if($refresh === false && !empty($this->_cacheAvailableFields)) {
return $this->_cacheAvailableFields;
*
* @var mysqli
*/
- private $_DB;
+ private mysqli $_DB;
/**
* The user object to query with
*
* @var Doomguy
*/
- private $_User;
+ private Doomguy $_User;
/**
* ManageCollections constructor.
* Update the rights from the group to the entries in this collection
*
* @param string $collectionId
- * @param string|bool $owner
- * @param string|bool $group
- * @param string|bool $rights
+ * @param string $owner
+ * @param string $group
+ * @param string $rights
*/
- private function _updateEntryRights(string $collectionId, $owner=false, $group=false, $rights=false) {
+ private function _updateEntryRights(string $collectionId, string $owner='', string $group='', string $rights=''): void {
if(!empty($collectionId)) {
$queryStr = "UPDATE `".DB_PREFIX."_collection_entry_".$collectionId."` SET";
/**
* Make a key=>value array of a comma seperated string and use the value as key
*
- * @param array $data
+ * @param string $data
* @return array
*/
- private function _loadAdvancedSearchTableFields(array $data): array {
+ private function _loadAdvancedSearchTableFields(string $data): array {
$ret = array();
$_t = explode(',',$data);