drupal_unpack

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 drupal_unpack($obj, $field = 'data')

Unserializes and appends elements from a serialized string.

Übergabeparameter

$obj The object to which the elements are appended.

$field The attribute of $obj whose value should be unserialized.

▾ 6 functions call drupal_unpack()

comment_edit in modules/comment/comment.pages.inc
Form builder; generate a comment editing form.
comment_form_add_preview in modules/comment/comment.module
Form builder; Generate and validate a comment preview form.
comment_render in modules/comment/comment.module
Renders comment(s).
comment_reply in modules/comment/comment.pages.inc
This function is responsible for generating a comment reply form. There are several cases that have to be handled, including:
sess_read in includes/session.inc
user_load in modules/user/user.module
Fetch a user object.

Code

includes/bootstrap.inc, line 808

<?php
function drupal_unpack($obj, $field = 'data') {
  if ($obj->$field && $data = unserialize($obj->$field)) {
    foreach ($data as $key => $value) {
      if (!empty($key) && !isset($obj->$key)) {
        $obj->$key = $value;
      }
    }
  }
  return $obj;
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen