]> git.andy128k.dev Git - ipf.git/commitdiff
admin: move repeating params to context
authorAndrey Kutejko <andy128k@gmail.com>
Tue, 17 Dec 2013 05:12:35 +0000 (07:12 +0200)
committerAndrey Kutejko <andy128k@gmail.com>
Tue, 17 Dec 2013 05:14:25 +0000 (07:14 +0200)
ipf/admin/app.php
ipf/admin/model.php
ipf/admin/views.php

index 0af7c96c4f24d0b9aa6a5f19ea927881c2f6c90c..8c74d61c669614c79be7cda8d02e455fae85211d 100644 (file)
@@ -32,6 +32,8 @@ class IPF_Admin_App extends IPF_Application
         return array(
             'IPF_VER' => IPF::version(),
             'ADMIN_MEDIA_URL' => IPF::get('static_url') . 'admin/',
+            'admin_title' => IPF::get('admin_title'),
+            'indexpage_url' => IPF::get('indexpage_url', '/'),
         );
     }
 
index 794cf3f042939f3742b18f6383374823db380318..d39f99262c9d55b73f2fbb2e14315ccf13e4a858 100644 (file)
@@ -682,8 +682,6 @@ class IPF_Admin_Model
             'lapp'=>$lapp,
             'perms'=>$perms,
             'lmodel'=>$lmodel,
-            'admin_title' => IPF::get('admin_title'),
-            'indexpage_url'=>IPF::get('indexpage_url','/'),
             'objecttools' => array(),
         );
         return $this->renderToResponse($this->_getAddTemplate(), $context, $request);
@@ -713,8 +711,6 @@ class IPF_Admin_Model
             'lmodel'=>$lmodel,
             'affected'=>array(),
             'ipf_referrer'=>@$request->GET['ipf_referrer'],
-            'admin_title' => IPF::get('admin_title'),
-            'indexpage_url'=>IPF::get('indexpage_url','/'),
         );
         return $this->renderToResponse('admin/delete.html', $context, $request);
     }
@@ -785,8 +781,6 @@ class IPF_Admin_Model
             'lapp'=>$lapp,
             'perms'=>$perms,
             'lmodel'=>$lmodel,
-            'admin_title' => IPF::get('admin_title'),
-            'indexpage_url'=>IPF::get('indexpage_url','/'),
             'objecttools' => $objecttools,
         );
         return $this->renderToResponse($this->_getChangeTemplate(), $context, $request);
@@ -841,12 +835,10 @@ class IPF_Admin_Model
             'title_add'=>$this->titleAdd(),
             'perms'=>$perms,
             'filters'=>$this->filters,
-            'admin_title' => IPF::get('admin_title'),
             'is_search' => $this->_isSearch(),
             'search_value' => $this->search_value,
             'lapp'=>$lapp,
             'lmodel'=>$lmodel,
-            'indexpage_url'=>IPF::get('indexpage_url','/'),
         );
         return $this->renderToResponse($this->_getListTemplate(), $context, $request);
     }
index c7b87cc1b7c92d8ce2ff8c668d17547a2bb9c2d3..b650d95233c75206e7af0dda5cd27729987dee98 100644 (file)
@@ -51,8 +51,6 @@ function IPF_Admin_Views_Index($request, $match)
         'page_title' => __('Site Administration'),
         'app_list' => $app_list,
         'admin_log' => $admin_log,
-        'admin_title' => IPF::get('admin_title'),
-        'indexpage_url'=>IPF::get('indexpage_url','/'),
     );
     return IPF_Shortcuts::RenderToResponse('admin/index.html', $context, $request);
 }
@@ -262,8 +260,6 @@ function IPF_Admin_Views_ChangePassword($request, $match)
                 'extra_js' => array(),
                 'lapp'=>$lapp,
                 'lmodel'=>$lmodel,
-                'admin_title' => IPF::get('admin_title'),
-                'indexpage_url'=>IPF::get('indexpage_url','/'),
             );
                 
             return IPF_Shortcuts::RenderToResponse('admin/changepassword.html', $context, $request);
@@ -296,8 +292,6 @@ function IPF_Admin_Views_Login($request, $match)
         'form' => $form,
         'form_html' => IPF_Admin_App::renderForm($form),
         'extra_js' => $form->extra_js(),
-        'admin_title' => IPF::get('admin_title'),
-        'indexpage_url'=>IPF::get('indexpage_url','/'),
     );
     return IPF_Shortcuts::RenderToResponse('admin/login.html', $context, $request);
 }
@@ -307,8 +301,6 @@ function IPF_Admin_Views_Logout($request, $match)
     IPF_Auth_App::logout($request);
     $context = array(
        'page_title' => IPF::get('admin_title'),
-       'admin_title' => IPF::get('admin_title'),
-       'indexpage_url'=>IPF::get('indexpage_url','/'),
     );
     return IPF_Shortcuts::RenderToResponse('admin/logout.html', $context, $request);
 }
@@ -456,7 +448,6 @@ function IPF_Admin_Views_FileBrowser($request, $match)
         'path' => $path,
         'upload_url' => $upload_url,
         'curr_dir' => $curr_dir,
-        'indexpage_url'=>IPF::get('indexpage_url','/'),
     );
     return IPF_Shortcuts::RenderToResponse('admin/filebrowser.html', $context, $request);
 }