update for flag 3.x
- table flags becomes flag
- replace all content_type and content_id by entity_type and entity_id
- changed flag_lists.install (new rows name entity_type & entity_id) and flags table name become flag
- factory_by_content_type('node') became factory_by_entity_type('node')
- flag_lists.views_default.inc (entity_id & entity_type)
Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
@@ -110,7 +110,7 @@ function flag_lists_add_js($type = NULL) {
|
||||
}
|
||||
|
||||
// New flag. Load the template row.
|
||||
$query = db_select('flags', 'f');
|
||||
$query = db_select('flag', 'f');
|
||||
$query->leftJoin('flag_lists_types', 'fl', 'f.name = fl.name');
|
||||
$query->fields('f')
|
||||
->fields('fl')
|
||||
@@ -119,7 +119,7 @@ function flag_lists_add_js($type = NULL) {
|
||||
$row = $query->execute()
|
||||
->fetchObject();
|
||||
|
||||
$newflag = flag_flag::factory_by_content_type('node');
|
||||
$newflag = flag_flag::factory_by_entity_type('node');
|
||||
|
||||
$flag = $newflag->factory_by_row($row);
|
||||
// The template fid becomes the flag_lists parent flag.
|
||||
@@ -243,7 +243,7 @@ function flag_lists_form_submit($form, $form_state, $account = NULL) {
|
||||
else {
|
||||
// New flag. Load the template row.
|
||||
$type = $form_state['values']['type'];
|
||||
$query = db_select('flags', 'f');
|
||||
$query = db_select('flag', 'f');
|
||||
$query->leftJoin('flag_lists_types', 'fl', 'f.name = fl.name');
|
||||
$query->fields('f')
|
||||
->fields('fl')
|
||||
@@ -252,7 +252,7 @@ function flag_lists_form_submit($form, $form_state, $account = NULL) {
|
||||
$row = $query->execute()
|
||||
->fetchObject();
|
||||
|
||||
$newflag = flag_flag::factory_by_content_type('node');
|
||||
$newflag = flag_flag::factory_by_entity_type('node');
|
||||
|
||||
$flag = $newflag->factory_by_row($row);
|
||||
// The template fid becomes the flag_lists parent flag.
|
||||
|
||||
Reference in New Issue
Block a user