Changeset 5997

Show
Ignore:
Timestamp:
05/23/08 20:33:10 (8 months ago)
Author:
inureyes
Message:

#920

  • 별표 백업 루틴.
  • mandatory field가 아닙니다.
Location:
trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/components/Textcube.Data.Keyword.php

    r5775 r5997  
    1212        $this->id = 
    1313        $this->visibility = 
     14        $this->starred = 
    1415        $this->name = 
    1516        $this->description = 
     
    101102        $query->setQualifier('id', $this->id); 
    102103         
     104        if (empty($this->starred)) 
     105            $this->starred = 0; 
    103106        if (!isset($this->published)) 
    104107            $query->setAttribute('published', 'UNIX_TIMESTAMP()'); 
     
    206209            } 
    207210        } 
     211        if(isset($this->starred)) { 
     212            $query->setAttribute('starred',$this->starred); 
     213        } else { 
     214            $query->setAttribute('starred',0); 
     215        }        
    208216        if (isset($this->published)) { 
    209217            if (!Validator::number($this->published, 1)) 
  • trunk/components/Textcube.Data.Notice.php

    r5775 r5997  
    1313        $this->id = 
    1414        $this->visibility = 
     15        $this->starred = 
    1516        $this->title = 
    1617        $this->content = 
     
    8990        } 
    9091        $query->setQualifier('id', $this->id); 
    91  
     92         
     93        if (empty($this->starred)) 
     94            $this->starred = 0; 
    9295        if (!isset($this->published)) 
    9396            $query->setAttribute('published', 'UNIX_TIMESTAMP()'); 
     
    198201            } 
    199202        } 
     203        if(isset($this->starred)) { 
     204            $query->setAttribute('starred',$this->starred); 
     205        } else { 
     206            $query->setAttribute('starred',0); 
     207        }        
    200208        if (isset($this->published)) { 
    201209            if (!Validator::number($this->published, 1)) 
  • trunk/components/Textcube.Data.Post.php

    r5952 r5997  
    1313        $this->id = 
    1414        $this->visibility = 
     15        $this->starred = 
    1516        $this->title = 
    1617        $this->slogan = 
     
    102103        if (empty($this->content)) 
    103104            return $this->_error('content'); 
    104  
    105105        if (!$query = $this->_buildQuery()) 
    106106            return false; 
    107107        if (!isset($this->id) || $query->doesExist() || $this->doesExist($this->id)) { 
    108             $this->id = $this->nextEntryId(); 
    109  // Added (#300) 
     108            $this->id = $this->nextEntryId(); // Added (#300) 
    110109        } 
    111110        $query->setQualifier('id', $this->id); 
    112111 
     112        if (empty($this->starred)) 
     113            $this->starred = 0; 
     114        if (!$query = $this->_buildQuery()) 
    113115        if (!isset($this->published)) 
    114116            $query->setAttribute('published', 'UNIX_TIMESTAMP()'); 
     
    556558            } 
    557559        } 
     560        if(isset($this->starred)) { 
     561            $query->setAttribute('starred',$this->starred); 
     562        } else { 
     563            $query->setAttribute('starred',0); 
     564        } 
    558565        if (isset($this->category)) { 
    559566            requireComponent('Textcube.Data.Category'); 
  • trunk/interface/owner/data/export/index.php

    r5959 r5997  
    9898if ($post->open('', '*', 'published, id')) { 
    9999    do { 
    100         $writer->write('<post' . ' slogan="' . htmlspecialchars($post->slogan) . '"' . $newlineStyle . '>' . '<id>' . $post->id . '</id>' . '<visibility>' . $post->visibility . '</visibility>' . '<title>' . htmlspecialchars($post->title) . '</title>' . '<content formatter="' . htmlspecialchars($post->contentFormatter) . '" editor="' . htmlspecialchars($post->contentEditor) .'">' . htmlspecialchars(UTF8::correct($post->content)) . '</content>' . '<location>' . htmlspecialchars($post->location) . '</location>' . (!is_null($post->password) ? '<password>' . htmlspecialchars($post->password) . '</password>' : '') . '<acceptComment>' . $post->acceptComment . '</acceptComment>' . '<acceptTrackback>' . $post->acceptTrackback . '</acceptTrackback>' . '<published>' . $post->published . '</published>' . '<created>' . $post->created . '</created>' . '<modified>' . $post->modified . '</modified>'); 
     100        $writer->write('<post' . ' slogan="' . htmlspecialchars($post->slogan) . '"' . $newlineStyle . '>' .  
     101            '<id>' . $post->id . '</id>' .  
     102            '<visibility>' . $post->visibility . '</visibility>' .  
     103            '<starred>' . $post->starred . '</starred>' .  
     104            '<title>' . htmlspecialchars($post->title) . '</title>' .  
     105            '<content formatter="' . htmlspecialchars($post->contentFormatter) . '" editor="' . htmlspecialchars($post->contentEditor) .'">' . htmlspecialchars(UTF8::correct($post->content)) . '</content>' .  
     106            '<location>' . htmlspecialchars($post->location) . '</location>' .  
     107            (!is_null($post->password) ? '<password>' . htmlspecialchars($post->password) . '</password>' : '') .  
     108            '<acceptComment>' . $post->acceptComment . '</acceptComment>' .  
     109            '<acceptTrackback>' . $post->acceptTrackback . '</acceptTrackback>' .  
     110            '<published>' . $post->published . '</published>' .  
     111            '<created>' . $post->created . '</created>' .  
     112            '<modified>' . $post->modified . '</modified>'); 
    101113 
    102114        if ($post->category) 
     
    165177if ($notice->open()) { 
    166178    do { 
    167         $writer->write('<notice' . $newlineStyle . '>' . '<id>' . $notice->id . '</id>' . '<visibility>' . $notice->visibility . '</visibility>' . '<title>' . htmlspecialchars(UTF8::correct($notice->title)) . '</title>' . '<content formatter="' . htmlspecialchars($notice->contentFormatter) . '" editor="' . htmlspecialchars($notice->contentEditor) .'">' . htmlspecialchars(UTF8::correct($notice->content)) . '</content>' . '<published>' . $notice->published . '</published>' . '<created>' . $notice->created . '</created>' . '<modified>' . $notice->modified . '</modified>'); 
     179        $writer->write('<notice' . $newlineStyle . '>' .  
     180            '<id>' . $notice->id . '</id>' .  
     181            '<visibility>' . $notice->visibility . '</visibility>' .  
     182            '<starred>' . $notice->starred . '</starred>' .  
     183            '<title>' . htmlspecialchars(UTF8::correct($notice->title)) . '</title>' .  
     184            '<content formatter="' . htmlspecialchars($notice->contentFormatter) . '" editor="' . htmlspecialchars($notice->contentEditor) .'">' . htmlspecialchars(UTF8::correct($notice->content)) . '</content>' .  
     185            '<published>' . $notice->published . '</published>' .  
     186            '<created>' . $notice->created . '</created>' .  
     187            '<modified>' . $notice->modified . '</modified>'); 
    168188 
    169189        $writer->write(CRLF); 
     
    189209if ($keyword->open()) { 
    190210    do { 
    191         $writer->write('<keyword' . $newlineStyle . '>' . '<id>' . $keyword->id . '</id>' . '<visibility>' . $keyword->visibility . '</visibility>' . '<name>' . htmlspecialchars(UTF8::correct($keyword->name)) . '</name>' . '<description editor="' . htmlspecialchars($keyword->descriptionEditor) . '" formatter="' . htmlspecialchars($keyword->descriptionFormatter) .'">' . htmlspecialchars(UTF8::correct($keyword->description)) . '</description>' . '<published>' . $keyword->published . '</published>' . '<created>' . $keyword->created . '</created>' . '<modified>' . $keyword->modified . '</modified>'); 
     211        $writer->write('<keyword' . $newlineStyle . '>' .  
     212            '<id>' . $keyword->id . '</id>' .  
     213            '<visibility>' . $keyword->visibility . '</visibility>' .  
     214            '<starred>' . $keyword->starred . '</starred>' .             
     215            '<name>' . htmlspecialchars(UTF8::correct($keyword->name)) . '</name>' .  
     216            '<description editor="' . htmlspecialchars($keyword->descriptionEditor) . '" formatter="' . htmlspecialchars($keyword->descriptionFormatter) .'">' . htmlspecialchars(UTF8::correct($keyword->description)) . '</description>' . 
     217            '<published>' . $keyword->published . '</published>' .  
     218            '<created>' . $keyword->created . '</created>' .  
     219            '<modified>' . $keyword->modified . '</modified>'); 
    192220 
    193221        $writer->write(CRLF); 
  • trunk/interface/owner/data/import/index.php

    r5778 r5997  
    305305            $post->slogan = @$node['.attributes']['slogan']; 
    306306            $post->visibility = $node['visibility'][0]['.value']; 
     307            if(isset($node['starred'][0]['.value']))  
     308                $post->starred = $node['starred'][0]['.value']; 
     309            else $post->starred = 0; 
    307310            $post->title = $node['title'][0]['.value']; 
    308311            $post->content = $node['content'][0]['.value']; 
     
    450453            $notice->id = $node['id'][0]['.value']; 
    451454            $notice->visibility = $node['visibility'][0]['.value']; 
     455            if(isset($node['starred'][0]['.value']))  
     456                $notice->starred = $node['starred'][0]['.value']; 
     457            else $notice->starred = 0; 
    452458            $notice->title = $node['title'][0]['.value']; 
    453459            $notice->content = $node['content'][0]['.value']; 
     
    503509            $keyword->id = $node['id'][0]['.value']; 
    504510            $keyword->visibility = $node['visibility'][0]['.value']; 
     511            if(isset($node['starred'][0]['.value']))  
     512                $keyword->starred = $node['starred'][0]['.value']; 
     513            else $keyword->starred = 0; 
    505514            $keyword->name = $node['name'][0]['.value']; 
    506515            $keyword->description = $node['description'][0]['.value'];