Changeset 1490
- Timestamp:
- 11/14/09 17:04:40 (9 months ago)
- Location:
- applications/nimpad/trunk
- URL:
- http://svn.nequal.jp/applications/nimpad/trunk
- Files:
-
- 6 edited
- 41 copied
-
html/.htaccess (modified) (2 diffs)
-
lib/HatenaSyntax (copied) (copied from applications/nimpad/branches/0.2/lib/HatenaSyntax)
-
lib/HatenaSyntax.php (copied) (copied from applications/nimpad/branches/0.2/lib/HatenaSyntax.php)
-
lib/HatenaSyntax/Factory.php (copied) (copied from applications/nimpad/branches/0.2/lib/HatenaSyntax/Factory.php)
-
lib/HatenaSyntax/Locator.php (copied) (copied from applications/nimpad/branches/0.2/lib/HatenaSyntax/Locator.php)
-
lib/HatenaSyntax/Node.php (copied) (copied from applications/nimpad/branches/0.2/lib/HatenaSyntax/Node.php)
-
lib/HatenaSyntax/NodeCreater.php (copied) (copied from applications/nimpad/branches/0.2/lib/HatenaSyntax/NodeCreater.php)
-
lib/HatenaSyntax/Renderer.php (copied) (copied from applications/nimpad/branches/0.2/lib/HatenaSyntax/Renderer.php)
-
lib/HatenaSyntax/TOCRenderer.php (copied) (copied from applications/nimpad/branches/0.2/lib/HatenaSyntax/TOCRenderer.php)
-
lib/HatenaSyntax/Tree (copied) (copied from applications/nimpad/branches/0.2/lib/HatenaSyntax/Tree)
-
lib/HatenaSyntax/Tree.php (copied) (copied from applications/nimpad/branches/0.2/lib/HatenaSyntax/Tree.php)
-
lib/HatenaSyntax/Tree/INode.php (copied) (copied from applications/nimpad/branches/0.2/lib/HatenaSyntax/Tree/INode.php)
-
lib/HatenaSyntax/Tree/Leaf.php (copied) (copied from applications/nimpad/branches/0.2/lib/HatenaSyntax/Tree/Leaf.php)
-
lib/HatenaSyntax/Tree/Node.php (copied) (copied from applications/nimpad/branches/0.2/lib/HatenaSyntax/Tree/Node.php)
-
lib/HatenaSyntax/Tree/Root.php (copied) (copied from applications/nimpad/branches/0.2/lib/HatenaSyntax/Tree/Root.php)
-
lib/HatenaSyntax/TreeRenderer.php (copied) (copied from applications/nimpad/branches/0.2/lib/HatenaSyntax/TreeRenderer.php)
-
lib/HatenaSyntax/Util.php (copied) (copied from applications/nimpad/branches/0.2/lib/HatenaSyntax/Util.php)
-
lib/NimpadAdmin.php (modified) (2 diffs)
-
lib/PEG (copied) (copied from applications/nimpad/branches/0.2/lib/PEG)
-
lib/PEG.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG.php)
-
lib/PEG/Action.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/Action.php)
-
lib/PEG/And.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/And.php)
-
lib/PEG/Anything.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/Anything.php)
-
lib/PEG/ArrayContext.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/ArrayContext.php)
-
lib/PEG/Cache.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/Cache.php)
-
lib/PEG/CallbackAction.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/CallbackAction.php)
-
lib/PEG/Char.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/Char.php)
-
lib/PEG/Choice.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/Choice.php)
-
lib/PEG/Curry.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/Curry.php)
-
lib/PEG/EOS.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/EOS.php)
-
lib/PEG/Failure.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/Failure.php)
-
lib/PEG/IContext.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/IContext.php)
-
lib/PEG/IParser.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/IParser.php)
-
lib/PEG/Lookahead.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/Lookahead.php)
-
lib/PEG/Many.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/Many.php)
-
lib/PEG/Memoize.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/Memoize.php)
-
lib/PEG/Not.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/Not.php)
-
lib/PEG/Optional.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/Optional.php)
-
lib/PEG/Ref.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/Ref.php)
-
lib/PEG/Sequence.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/Sequence.php)
-
lib/PEG/StringContext.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/StringContext.php)
-
lib/PEG/Token.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/Token.php)
-
lib/PEG/Util.php (copied) (copied from applications/nimpad/branches/0.2/lib/PEG/Util.php)
-
lib/components/Root.php (modified) (1 diff)
-
lib/dao/Wiki.php (modified) (1 diff)
-
lib/nim/Mailer.php (modified) (1 diff)
-
lib/nim/locator/Deployment.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
applications/nimpad/trunk/html/.htaccess
r1483 r1490 1 # PHP 設定-------------------------------------------------------------------2 # ログ設定1 # PHP -------------------------------------------------------------------------- 2 # log settings 3 3 php_value error_log "../log/error.log" 4 # php_value error_log "/usr/local/var/www/nimpad.jp/log/error.log" # 本番時適用4 # php_value error_log "/usr/local/var/www/nimpad.jp/log/error.log" # for deployment 5 5 php_value log_errors on 6 6 php_value html_errors off 7 7 8 # Enable display errors in browser9 # 本番ではオフにする10 8 php_value display_startup_errors on 11 9 php_value display_errors on 12 10 13 # セッション設定11 # session 14 12 php_value session.gc_maxlifetime 604800 15 13 16 # 諸設定-----------------------------------------------------------------------14 # etc -------------------------------------------------------------------------- 17 15 DirectorySlash Off 18 16 Options -Indexes FollowSymLinks 19 17 DirectoryIndex index.php 20 18 21 # ドットファイルへのアクセスは弾く22 19 <Files ".*"> 23 20 deny from all … … 27 24 RewriteEngine on 28 25 29 # メンテナンス時以外はコメントアウトしておく26 # for maintenance 30 27 #RewriteRule ^maintenance/ - [L] 31 28 #RewriteRule ^.*$ maintenance/ -
applications/nimpad/trunk/lib/NimpadAdmin.php
r1292 r1490 24 24 25 25 /** 26 * @var string 27 */ 28 public $baseurl; 29 30 /** 26 31 * ランダムな名前を持つwikiの作成 27 32 * 28 33 * @param string 34 * @param string $baseurl ex. http://hoge.com/ 29 35 * @return string ランダムな名前 30 36 */ 31 function createNewWiki($text )37 function createNewWiki($text, $baseurl) 32 38 { 33 39 $this->pdo->beginTransaction(); … … 35 41 $name = $this->findNewRandomName(); 36 42 $wiki_id = $this->daoWiki->create($name, array('home' => 'README')); 37 $this->daoPage->create($wiki_id, 'README', array('html' => $this->textProcessor->render('hatena', $text, 'README'), 'text' => $text)); 43 $this->daoPage->create($wiki_id, 'README', 44 array('html' => $this->textProcessor->render('hatena', $text, 'README', $baseurl . $name . '/'), 45 'text' => $text)); 38 46 $this->pdo->commit(); 39 47 } catch (PDOException $e) { -
applications/nimpad/trunk/lib/components/Root.php
r1339 r1490 36 36 } 37 37 38 $name = $this->nimpadAdmin->createNewWiki($text );38 $name = $this->nimpadAdmin->createNewWiki($text, $this->url('/')); 39 39 return new k_SeeOther($this->url($name . '/')); 40 40 } -
applications/nimpad/trunk/lib/dao/Wiki.php
r1344 r1490 153 153 { 154 154 $smt = $this->pdo->prepare(' 155 UPDATE nim_ Wiki155 UPDATE nim_wiki 156 156 SET status = ? 157 157 WHERE id = ? -
applications/nimpad/trunk/lib/nim/Mailer.php
r1376 r1490 6 6 function __construct($from_author, $from_address) 7 7 { 8 $this->from = 'From: ' . mb_encode_mimeheader(mb_convert_encoding($from_author, 'JIS', 'UTF-8')) . ' <' . $from_address . '>';8 $this->from = 'From: ' . mb_encode_mimeheader(mb_convert_encoding($from_author, 'JIS', 'UTF-8')) . ' <' . $from_address . '>'; 9 9 } 10 10 -
applications/nimpad/trunk/lib/nim/locator/Deployment.php
r1333 r1490 12 12 return array(new nim_ExceptionHandler($this->factory, $this->context), 'handleForDeployment'); 13 13 } 14 15 protected function createPdo() 16 { 17 $option = array(/*PDO::ATTR_PERSISTENT => true, */PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'); 18 $pdo = new PDO('mysql:dbname=nimpad;host=127.0.0.1', 'nimpad', $this->dbPassword, $option); 19 $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 20 return $pdo; 21 } 14 22 }
Note: See TracChangeset
for help on using the changeset viewer.
