Quick update to admin page



So it's been bothering me that the pages which aren't authorized for limited admins still show up on the admin page. I decided to write a patch for it.

Index: admin/index.php
===================================================================
--- admin/index.php     (revision 478)
+++ admin/index.php     (working copy)
@@ -13,13 +13,16 @@
 <li><a href="" Themes</a></li>
 </ul>
 
-<h1>Edit/Delete Artwork</h1>
+<?php
+       if($admin_level >= 2)
+               print('<h1>Edit/Delete Artwork</h1>
 <ul>
 <li><a href=""
 <li><a href=""> <li><a href=""> <li><a href="" Item</a></li>
-</ul>
+</ul>');
+?>
 
 <h1>Comments</h1>
 <ul>
@@ -27,6 +30,13 @@
 <li><a href="" Comments</a></li>
 </ul>
 
+<?php
+       if($admin_level < 2)
+       {
+               admin_footer();
+               die();
+       }
+?>
 <h1>News</h1>
 <ul>
 <li><a href="" a News Item</a></li>

It's not that big, but something that was slightly annoying.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]