Commits

Jacob Moen  committed a101cd7

Minor cleanup and getting to know the boilerplate

  • Participants
  • Parent commits 4ea51ad
  • Branches boosted

Comments (0)

Files changed (7)

 backend/config/main-env.php
 old/protected/config/New name 1.php
 old/protected/config/New name 2.php
+backend/runtime/*
+common/vendors/buzz/.git/*
+common/vendors/buzz/.gitignore
+common/vendors/buzz/composer.json
+common/vendors/buzz/.travis.yml
+common/vendors/php-github-api/.git/*
+common/vendors/php-github-api/composer.json
+common/vendors/php-github-api/.travis.yml
+common/vendors/php-github-api/.gitignore
+common/vendors/php-github-api/.Rhistory
+frontend/runtime/*

File .hgsub

Empty file removed.

File backend/config/main.php

 
 return CMap::mergeArray(
 	array(
-		'name' => 'Clevertech Backend Boilerplate',
+		'name' => 'Bugitor',
 		// @see http://www.yiiframework.com/doc/api/1.1/CApplication#basePath-detail
 		'basePath' => 'backend',
 		// set parameters
 				// @see http://www.yiiframework.com/doc/api/1.1/CErrorHandler#errorAction-detail
 				'errorAction'=>'site/error'
 			),
-//			'db'=> array(
-//				'connectionString' => $params['db.connectionString'],
-//				'username' => $params['db.username'],
-//				'password' => $params['db.password'],
-//				'schemaCachingDuration' => YII_DEBUG ? 0 : 86400000, // 1000 days
-//				'enableParamLogging' => YII_DEBUG,
-//				'charset' => 'utf8'
-//			),
+			'db'=> array(
+				'connectionString' => $params['db.connectionString'],
+				'username' => $params['db.username'],
+				'password' => $params['db.password'],
+				'schemaCachingDuration' => YII_DEBUG ? 0 : 86400000, // 1000 days
+				'enableParamLogging' => YII_DEBUG,
+				'charset' => 'utf8'
+			),
 			'urlManager' => array(
 				'urlFormat' => 'path',
 				'showScriptName' => false,
 			/* make sure you have your cache set correctly before uncommenting */
 			/* 'cache' => $params['cache.core'], */
 			/* 'contentCache' => $params['cache.content'] */
-		),		
+		),
 	),
 	CMap::mergeArray($mainEnvConfiguration, $mainLocalConfiguration)
-);
+);

File backend/config/test.php

 				'class' => 'system.test.CDbFixtureManager'
 			),
 			/* uncomment if we require to run commands against test database */
-			/*
+
 			 'db' => array(
 				'connectionString' => $params['testdb.connectionString'],
 				'username' => $params['testdb.username'],
 				'password' => $params['testdb.password'],
 				'charset' => 'utf8'
 			),
-			*/
+
 
 		)
 	)
-);
+);

File bugitor.sublime-project

 {
-    "folders":
-    [
-    {
-        "folder_exclude_patterns": [
-        "assets",
-        "protected/runtime",
-        "themes/sassy/.*",
-        "uploads"
-        ],
-        "path": "/var/www/bugitor"
-        },
-        {
-          "folder_exclude_patterns": [
-          "cli/views"
-          ],
-          "file_exclude_patterns": [
-          "yiilite.php"
-          ],
-          "path": "/var/www/yii/framework",
-          "ctags_command"   :  "ctags -R -f .tags '--exclude=*lite.php'"
-      }
-      ]
-  }
+	"folders":
+	[
+		{
+			"folder_exclude_patterns":
+			[
+				"assets",
+				"protected/runtime",
+				"themes/sassy/.*",
+				"uploads"
+			],
+			"path": "/var/www/bugitor"
+		}
+	]
+}

File frontend/config/main.php

 		// @see http://www.yiiframework.com/doc/api/1.1/CModule#setModules-detail
 		/* 'modules' => array(), */
 		'components' => array(
+			'user' => array(
+				'allowAutoLogin'=>true,
+			),
 			'errorHandler' => array(
 				// @see http://www.yiiframework.com/doc/api/1.1/CErrorHandler#errorAction-detail
 				'errorAction'=>'site/error'

File frontend/controllers/SiteController.php

 		if (isset($_POST['LoginForm'])) {
 			$model->username = $_POST['LoginForm']['username'];
 			$model->password = $_POST['LoginForm']['password'];
+			$model->rememberMe = $_POST['LoginForm']['rememberMe'];
 			print_r($_POST['LoginForm']);
 			// validate user input and redirect to the previous page if valid
 			if ($model->login())