Changeset 1489


Ignore:
Timestamp:
11/14/09 16:59:00 (10 months ago)
Author:
anatoo
Message:

ちょこちょこバグ修正

Location:
applications/nimpad/branches/0.2/lib
URL:
http://svn.nequal.jp/applications/nimpad/branches/0.2/lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • applications/nimpad/branches/0.2/lib/NimpadAdmin.php

    r1292 r1489  
    2424     
    2525    /** 
     26     * @var string 
     27     */ 
     28    public $baseurl; 
     29     
     30    /** 
    2631     * ランダムな名前を持つwikiの作成 
    2732     * 
    2833     * @param string 
     34     * @param string $baseurl ex. http://hoge.com/ 
    2935     * @return string ランダムな名前 
    3036     */ 
    31     function createNewWiki($text) 
     37    function createNewWiki($text, $baseurl) 
    3238    { 
    3339        $this->pdo->beginTransaction(); 
     
    3541            $name = $this->findNewRandomName(); 
    3642            $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)); 
    3846            $this->pdo->commit(); 
    3947        } catch (PDOException $e) { 
  • applications/nimpad/branches/0.2/lib/components/Root.php

    r1339 r1489  
    3636        } 
    3737         
    38         $name = $this->nimpadAdmin->createNewWiki($text); 
     38        $name = $this->nimpadAdmin->createNewWiki($text, $this->url('/')); 
    3939        return new k_SeeOther($this->url($name . '/')); 
    4040    } 
  • applications/nimpad/branches/0.2/lib/dao/Wiki.php

    r1344 r1489  
    153153    { 
    154154        $smt = $this->pdo->prepare(' 
    155             UPDATE nim_Wiki 
     155            UPDATE nim_wiki 
    156156            SET status = ?  
    157157            WHERE id = ?  
  • applications/nimpad/branches/0.2/lib/nim/Mailer.php

    r1376 r1489  
    66    function __construct($from_author, $from_address) 
    77    { 
    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 . '>'; 
    99    } 
    1010     
  • applications/nimpad/branches/0.2/lib/nim/locator/Deployment.php

    r1333 r1489  
    1212        return array(new nim_ExceptionHandler($this->factory, $this->context), 'handleForDeployment'); 
    1313    } 
     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    } 
    1422} 
Note: See TracChangeset for help on using the changeset viewer.