Beispiel #1
0
 /**
  * Fetches file size if necessary.
  *
  * @override Base::save()
  */
 public function save()
 {
     if (!$this->size || $this->size < 1) {
         $this->determine_file_size();
     }
     return parent::save();
 }
Beispiel #2
0
 public function save()
 {
     parent::save();
     // Add an ID to the node
     $id_node = $this->createValueNode('identifier', ['E42', 'locationplaceNameId', $this->getGeneralId()], $this->node->getId());
     $this->node->relateTo($id_node, 'P1')->save();
 }
Beispiel #3
0
 public function save()
 {
     /** @var Base $f3 */
     $f3 = \Base::instance();
     if (!$this->author) {
         $this->author = $f3->get('BACKEND_USER')->_id;
     }
     $this->touch('created_at');
     return parent::save();
 }
 public function save()
 {
     global $wpdb;
     if (!$this->position) {
         $pos = $wpdb->get_var(sprintf('SELECT MAX(position)+1 FROM %s', self::table_name()));
         $this->position = $pos ? $pos : 1;
     }
     parent::save();
     $this->maybe_connect_to_web_player();
 }
 public function save()
 {
     global $wpdb;
     set_transient('podlove_needs_to_flush_rewrite_rules', true);
     $this->slug = sanitize_title($this->slug);
     if (!$this->position) {
         $pos = $wpdb->get_var(sprintf('SELECT MAX(position)+1 FROM %s', self::table_name()));
         $this->position = $pos ? $pos : 1;
     }
     parent::save();
 }