Changeset 20610
- Timestamp:
- 10/03/08 17:45:22 (3 months ago)
- Location:
- events/phpframework/plain_php/trunk
- Files:
-
- 7 modified
-
action/FollowAction.php (modified) (2 diffs)
-
core/ApplicationContext.php (modified) (2 diffs)
-
core/ObjectBuilder.php (modified) (1 diff)
-
index.php (modified) (1 diff)
-
init.php (modified) (1 diff)
-
resource/login.php (modified) (1 diff)
-
resource/sessions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
events/phpframework/plain_php/trunk/action/FollowAction.php
r20337 r20610 25 25 $this->getFriendshipService()->follow($user_id, $this->followID); 26 26 send_mail($follow_user['email'], 27 $user_name . ' is now following you on Twitter!',27 $user_name . ' is now following you on Phwittr!', 28 28 $user_name . ' があなたをフォローし始めました。 29 29 … … 39 39 $this->getFriendshipService()->request($user_id, $this->followID); 40 40 send_mail($follow_user['email'], 41 $user_name . ' is now requesting you on Twitter!',41 $user_name . ' is now requesting you on Phwittr!', 42 42 $user_name . ' があなたをフォローするためにリクエストしました。 43 43 -
events/phpframework/plain_php/trunk/core/ApplicationContext.php
r20040 r20610 2 2 3 3 class ApplicationContext 4 { 5 protected $baseUrl, $basePath, $templateBaseUrl, $templateBasePath; 6 function __construct($base_path, 7 $base_url, 8 $template_base_path, 9 $template_base_url, 10 $cookie_domain, 11 $cookie_path) 12 { 13 $_ = $this; 14 list($_->basePath, 15 $_->baseUrl, 16 $_->templateBasePath, 17 $_->templateBaseUrl, 18 $_->cookieDomain, 19 $_->cookiePath) = func_get_args(); 20 } 4 { 5 protected $baseUrl, $basePath, $templateBaseUrl, $templateBasePath, $dsn, $dbUser, $dbPassword, $cookieDomain, $cookiePath; 21 6 function __get($name) 22 7 { … … 24 9 return $this->{$name}; 25 10 } 11 function setBaseUrl($v) 12 { 13 $this->baseUrl = $v; 14 return $this; 15 } 16 function setBasePath($v) 17 { 18 $this->basePath = $v; 19 return $this; 20 } 21 function setTemplateBaseUrl($v) 22 { 23 $this->templateBaseUrl = $v; 24 return $this; 25 } 26 27 function setTemplateBasePath($v) 28 { 29 $this->templateBasePath = $v; 30 return $this; 31 } 32 33 function setDsn($v) 34 { 35 $this->dsn = $v; 36 return $this; 37 } 38 function setDbUser($v) 39 { 40 $this->dbUser = $v; 41 return $this; 42 } 43 function setDbPassword($v) 44 { 45 $this->dbPassword = $v; 46 return $this; 47 } 48 49 function setCookiePath($v) 50 { 51 $this->cookiePath = $v; 52 return $this; 53 } 54 function setCookieDomain($v) 55 { 56 $this->cookieDomain = $v; 57 return $this; 58 } 26 59 } -
events/phpframework/plain_php/trunk/core/ObjectBuilder.php
r20336 r20610 17 17 function buildPDO() 18 18 { 19 $obj = new PDO('mysql:host=127.0.0.1;dbname=phwittr', 'phwittr', 'phwittr'); 19 $c = self::$context; 20 $obj = new PDO($c->dsn, $c->dbUser, $c->dbPassword); 20 21 $obj->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 21 22 $obj->exec('SET NAMES UTF8'); -
events/phpframework/plain_php/trunk/index.php
r20339 r20610 3 3 4 4 5 $c = new ApplicationContext; 6 $c->setBasePath(dirname(__FILE__)) 7 ->setBaseUrl('http://localhost/phwittr') 8 ->setTemplateBasePath(dirname(__FILE__) . '/resource') 9 ->setTemplateBaseUrl('http://localhost/phwittr/resource') 10 ->setDsn('mysql:dbname=phwittr;host=127.0.0.1') 11 ->setDbUser('phwittr') 12 ->setCookieDomain('localhost') 13 ->setCookiePath('/phwittr') 14 ->setDbPassword('phwittr'); 15 ObjectBuilder::setApplicationContext($c); 16 17 5 18 $response = ref(new PhwittrFront)->process(new Request('UTF-8'), $c, new RendererBuilder($c)); 6 /* TODO 例外handlerをつける */ -
events/phpframework/plain_php/trunk/init.php
r20339 r20610 13 13 14 14 15 $c = new ApplicationContext(dirname(__FILE__), 'http://localhost/phwittr',16 dirname(__FILE__) . '/resource', 'http://localhost/phwittr/resource',17 'localhost',18 '/phwittr');19 ObjectBuilder::setApplicationContext($c);20 15 21 16 mb_language('japanese'); -
events/phpframework/plain_php/trunk/resource/login.php
r20038 r20610 37 37 38 38 <?php if ($r->existsMessage()) foreach ($r->getMessages() as $m): ?> 39 <?php foreach ($r->getMessages() as $m): ?>40 39 <p class="warning"><?php echo $m ?></p> 41 <?php endforeach ?>42 40 <?php endforeach ?> 43 41 -
events/phpframework/plain_php/trunk/resource/sessions.php
r20038 r20610 37 37 38 38 <?php if ($r->existsMessage()) foreach ($r->getMessages() as $m): ?> 39 <?php foreach ($r->getMessages() as $m): ?>40 39 <p class="warning"><?php echo $m ?></p> 41 <?php endforeach ?>42 40 <?php endforeach ?> 43 41
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)