]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
backward compatibility code for plugins that add admin pages
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 2 Feb 2011 01:31:05 +0000 (01:31 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 2 Feb 2011 01:31:05 +0000 (01:31 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7985 36083f99-b078-4883-b0ff-0f9b5a30f544

views/default/layout/shells/two_column_left_sidebar.php
views/default/page/shells/default.php

index d2dc81e38de1e01f003ffa7c41607fe2d56dde35..247ba920b18fb998f5fd1bcca5ed972600ae5fbc 100644 (file)
@@ -16,4 +16,11 @@ unset($vars['area1']);
 unset($vars['area2']);
 unset($vars['area3']);
 
+// backward compatability support for plugins that are not using the new approach
+// of routing through pg/admin
+if (elgg_get_context() == 'admin') {
+       echo elgg_view('layout/shells/admin', $vars);
+       return true;
+}
+
 echo elgg_view('layout/shells/one_sidebar', $vars);
index 8b53bc16da717d88185064a6b612a07c8e31fce8..b239b6339dce8e534922e22d00d5ed6f9045729c 100644 (file)
  * @uses $vars['sysmessages'] A 2d array of various message registers, passed from system_messages()
  */
 
+// backward compatability support for plugins that are not using the new approach
+// of routing through pg/admin. See reportedcontent plugin for a simple example.
+if (elgg_get_context() == 'admin') {
+       elgg_deprecated_notice("admin plugins should route through pg/admin.", 1.8);
+       elgg_admin_add_plugin_settings_menu();
+       elgg_unregister_css('screen');
+       echo elgg_view('page/shells/admin', $vars);
+       return true;
+}
+
 // Set the content type
 header("Content-type: text/html; charset=UTF-8");