コード例 #1
0
ファイル: record.php プロジェクト: hikaram/wee
 /**
  * @see PMXI_Model_Record::update()
  */
 public function update()
 {
     $file_contents = NULL;
     if ($this->offsetExists('contents')) {
         $file_contents = $this['contents'];
         unset($this->contents);
     }
     parent::update();
     if (isset($this->id) and !is_null($file_contents)) {
         $uploads = wp_upload_dir();
         file_put_contents($uploads['basedir'] . DIRECTORY_SEPARATOR . PMXI_Plugin::HISTORY_DIRECTORY . DIRECTORY_SEPARATOR . $this->id, $file_contents);
     }
     return $this;
 }
コード例 #2
0
ファイル: record.php プロジェクト: rebeccayshen/kitlist
 /**
  * @see PMXI_Model_Record::update()
  */
 public function update()
 {
     $file_contents = NULL;
     if ($this->offsetExists('contents')) {
         $file_contents = $this['contents'];
         unset($this->contents);
     }
     parent::update();
     if (isset($this->id) and !is_null($file_contents)) {
         $uploads = wp_upload_dir();
         file_put_contents($uploads['basedir'] . '/wpallimport/history/' . $this->id, $file_contents);
     }
     return $this;
 }