public function actionUninstall($name=false)
	{
		if ($name == false)
			return false;

		if ($name == 'default')
			throw new CHttpException(400, Yii::t('Api.theme', 'You cannot uninstall the default theme.'));

		if (!$this->actionIsInstalled($name))
			return false;

		$installedThemes 	= $this->actionInstalled();
		$theme 				= $installedThemes[$name]['path'];
		$iterator 			= new RecursiveIteratorIterator(
									new RecursiveDirectoryIterator($theme, FilesystemIterator::SKIP_DOTS),
									RecursiveIteratorIterator::CHILD_FIRST
							  );
		foreach ($iterator as $path)
			$path->isDir() ? rmdir($path->getPathname()) : unlink($path->getPathname());

		return rmdir($theme);
	}
public function actionUninstall($name=false)
	{
		if ($name == false)
			return false;

		if ($name == 'default')
			throw new CHttpException(400, Yii::t('Api.theme', 'You cannot uninstall the default theme.'));

		if (!$this->actionIsInstalled($name))
			return false;

		$installedThemes 	= $this->actionInstalled();
		$theme 				= $installedThemes[$name]['path'];
		$iterator 			= new RecursiveIteratorIterator(
									new RecursiveDirectoryIterator($theme, FilesystemIterator::SKIP_DOTS),
									RecursiveIteratorIterator::CHILD_FIRST
							  );
		foreach ($iterator as $path)
			$path->isDir() ? rmdir($path->getPathname()) : unlink($path->getPathname());

		return rmdir($theme);
	}
public function actionUninstall ( $ name = false ) { if ( $ name == false ) return false ; if ( $ name == 'default' ) throw new CHttpException ( 400 , Yii :: t ( 'Api.theme' , 'You cannot uninstall the default theme.' ) ) ; if ( ! $ this -> actionIsInstalled ( $ name ) ) return false ; $ installedThemes = $ this -> actionInstalled ( ) ; $ theme = $ installedThemes [ $ name ] [ 'path' ] ; $ iterator = new RecursiveIteratorIterator ( new RecursiveDirectoryIterator ( $ theme , FilesystemIterator :: SKIP_DOTS ) , RecursiveIteratorIterator :: CHILD_FIRST ) ; foreach ( $ iterator as $ path ) $ path -> isDir ( ) ? rmdir ( $ path -> getPathname ( ) ) : unlink ( $ path -> getPathname ( ) ) ; return rmdir ( $ theme ) ; }
Uninstalls a theme by name
@return boolean
Uninstalls a theme by name