Skip to content

Instantly share code, notes, and snippets.

@onre
Created August 7, 2012 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onre/3284106 to your computer and use it in GitHub Desktop.
Save onre/3284106 to your computer and use it in GitHub Desktop.
<?php
class ClientScript extends CClientScript
{
protected $disabledCoreScripts = array();
public function disableCoreScript($script)
{
$this->disabledCoreScripts[] = $script;
}
public function registerCoreScript($script)
{
if(array_search($script, $this->disabledCoreScripts) === false)
return parent::registerCoreScript($script);
else
return $this;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment