Max Zaets avatar Max Zaets committed fb81d8a

added some config

Comments (0)

Files changed (1)

  * @copyright Copyright © Max Zaets 2012-
  * @license http://opensource.org/licenses/MIT MIT License
  */
+
+Yii::import('application.modules.issues.extensions.curl.Curl');
 class IssuesModule extends CWebModule
 {
     public $defaultController = 'tracker';
      */
     public $hideIssues = array('resolved', 'wontfix', 'duplicate', 'invalid');
 
+    /**
+     * Allowed Git SCM providers
+     */
+    protected $providers = array('github', 'bitbucket');
+
+    /**
+     * Git SCM provider
+     */
+    public $provider;
+
     public function init()
 	{
 		// this method is called when the module is being created
 		$this->setImport(array(
 			'issues.models.*',
 			'issues.components.*',
+            'issues.extensions'
 		));
+
+        // check if there's a proper provider set
+        if(!in_array($this->provider, $this->providers, true))
+        {
+            throw new CException(Yii::t('issues', 'Wrong Git SCM provider set, please check your config file.'));
+        }
 	}
 
 	public function beforeControllerAction($controller, $action)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.