View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000276||Main CAcert Website||account administration||public||2006-08-01 22:45||2013-01-14 10:40|
|Fixed in Version||2006|
|Summary||0000276: Showing the coordinates for the locations|
|Description||This is a patch to make the location db administration more verbose|
|Tags||No tags attached.|
53.patch (684 bytes)
--- 53.php.orig 2006-03-02 21:20:44.000000000 +0000 +++ 53.php 2006-03-02 21:16:45.000000000 +0000 @@ -81,7 +81,7 @@ echo " <a href='account.php?action=aliases&id=54&locid=$row[id]'>aliases</a> |"; echo " <a href='account.php?action=edit&id=54&locid=$row[id]'>edit</a> |"; echo " <a href='account.php?action=delete&id=53&locid=$row[id]'"; - echo " onclick=\"return confirm('Are you sure you want to delete this location?');\">delete</a> ) $row[name]</li>\n"; + echo " onclick=\"return confirm('Are you sure you want to delete this location?');\">delete</a> ) $row[name] ($row[lat],$row[long])</li>\n"; } echo "</ul>\n</li>\n</ul>\n</li>\n</ul></div>\n<br>\n";
53.patch (684 bytes)
Does anyone know that the correct writing to access array fields is $array['identifier'] instead of $array[identifier]? The latter is causing a warning as "identifier" is seen as a constant (that doesn't exist) rather than a string to identify the array field.
This will cause a lot of trouble as soon as there _is_ a constant called name, long, lat, ...
But as this is wrong everywhere throughout the source this patch introduces no new issues.
While it's true the code may not be perfect we really should be quite stringent about not only fixing old code, but going forward we shouldn't allow code in that will make the situation worst and only require a lot more work in the future
Also using ['identifier'] is more efficient then ["identifier"] which is more efficient then [identifier]...
||Duplicate bug + patch from bug 0000142|
|2006-08-01 22:45||Sourcerer||New Issue|
|2006-08-01 22:45||Sourcerer||File Added: 53.patch|
|2006-08-01 22:45||Sourcerer||Status||new => needs work|
|2006-08-01 22:45||Sourcerer||Assigned To||=> duane|
||Note Added: 0000277|
|2006-08-02 01:03||duane||Note Added: 0000278|
|2006-08-14 03:47||duane||Relationship added||duplicate of 0000142|
|2006-08-14 03:48||duane||Status||needs work => closed|
|2006-08-14 03:48||duane||Note Added: 0000415|
|2006-08-14 03:48||duane||Resolution||open => duplicate|
|2013-01-14 10:40||Werner Dworak||Fixed in Version||=> 2006|