Make WordPress Core

Changeset 1071


Ignore:
Timestamp:
04/14/2004 07:04:14 PM (22 years ago)
Author:
saxmatt
Message:

Only include .php files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/plugins.php

    r1015 r1071  
    1111        $current = preg_replace('|\n\s*|', '\n', $current); // I don't know where this is coming from
    1212        update_option('active_plugins', $current);
    13         header('Location: plugins.php');
     13        header('Location: plugins.php?activate=true');
    1414    }
    1515   
     
    1919        $current = preg_replace("|(\n)+\s*|", "\n", $current);
    2020        update_option('active_plugins', trim($current));
    21         header('Location: plugins.php');
     21        header('Location: plugins.php?deactivate=true');
    2222    }
    2323}
     
    4545
    4646?>
     47
     48<?php if ($_GET['activate']) : ?>
     49<div class="updated"><p>Plugin <strong>activated</strong>.</p>
     50</div>
     51<?php endif; ?>
     52<?php if ($_GET['deactivate']) : ?>
     53<div class="updated"><p>Plugin <strong>deactivated</strong>.</p>
     54</div>
     55<?php endif; ?>
     56
    4757<div class="wrap">
    4858<?php
     
    5161if ($plugins_dir) {
    5262    while(($file = $plugins_dir->read()) !== false) {
    53       if (!preg_match('|^\.+$|', $file)) $plugin_files[] = $file;
     63      if ( !preg_match('|^\.+$|', $file) && preg_match('|\.php$|', $file) )
     64        $plugin_files[] = $file;
    5465    }
    5566}
Note: See TracChangeset for help on using the changeset viewer.