*
* @license http://nucleuscms.org/license.txt GNU General Public License
* @copyright Copyright (C) 2002-2009 The Nucleus Group
- * @version $Id: SKIN.php 1813 2012-05-02 14:41:57Z sakamocchi $
+ * @version $Id: SKIN.php 1816 2012-05-03 01:40:10Z sakamocchi $
*/
if ( !function_exists('requestVar') )
{
global $manager;
- $manager->notify(
- 'PreAddSkin',
- array(
- 'name' => &$name,
- 'description' => &$desc,
- 'type' => &$type,
- 'includeMode' => &$includeMode,
- 'includePrefix' => &$includePrefix
- )
+ $data = array(
+ 'name' => &$name,
+ 'description' => &$desc,
+ 'type' => &$type,
+ 'includeMode' => &$includeMode,
+ 'includePrefix' => &$includePrefix
);
+ $manager->notify('PreAddSkin', $data);
$query = "INSERT INTO %s (sdname, sddesc, sdtype, sdincmode, sdincpref) VALUES (%s, %s, %s, %s, %s);";
$sdname = DB::quoteValue($name);
DB::execute($query);
$newid = DB::getInsertId();
- $manager->notify(
- 'PostAddSkin',
- array(
- 'skinid' => $newid,
- 'name' => $name,
- 'description' => $desc,
- 'type' => $type,
- 'includeMode' => $includeMode,
- 'includePrefix' => $includePrefix
- )
+ $data = array(
+ 'skinid' => $newid,
+ 'name' => $name,
+ 'description' => $desc,
+ 'type' => $type,
+ 'includeMode' => $includeMode,
+ 'includePrefix' => $includePrefix
);
+ $manager->notify('PostAddSkin', $data);
+
return $newid;
}
{
global $currentSkinName, $manager, $CONF, $DIR_NUCLEUS;
- $manager->notify("Init{$this->event_identifier}Parse", array('skin' => &$this, 'type' => $type));
+ $data = array(
+ 'skin' => &$this,
+ 'type' => $type
+ );
+ $manager->notify("Init{$this->event_identifier}Parse", $data);
// include skin locale file for <%text%> tag if useable
$this->includeTranslation();
}
}
- $manager->notify("Pre{$this->event_identifier}Parse", array('skin' => &$this, 'type' => $type, 'contents' => &$contents));
+ $data = array(
+ 'skin' => &$this,
+ 'type' => $type,
+ 'contents' => &$contents
+ );
+ $manager->notify("Pre{$this->event_identifier}Parse", $data);
// set IncludeMode properties of parser
Parser::setProperty('IncludeMode', $this->getIncludeMode());
$handler->setSkin($this);
$parser->parse($contents);
- $manager->notify("Post{$this->event_identifier}Parse", array('skin' => &$this, 'type' => $type));
+ $data = array(
+ 'skin' => &$this,
+ 'type' => $type
+ );
+ $manager->notify("Post{$this->event_identifier}Parse", $data);
+
return;
}
else if( $skintypevalue && !$skintypeexists )
{
$data = array(
- 'skinid' => $this->id,
- 'type' => $type,
- 'content' => &$content
+ 'skinid' => $this->id,
+ 'type' => $type,
+ 'content' => &$content
);
$manager->notify("PreAdd{$this->event_identifier}Part", $data);
else if( !$skintypevalue && $skintypeexists )
{
$data = array(
- 'skinid' => $this->id,
- 'type' => $type
+ 'skinid' => $this->id,
+ 'type' => $type
);
$manager->notify("PreDelete{$this->event_identifier}Part", $data);