Download & Extend

Store vargs serialized instead of custom delimited string

Project:Viewfield
Version:7.x-2.x-dev
Component:Code
Category:task
Priority:major
Assigned:Unassigned
Status:needs review
Issue tags:D7 stable release blocker

Issue Summary

_viewfield_get_view_args() needs to go.

Comments

#1

Priority:normal» major

Also, vname should be split into 'view' and 'display'. The combined '$view|$display' string value is hard to maintain.

#2

Status:active» needs review

Regarding vargs, if we store a serialized array of arguments produced by parsing the arguments using the current input method (single text field; comma-delimited list with quotation exceptions), we need to re-quote the exceptions at edit time.

Example vargs and parsed array using parsing code from _viewfield_get_view_args():

$vargs = '[node:nid],foo,"foo, bar","foo, ""bar"", bax"'
$parsed = array('[node:nid]', 'foo', 'foo, bar', 'foo, "bar", bax');

Alternatively, we could implement a multiple value input method for arguments, and avoid the whole quotation exercise, at a significantly higher UI implementation cost.

Thoughts?