]> git.mxchange.org Git - friendica.git/blobdiff - mod/admin.php
Merge branch 'master' of https://github.com/annando/friendica
[friendica.git] / mod / admin.php
index c951dd8b9cd7d4d1b3bb0f58fa9adc900f8e7ceb..89363541ca8154a2c8223f32d1e0ea2dc9542378 100644 (file)
@@ -455,16 +455,7 @@ function admin_page_site(&$a) {
        );
 
        $t = get_markup_template("admin_site.tpl");
-
-       $includes = array(
-               '$field_checkbox'       => 'field_checkbox.tpl',
-               '$field_input'          => 'field_input.tpl',
-               '$field_select'         => 'field_select.tpl',
-               '$field_textarea'       => 'field_textarea.tpl',
-       );
-       $includes = set_template_includes($a->theme['template_engine'], $includes);
-
-       return replace_macros($t, $includes + array(
+       return replace_macros($t, array(
                '$title' => t('Administration'),
                '$page' => t('Site'),
                '$submit' => t('Submit'),
@@ -719,6 +710,16 @@ function admin_page_users(&$a){
        $users = array_map("_setup_users", $users);
        
        
+       // Get rid of dashes in key names, Smarty3 can't handle them
+       foreach($users as $key => $user) {
+               $new_user = array();
+               foreach($user as $k => $v) {
+                       $k = str_replace('-','_',$k);
+                       $new_user[$k] = $v;
+               }
+               $users[$key] = $new_user;
+       }
+
        $t = get_markup_template("admin_users.tpl");
        $o = replace_macros($t, array(
                // strings //
@@ -1144,14 +1145,7 @@ readable.");
                }
        }                       
 
-       $includes = array(
-               '$field_checkbox'       => 'field_checkbox.tpl',
-               '$field_input'          => 'field_input.tpl',
-               '$field_select'         => 'field_select.tpl',
-       );
-       $includes = set_template_includes($a->theme['template_engine'], $includes);
-
-       return replace_macros($t, $includes + array(
+       return replace_macros($t, array(
                '$title' => t('Administration'),
                '$page' => t('Logs'),
                '$submit' => t('Submit'),
@@ -1210,14 +1204,7 @@ function admin_page_remoteupdate(&$a) {
        }
        
        $tpl = get_markup_template("admin_remoteupdate.tpl");
-
-       $includes = array(
-               '$field_input'          => 'field_input.tpl',
-               '$field_password'       => 'field_password.tpl',
-       );
-       $includes = set_template_includes($a->theme['template_engine'], $includes);
-
-       return replace_macros($tpl, $includes + array(
+       return replace_macros($tpl, array(
                '$baseurl' => $a->get_baseurl(true),
                '$submit' => t("Update now"),
                '$close' => t("Close"),