Merge lp:~charles-wisniewski/sahana-agasti/0.6.4 into lp:sahana-agasti/krakatoa

Proposed by charles wisniewski
Status: Merged
Merged at revision: 3800
Proposed branch: lp:~charles-wisniewski/sahana-agasti/0.6.4
Merge into: lp:sahana-agasti/krakatoa
Diff against target: 132 lines (+12/-12)
8 files modified
sahana-phase2/inc/lib_config.inc (+2/-2)
sahana-phase2/inc/lib_location.inc (+2/-2)
sahana-phase2/mod/admin/conf_admin.inc (+1/-1)
sahana-phase2/mod/cr/camp.inc (+1/-1)
sahana-phase2/mod/cr/edit.inc (+2/-2)
sahana-phase2/mod/cr/reports.inc (+1/-1)
sahana-phase2/mod/ims/lib_ims.inc (+1/-1)
sahana-phase2/mod/or/lib_or.inc (+2/-2)
To merge this branch: bzr merge lp:~charles-wisniewski/sahana-agasti/0.6.4
Reviewer Review Type Date Requested Status
chamindra Approve
Review via email: mp+26250@code.launchpad.net

Description of the change

this should fix bug #353573.

To post a comment you must log in.
Revision history for this message
chamindra (chamindra) wrote :

The pass by reference was probably implemented for a reason. It modified the $conf directly. Does this impact the functions that use that reference? And what is the alternative that has been implemented to resolve it? A return with the new values?

review: Needs Information
Revision history for this message
charles wisniewski (charles-wisniewski) wrote :

Ah, hello...

The only difference is that it is now explicitly handled this way (i.e.
you do not have to manually specify &$variable, you can just pass
$variable to pass by reference) those were the only changes made and code
still executes just as should, though does not provide warnings now. it
was in response to tim/fran's want to show/use sahana-agasti as a proof of
concept

Charles Wisniewski
Application Architect
CUNY School of Professional Studies
tel: 212.652.2094
http://sps.cuny.edu/

chamindra <email address hidden>
Sent by: <email address hidden>
05/30/2010 09:05 AM
Please respond to
<email address hidden>

To
<email address hidden>
cc

Subject
Re: [Merge] lp:~charles-wisniewski/sahana-agasti/0.6.4 into
lp:sahana-agasti/0.6

Review: Needs Information
The pass by reference was probably implemented for a reason. It modified
the $conf directly. Does this impact the functions that use that
reference? And what is the alternative that has been implemented to
resolve it? A return with the new values?
--
https://code.launchpad.net/~charles-wisniewski/sahana-agasti/0.6.4/+merge/26250

You are the owner of lp:~charles-wisniewski/sahana-agasti/0.6.4.

Revision history for this message
chamindra (chamindra) wrote :

OK thanks for the clarification. I approve for merge.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sahana-phase2/inc/lib_config.inc'
2--- sahana-phase2/inc/lib_config.inc 2006-12-06 17:23:20 +0000
3+++ sahana-phase2/inc/lib_config.inc 2010-05-27 21:39:28 +0000
4@@ -26,10 +26,10 @@
5 // database overrides conf files
6 shn_config_base_conf_fetch();
7 shn_config_module_conf_fetch('all');
8- shn_config_database_fetch(&$conf,'all');
9+ shn_config_database_fetch($conf,'all');
10 } else {
11 // conf files overrides database
12- shn_config_database_fetch(&$conf,'all');
13+ shn_config_database_fetch($conf,'all');
14 shn_config_base_conf_fetch();
15 shn_config_module_conf_fetch('all');
16 }
17
18=== modified file 'sahana-phase2/inc/lib_location.inc'
19--- sahana-phase2/inc/lib_location.inc 2010-01-04 06:47:14 +0000
20+++ sahana-phase2/inc/lib_location.inc 2010-05-27 21:39:28 +0000
21@@ -110,7 +110,7 @@
22 global $global;
23 $db=$global["db"];
24 $loc_arr=array();
25- shn_get_parents($loc,&$loc_arr);
26+ shn_get_parents($loc,$loc_arr);
27 if ($loc_arr[0]=='unknown') {
28 shn_form_label(_("Organization Location"),"Unknown");
29 } else {
30@@ -213,7 +213,7 @@
31 * @access public
32 * @return array
33 */
34-function shn_get_parents($child,&$loc_arr)
35+function shn_get_parents($child,$loc_arr)
36 {
37 global $global;
38 include_once $global['approot']."/inc/lib_validate.inc";
39
40=== modified file 'sahana-phase2/mod/admin/conf_admin.inc'
41--- sahana-phase2/mod/admin/conf_admin.inc 2008-05-15 15:25:07 +0000
42+++ sahana-phase2/mod/admin/conf_admin.inc 2010-05-27 21:39:28 +0000
43@@ -125,7 +125,7 @@
44 </script>
45 <?php
46 ksort($conf);
47- shn_config_database_fetch(&$dconf,'all');
48+ shn_config_database_fetch($dconf,'all');
49 ?>
50 <div id="result">
51 <table>
52
53=== modified file 'sahana-phase2/mod/cr/camp.inc'
54--- sahana-phase2/mod/cr/camp.inc 2008-07-23 07:09:39 +0000
55+++ sahana-phase2/mod/cr/camp.inc 2010-05-27 21:39:28 +0000
56@@ -788,7 +788,7 @@
57 $db=$global["db"];
58 $loc_arr=array();
59 include $global['approot']."/inc/lib_location.inc";
60- shn_get_parents($loc,&$loc_arr);
61+ shn_get_parents($loc,$loc_arr);
62 if($loc_arr[0]=='unknown'){
63 //shn_form_label(_("Organization Location"),"Unknown");
64 }else{
65
66=== modified file 'sahana-phase2/mod/cr/edit.inc'
67--- sahana-phase2/mod/cr/edit.inc 2008-07-25 06:31:07 +0000
68+++ sahana-phase2/mod/cr/edit.inc 2010-05-27 21:39:28 +0000
69@@ -697,7 +697,7 @@
70 global $global;
71 $db=$global["db"];
72 $loc_arr=array();
73- shn_get_parents($loc,&$loc_arr);
74+ shn_get_parents($loc,$loc_arr);
75 if($loc_arr[0]=='unknown'){
76 //shn_form_label(_("Organization Location"),"Unknown");
77 }else{
78@@ -718,4 +718,4 @@
79 }
80 return $location;
81 }
82-?>
83\ No newline at end of file
84+?>
85
86=== modified file 'sahana-phase2/mod/cr/reports.inc'
87--- sahana-phase2/mod/cr/reports.inc 2007-12-18 10:16:03 +0000
88+++ sahana-phase2/mod/cr/reports.inc 2010-05-27 21:39:28 +0000
89@@ -333,7 +333,7 @@
90 $db=$global["db"];
91 $loc_arr=array();
92 include_once $global['approot']."/inc/lib_location.inc";
93- shn_get_parents($loc,&$loc_arr);
94+ shn_get_parents($loc,$loc_arr);
95 if($loc=="-1")
96 return _('Unspecified Location');
97 if($loc_arr[0]=='unknown'){
98
99=== modified file 'sahana-phase2/mod/ims/lib_ims.inc'
100--- sahana-phase2/mod/ims/lib_ims.inc 2009-12-22 11:42:28 +0000
101+++ sahana-phase2/mod/ims/lib_ims.inc 2010-05-27 21:39:28 +0000
102@@ -1980,7 +1980,7 @@
103 global $global;
104 $db=$global["db"];
105 $loc_arr=array();
106- shn_get_parents($loc,&$loc_arr);
107+ shn_get_parents($loc,$loc_arr);
108 if($loc_arr[0]=='unknown'){
109 shn_form_label(_("Organization Location"),"Unknown");
110 }else{
111
112=== modified file 'sahana-phase2/mod/or/lib_or.inc'
113--- sahana-phase2/mod/or/lib_or.inc 2010-01-06 08:23:55 +0000
114+++ sahana-phase2/mod/or/lib_or.inc 2010-05-27 21:39:28 +0000
115@@ -33,7 +33,7 @@
116 if($loc!=-1){
117 $search_str.=",location_details";
118 $loc_arr=array($loc);
119- $loc_arr=shn_location_get_descendants($loc,&$loc_arr);
120+ $loc_arr=shn_location_get_descendants($loc,$loc_arr);
121 $loc_str=shn_or_create_database_IN_array($loc_arr);
122 }
123 $search_str.=" where 1=1 ";
124@@ -138,7 +138,7 @@
125 global $global;
126 $db=$global["db"];
127 $loc_arr=array();
128- shn_get_parents($loc,&$loc_arr);
129+ shn_get_parents($loc,$loc_arr);
130 if($loc_arr[0]=='unknown'){
131 shn_form_label(_("Organization Location"),"Unknown");
132 }else{

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: