private function savePart()
        {
            $form = 'frost.views.cms.part.text.TextAdd';
            $part = Part::addMediaToPart($form,'Text');
            
            // Add the 'preview' to the part 
            $part = new Part();
            $part->clauseSafe('part_id',Application::param('part_id')); 
            $part->parse(); 
            $part->save();

            //Part::setParttagsAndSave($part,Application::param('current_tags'));
    
            Application::setParam('module_id',Application::param('module_id'));
            Application::redirect('ModuleDetail');
        }
Exemple #2
0
 /**
  * Creates instances of segments
  *
  * @param string $rawValue The raw value of the segment
  *
  * @return \PitchBlade\Router\Path\Part The created segment
  */
 public function build($rawValue)
 {
     $segment = new Part($rawValue);
     $segment->parse();
     return $segment;
 }
Exemple #3
0
 protected function parse($rawmessage)
 {
     parent::parse($rawmessage);
     $headers = imap_rfc822_parse_headers($this->rawheader, self::INTERNAL_HOST);
     if (isset($headers->udate)) {
         $this->date = $headers->udate;
     } else {
         if (isset($headers->date) && ($date = \Zeyon\parseTime($headers->date)) !== null) {
             $this->date = $date;
         }
     }
     isset($headers->subject) and $this->subject = self::decodeHeader($headers->subject);
     if (isset($headers->fromaddress)) {
         $address = $headers->from[0];
         $this->sender = self::decodeHeader($headers->fromaddress);
         $this->sender_email = isset($address->mailbox, $address->host) ? "{$address->mailbox}@{$address->host}" : '';
         $this->sender_name = isset($address->personal) ? self::decodeHeader($address->personal) : $this->sender_email;
     }
     if (isset($headers->toaddress)) {
         $address = $headers->to[0];
         $this->to = self::decodeHeader($headers->toaddress);
         $this->to_email = isset($address->mailbox, $address->host) ? "{$address->mailbox}@{$address->host}" : '';
         $this->to_name = isset($address->personal) ? self::decodeHeader($address->personal) : $this->to_email;
         $this->to_count = count($headers->to);
     }
     isset($headers->ccaddress) and $this->cc = self::decodeHeader($headers->ccaddress);
     isset($headers->bccaddress) and $this->bcc = self::decodeHeader($headers->bccaddress);
     isset($headers->reply_toaddress) and $this->replyto = self::decodeHeader($headers->reply_toaddress);
     $this->receipt = self::extractHeaderField($this->rawheader, 'Disposition-Notification-To') !== '' || self::extractHeaderField($this->rawheader, 'Return-Receipt-To') !== '';
     $this->spam = strtolower(self::extractHeaderField($this->rawheader, 'X-Spam-Flag')) === 'yes' || preg_match('/^\\s*\\[spam\\]/i', $this->subject);
 }