Skip to content
This repository was archived by the owner on Jan 10, 2021. It is now read-only.

Commit

Permalink
Moving the module configuration out to a more relevant location.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Glasl committed May 1, 2015
1 parent 84d84d8 commit 9a49489
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
7 changes: 6 additions & 1 deletion _config.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
if(!defined('MEDIAWESOME_PATH')) {
define('MEDIAWESOME_PATH', rtrim(basename(dirname(__FILE__))));
}
MediaType::apply_requirements();

// Update the current media holder/page images.

$configuration = Config::inst();
$configuration->update('MediaHolder', 'icon', MEDIAWESOME_PATH . '/images/holder.png');
$configuration->update('MediaPage', 'icon', MEDIAWESOME_PATH . '/images/page.png');

/**
*
Expand Down
12 changes: 0 additions & 12 deletions code/dataobjects/MediaType.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,6 @@ class MediaType extends DataObject {
private static $custom_defaults = array(
);

/**
* Apply all Mediawesome required extensions.
*/

public static function apply_requirements() {

// Update the current media holder/page images.

Config::inst()->update('MediaHolder', 'icon', MEDIAWESOME_PATH . '/images/holder.png');
Config::inst()->update('MediaPage', 'icon', MEDIAWESOME_PATH . '/images/page.png');
}

/**
* Apply a custom default media type with no respective attributes.
* NOTE: Refer to the module configuration example.
Expand Down

0 comments on commit 9a49489

Please sign in to comment.