View Issue Details

IDProjectCategoryView StatusLast Update
0015433phpList 3 applicationInterface - Backendpublic05-10-15 13:53
Reporteradrian15 Assigned To 
Status resolvedResolutionwon't fix 
Product VersionFuture developments 
Target VersionFuture developments 
Summary0015433: Simple configure patch
DescriptionThis patch lets you define in config.php the options that the configure page should show the normal admin to edit.

In some hosted solutions you might not like that values like domain or webpage might be changed (because it screws installation) so you can avoid their change.

Actually the patch does not avoid actual change, I mean, the admin, can manage to type the correspondent url to change the fields that are not found in the simple configure. If you need more security (meaning smart admin screwing their own installation) you will need to hack it yourself.

TagsNo tags attached.


12-04-10 19:41


C08_simple_configure.patch (2,038 bytes)   
diff -urN linkaadmin_simple_configure_before/lists/admin/configure.php linkaadmin_simple_configure_after/lists/admin/configure.php
--- linkaadmin_simple_configure_before/lists/admin/configure.php	2010-04-10 07:10:28.000000000 +0200
+++ linkaadmin_simple_configure_after/lists/admin/configure.php	2010-04-10 08:42:21.000000000 +0200
@@ -39,6 +39,7 @@
 if (!$id) {
   while (list($key,$val) = each($default_config)) {
+    if ((isSuperUser()) || (!(ENABLE_CUSTOM_CONFIGURE))  || (in_array($key,$custom_configure_fields))   )  {
     if (is_array($val)) {
       $dbval = getConfig($key);
       if (isset($dbval))
@@ -48,6 +49,7 @@
       printf('<p><a href="%s">%s</a> <b>%s</b><br/>',PageURL2("configure","","id=$key"),$GLOBALS['I18N']->get('edit'),$GLOBALS['I18N']->get($val[1]));
       print nl2br(htmlspecialchars(stripslashes($value))) . "<br/><hr/>";
+    }
 } else {
   $val = $default_config[$id];
diff -urN linkaadmin_simple_configure_before/lists/config/config.php linkaadmin_simple_configure_after/lists/config/config.php
--- linkaadmin_simple_configure_before/lists/config/config.php	2010-04-10 07:10:48.000000000 +0200
+++ linkaadmin_simple_configure_after/lists/config/config.php	2010-04-10 08:42:35.000000000 +0200
@@ -686,6 +686,13 @@
 # very welcome!
 $database_module = "";
+# Custom configure fields for non superadmins admins
+$custom_configure_fields = array ("subscribesubject","subscribemessage","unsubscribesubject","unsubscribemessage", "confirmationsubject","confirmationmessage","updatesubject","updatemessage","emailchanged_text","emailchanged_text_oldaddress","personallocation_subject","personallocation_message","messagefooter","forwardfooter","pageheader","pagefooter","html_email_style");
 # you can store sessions in the database instead of the default place by assigning
 # a tablename to this value. The table will be created and will not use any prefixes
 # this only works when using mysql and only for administrator sessions
C08_simple_configure.patch (2,038 bytes)   


14-04-10 14:25

manager   ~0050893

Since, in a way, this would be an extension of the admin permissions settings to include what is displayed on the configuration page: changing feature category from 'Interface - Frontend' to 'Interface - Backend'.

Instead of adding these settings to config.php, wouldn't the admin permissions page be a more logical place to configure this?


14-04-10 14:36

reporter   ~0050895

You are right.

The reason why I used config.php file is to avoid having to modify the database to add these new permissions values to a new? table. Creating the table, setting setup scripts to create the table when you upgrade from an old phplist version and so on.

Too much work if you do not know if it is going to be accepted in upstream.

So you take my patch as a workaround if you want.