[TikiWiki-commits] [Git][tikiwiki/tiki][master] [NEW] Add a preference to define the default maximum number of archives for each file

"ushindi bienvenu \(@usbbush\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <69d196c6208d7_3b2bbc8d8652e6@gitlab-sidekiq-low-urgency-cpu-bound-v2-664f654ff4-bkmhz.mail>

ushindi bienvenu pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
872c7e8c by NasserNgandu at 2026-04-04T22:43:18+00:00
[NEW] Add a preference to define the default maximum number of archives for each file
---
* [FIX] Code Correct.

* [NEW] Add a preference to define the default maximum number of archives for each file

See merge request tikiwiki/tiki!9940

- - - - -


3 changed files:

- lib/Filegals/FileGalLib.php
- lib/prefs/fgal.php
- templates/admin/include_fgal.tpl


Changes:

=====================================
lib/Filegals/FileGalLib.php
=====================================
@@ -604,7 +604,7 @@ class FileGalLib extends TikiLib
             'direct' => null,
             'parentId' => $prefs['fgal_root_id'],
             'lockable' => 'n',
-            'archives' => 0,
+            'archives' => $prefs['fgal_file_max_archives'],
             'quota' => $prefs['fgal_quota_default'],
             'image_max_size_x' => $prefs['fgal_image_max_size_x'],
             'image_max_size_y' => $prefs['fgal_image_max_size_y'],


=====================================
lib/prefs/fgal.php
=====================================
@@ -720,6 +720,15 @@ When the limit is reached, no more files can be uploaded. The user will see an e
             'default' => '250',
             'units' => 'pixels'
         ],
+        'fgal_file_max_archives' => [
+            'name' => tra('Default maximum number of archives for each file'),
+            'description' => tra('The default maximum number of archives for each file'),
+            'shorthint' => tra('Use: 0=unlimited, -1=none.'),
+            'type' => 'text',
+            'filter' => 'int',
+            'size' => 4,
+            'default' => 0
+        ],
         'fgal_export_diagram_on_image_save' => [
             'name' => tra('Export diagram image on save'),
             'description' => tra('If enabled, diagrams will be cached in PNG format when saved or edited.'),


=====================================
templates/admin/include_fgal.tpl
=====================================
@@ -108,6 +108,7 @@
                 {preference name='file_galleries_redirect_from_image_gallery'}
                 {preference name='fgal_convert_documents_pdf'}
                 {preference name='fgal_maximum_image_width_preview'}
+                {preference name='fgal_file_max_archives'}
             </fieldset>
 
             <fieldset>



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/872c7e8c0ecf4e0299cd891dfcf76f043b45e65f

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/872c7e8c0ecf4e0299cd891dfcf76f043b45e65f
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.