In addition to the http://drupal.org/node/1807104.
Should be take under consideration, this function could be in use by other modules to draw a chart.

Comments

btopro’s picture

Two methods for dealing with this in my mind:

google_chart_tools_draw_chart is the default but draw_chart also exists (which just calls google_chart_tools_draw_chart to maintain historical compliance)
draw_chart calls google_chart_tools_draw_chart but also sets a drupal message indicating that the function draw_chart is deprecated

My vote would be for option 2 as well as additions to the README, issue log, and maybe even an update hook that displays the same message. I'm not sure how much usage you've seen by developers off of this module so not sure what's the best way of handling it but I'd probably support it but deprecated for the next release and then drop it the one after.

konforti’s picture

I'm not sure about the message, when it will be viewed?
All other seems right, including message in the project page and a limitation for a release or two like you mention.

btopro’s picture

message only triggered if someone is still calling draw_chart. Draw chart would look like this

function draw_chart($settings) {
  drupal_set_message(t('A function called draw_chart(). Please update this function call to google_chart_tools_draw_chart().'), 'warning', FALSE);
  google_chart_tools_draw_chart($settings);
}
konforti’s picture

OK, it's a bit stiff, but it will make the job done, if we want to get rid of it in the next release.
You got my vote too for option 2 :-).

btopro’s picture

Yeah, I think it should only be in one or two releases. A bit goofy I agree but better then just outright dropping it.