Browse Source

Merge pull request #3 from yiisoft/master

Merge from yiisoft/yii
tags/2.0.0-beta
Simone 12 years ago
parent
commit
53f43ddd98
  1. 0
      apps/bootstrap/assets/.gitignore
  2. 0
      apps/bootstrap/css/bootstrap-responsive.css
  3. 0
      apps/bootstrap/css/bootstrap-responsive.min.css
  4. 0
      apps/bootstrap/css/bootstrap.css
  5. 0
      apps/bootstrap/css/bootstrap.min.css
  6. 0
      apps/bootstrap/css/site.css
  7. 0
      apps/bootstrap/img/glyphicons-halflings-white.png
  8. 0
      apps/bootstrap/img/glyphicons-halflings.png
  9. 2
      apps/bootstrap/index.php
  10. 0
      apps/bootstrap/js/bootstrap.js
  11. 0
      apps/bootstrap/js/bootstrap.min.js
  12. 0
      apps/bootstrap/protected/.htaccess
  13. 0
      apps/bootstrap/protected/config/assets.php
  14. 0
      apps/bootstrap/protected/config/main.php
  15. 0
      apps/bootstrap/protected/controllers/SiteController.php
  16. 0
      apps/bootstrap/protected/models/ContactForm.php
  17. 0
      apps/bootstrap/protected/models/LoginForm.php
  18. 0
      apps/bootstrap/protected/models/User.php
  19. 0
      apps/bootstrap/protected/runtime/.gitignore
  20. 0
      apps/bootstrap/protected/views/layouts/main.php
  21. 0
      apps/bootstrap/protected/views/site/about.php
  22. 0
      apps/bootstrap/protected/views/site/contact.php
  23. 0
      apps/bootstrap/protected/views/site/index.php
  24. 0
      apps/bootstrap/protected/views/site/login.php
  25. 2
      docs/guide/bootstrap.md
  26. 17
      framework/console/webapp/config.php
  27. 10
      framework/console/webapp/default/index.php
  28. 20
      framework/console/webapp/default/protected/config/main.php
  29. 15
      framework/console/webapp/default/protected/controllers/SiteController.php
  30. 17
      framework/console/webapp/default/protected/views/layouts/main.php
  31. 1
      framework/console/webapp/default/protected/views/site/index.php
  32. 3
      framework/web/AccessRule.php
  33. 2
      framework/web/User.php
  34. 3
      readme.md

0
app/assets/.gitignore → apps/bootstrap/assets/.gitignore vendored

0
app/css/bootstrap-responsive.css → apps/bootstrap/css/bootstrap-responsive.css vendored

0
app/css/bootstrap-responsive.min.css → apps/bootstrap/css/bootstrap-responsive.min.css vendored

0
app/css/bootstrap.css → apps/bootstrap/css/bootstrap.css vendored

0
app/css/bootstrap.min.css → apps/bootstrap/css/bootstrap.min.css vendored

0
app/css/site.css → apps/bootstrap/css/site.css vendored

0
app/img/glyphicons-halflings-white.png → apps/bootstrap/img/glyphicons-halflings-white.png

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

0
app/img/glyphicons-halflings.png → apps/bootstrap/img/glyphicons-halflings.png

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

2
app/index.php → apps/bootstrap/index.php

@ -2,7 +2,7 @@
defined('YII_DEBUG') or define('YII_DEBUG', true); defined('YII_DEBUG') or define('YII_DEBUG', true);
require(__DIR__ . '/../framework/yii.php'); require(__DIR__ . '/../../framework/yii.php');
$config = require(__DIR__ . '/protected/config/main.php'); $config = require(__DIR__ . '/protected/config/main.php');
$application = new yii\web\Application($config); $application = new yii\web\Application($config);

0
app/js/bootstrap.js → apps/bootstrap/js/bootstrap.js vendored

0
app/js/bootstrap.min.js → apps/bootstrap/js/bootstrap.min.js vendored

0
app/protected/.htaccess → apps/bootstrap/protected/.htaccess

0
app/protected/config/assets.php → apps/bootstrap/protected/config/assets.php

0
app/protected/config/main.php → apps/bootstrap/protected/config/main.php

0
app/protected/controllers/SiteController.php → apps/bootstrap/protected/controllers/SiteController.php

0
app/protected/models/ContactForm.php → apps/bootstrap/protected/models/ContactForm.php

0
app/protected/models/LoginForm.php → apps/bootstrap/protected/models/LoginForm.php

0
app/protected/models/User.php → apps/bootstrap/protected/models/User.php

0
app/protected/runtime/.gitignore → apps/bootstrap/protected/runtime/.gitignore vendored

0
app/protected/views/layouts/main.php → apps/bootstrap/protected/views/layouts/main.php

0
app/protected/views/site/about.php → apps/bootstrap/protected/views/site/about.php

0
app/protected/views/site/contact.php → apps/bootstrap/protected/views/site/contact.php

0
app/protected/views/site/index.php → apps/bootstrap/protected/views/site/index.php

0
app/protected/views/site/login.php → apps/bootstrap/protected/views/site/login.php

2
docs/guide/bootstrap.md

@ -7,7 +7,7 @@ If you have installed Yii under a Web-accessible folder, you should be able to
access this application through the following URL: access this application through the following URL:
~~~ ~~~
http://localhost/yii/app/index.php http://localhost/yii/apps/bootstrap/index.php
~~~ ~~~

17
framework/console/webapp/config.php

@ -1,17 +0,0 @@
<?php
/** @var $controller \yii\console\controllers\AppController */
$controller = $this;
return array(
'default' => array(
'index.php' => array(
'handler' => function($source) use ($controller) {
return $controller->replaceRelativePath($source, realpath(YII_PATH.'/yii.php'), 'yii');
},
'permissions' => 0777,
),
'protected/runtime' => array(
'permissions' => 0755,
),
),
);

10
framework/console/webapp/default/index.php

@ -1,10 +0,0 @@
<?php
define('YII_DEBUG', true);
require __DIR__.'/../framework/yii.php';
$config = require dirname(__DIR__).'/protected/config/main.php';
$config['basePath'] = dirname(__DIR__).'/protected';
$app = new \yii\web\Application($config);
$app->run();

20
framework/console/webapp/default/protected/config/main.php

@ -1,20 +0,0 @@
<?php
return array(
'id' => 'webapp',
'name' => 'My Web Application',
'components' => array(
// uncomment the following to use a MySQL database
/*
'db' => array(
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=testdrive',
'username' => 'root',
'password' => '',
),
*/
'cache' => array(
'class' => 'yii\caching\DummyCache',
),
),
);

15
framework/console/webapp/default/protected/controllers/SiteController.php

@ -1,15 +0,0 @@
<?php
use \yii\web\Controller;
/**
* SiteController
*/
class SiteController extends Controller
{
public function actionIndex()
{
echo $this->render('index', array(
'name' => 'Qiang',
));
}
}

17
framework/console/webapp/default/protected/views/layouts/main.php

@ -1,17 +0,0 @@
<?php use yii\helpers\Html as Html; ?>
<!doctype html>
<html lang="<?php \Yii::$app->language?>">
<head>
<meta charset="utf-8" />
<title><?php echo Html::encode($this->title)?></title>
</head>
<body>
<h1><?php echo Html::encode($this->title)?></h1>
<div class="content">
<?php echo $content?>
</div>
<div class="footer">
<?php echo \Yii::powered()?>
</div>
</body>
</html>

1
framework/console/webapp/default/protected/views/site/index.php

@ -1 +0,0 @@
Hello, <?php echo $name?>!

3
framework/web/AccessRule.php

@ -9,9 +9,6 @@ namespace yii\web;
use yii\base\Component; use yii\base\Component;
use yii\base\Action; use yii\base\Action;
use yii\base\Controller;
use yii\web\User;
use yii\web\Request;
/** /**
* *

2
framework/web/User.php

@ -461,7 +461,7 @@ class User extends Component
if ($auth !== null) { if ($auth !== null) {
return $auth->checkAccess($this->getId(), $operation, $params); return $auth->checkAccess($this->getId(), $operation, $params);
} else { } else {
return true; return false;
} }
} }
} }

3
readme.md

@ -13,7 +13,8 @@ without prior notices. **Yii 2.0 is not ready for production use yet.**
DIRECTORY STRUCTURE DIRECTORY STRUCTURE
------------------- -------------------
app/ a ready-to-use application built on Yii 2 apps/ ready-to-use Web apps built on Yii 2
bootstrap/ a simple app supporting user login and contact page
build/ internally used build tools build/ internally used build tools
docs/ documentation docs/ documentation
framework/ framework source files framework/ framework source files

Loading…
Cancel
Save