<?php
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of Dotclear 2.
#
# Copyright (c) 2003-2008 Olivier Meunier and contributors
# Licensed under the GPL version 2.0 license.
# See LICENSE file or
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE BLOCK ------------------------------------
if (!defined('DC_CONTEXT_ADMIN')) { return; }

$core->addBehavior('adminPostHeaders',array('externalMediaBehaviors','postHeaders'));
$core->addBehavior('adminPageHeaders',array('externalMediaBehaviors','postHeaders'));
$core->addBehavior('adminRelatedHeaders',array('externalMediaBehaviors','postHeaders'));

class externalMediaBehaviors
{
	public static function postHeaders()
	{
		return
		'<script type="text/javascript" src="index.php?pf=externalMedia/post.js"></script>'.
		'<script type="text/javascript">'."\n".
		"//<![CDATA[\n".
		dcPage::jsVar('jsToolBar.prototype.elements.extmedia.title',__('External media')).
		"\n//]]>\n".
		"</script>\n";
	}
}
?>