Ignore:
Timestamp:
Feb 24, 2011, 4:45:43 PM (13 years ago)
Author:
patdenice
Message:

Plugins can add their own modules.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/PWG_Stuffs/admin/functions.inc.php

    r6230 r9369  
    11<?php
    22
    3 function get_stuffs_modules()
     3function get_default_stuffs_modules($modules)
    44{
    5         $dir = opendir(STUFFS_PATH . 'modules/');
    6     while ($file = readdir($dir)) {
    7         if ($file != '.' and $file != '..' and $file != '.svn') {
    8             $path = STUFFS_PATH . 'modules/' . $file;
    9             if (is_dir($path) and !is_link($path)) {
    10                 $modules[$file] = array('type' => $file,
    11                     'name' => l10n('module_name_' . strtolower($file)),
    12                     'description' => l10n('module_desc_' . strtolower($file)));
    13             }
    14         }
     5  $dir = opendir(STUFFS_PATH . 'modules/');
     6  while ($file = readdir($dir))
     7  {
     8    if ($file != '.' and $file != '..' and $file != '.svn')
     9    {
     10      $path = STUFFS_PATH . 'modules/' . $file;
     11      if (is_dir($path) and !is_link($path))
     12      {
     13        array_push($modules, array(
     14          'path' => $path,
     15          'name' => l10n('module_name_' . strtolower($file)),
     16          'description' => l10n('module_desc_' . strtolower($file)),
     17          )
     18        );
     19      }
    1520    }
    16     closedir($dir);
    17     uasort($modules, 'name_compare');
    18     return $modules;
     21  }
     22  closedir($dir);
     23  return $modules;
    1924}
    2025
Note: See TracChangeset for help on using the changeset viewer.