Skip to content
Snippets Groups Projects
Select Git revision
  • be8e898d23a3f9ca515f59fbcc8d82e112ed7ee8
  • 11.x default protected
  • 10.5.x protected
  • 10.6.x protected
  • 11.2.x protected
  • 11.1.x protected
  • 10.4.x protected
  • 11.0.x protected
  • 10.3.x protected
  • 7.x protected
  • 10.2.x protected
  • 10.1.x protected
  • 9.5.x protected
  • 10.0.x protected
  • 9.4.x protected
  • 9.3.x protected
  • 9.2.x protected
  • 9.1.x protected
  • 8.9.x protected
  • 9.0.x protected
  • 8.8.x protected
  • 10.5.2 protected
  • 11.2.3 protected
  • 10.5.1 protected
  • 11.2.2 protected
  • 11.2.1 protected
  • 11.2.0 protected
  • 10.5.0 protected
  • 11.2.0-rc2 protected
  • 10.5.0-rc1 protected
  • 11.2.0-rc1 protected
  • 10.4.8 protected
  • 11.1.8 protected
  • 10.5.0-beta1 protected
  • 11.2.0-beta1 protected
  • 11.2.0-alpha1 protected
  • 10.4.7 protected
  • 11.1.7 protected
  • 10.4.6 protected
  • 11.1.6 protected
  • 10.3.14 protected
41 results

admin.php

Blame
  • Dries Buytaert's avatar
    Dries Buytaert authored
    - Uhm.  Rewrote the module system: less code clutter, less run-time
      overhead, and a lot better (simpler) module API.  I had to edit a
      LOT of files to get this refactored but I'm sure it was worth the
      effort.
    
      For module writers / maintainers:
    
      None of the hooks changed, so 95% of the old modules should still
      work.  You can remove some code instead as "$module = array(...)"
      just became obsolete.  Also - and let's thank God for this - the
      global variable "$repository" has been eliminated to avoid modules
      relying on, and poking in drupal's internal data structures.  Take
      a look at include/module.inc to investigate the details/changes.
    
    - Improved design of the content modules "story", "book" and "node"
      (to aid smooth integration of permisions + moderate.module).  I'm
      still working on the permissions but I got side tracked for which
      I "Oops!".
    be8e898d
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    admin.php 1.40 KiB
    <?php
    
    include_once "includes/common.inc";
    
    // validate user access:
    if (!user_access($user)) exit();
    
    function status($message) {
      if ($message) return "<B>Status:</B> $message<HR>\n";
    }
    
    function admin_page($mod) {
      global $menu, $user;
    
      function module($name) {
        global $menu, $user;
        if (function_exists($name. "_admin") && user_access($user, $name)) $output .= "<A HREF=\"admin.php?mod=$name\">$name</A> | ";
        $menu .= $output;
      }
    
     ?>
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      <HTML>
       <HEAD><TITLE><?php echo variable_get(site_name, "drupal"); ?> administration</TITLE></HEAD>
       <STYLE>
        body { font-family: helvetica, arial; }
        h1   { font-size: 18pt; font-weight: bold; color: #990000; }
        h2   { font-family: helvetica, arial; font-size: 18pt; font-weight: bold; }
        h3   { font-family: helvetica, arial; font-size: 14pt; font-weight: bold; }
        th   { font-family: helvetica, arial; text-align: center; vertical-align: top; background-color: #CCCCCC; color: #995555; }
        td   { font-family: helvetica, arial; }
       </STYLE>
       <BODY BGCOLOR="#FFFFFF" LINK="#005599" VLINK="#004499" ALINK="#FF0000">
        <H1>Administration</H1>
        <?php module_iterate("module"); ?>
        <HR><?php echo $menu; ?><A HREF="index.php">home</A><HR>
        <?php if (user_access($user, $mod)) module_invoke($mod, "admin"); ?>
      </BODY>
     </HTML>
     <?php
    }
    
    user_rehash();
    admin_page($mod);
    
    ?>