public
Description: GetSatisfaction.com's Helper Center
Clone URL: git://github.com/nullstyle/helpcenter.git
Search Repo:
eliminate extra employee loads
nullstyle (author)
Wed May 21 12:16:52 -0700 2008
commit  9a92b8f6527ca39d12e48c6c78c9aa9ad68fc8d9
tree    77b037404ec6d980f7a84b5529e6e865c1a3c191
parent  43cdfb0a6453c3f69236b694113ae043ada0b9ee
...
356
357
358
359
360
361
362
363
364
365
366
367
...
356
357
358
 
 
 
 
 
 
359
360
361
0
@@ -356,12 +356,6 @@ function employees($company_sfnid) {
0
 
0
   $employees_cache = array();
0
   foreach ($employee_list as $employee_record) {
0
- $person_record = get_person($employee_record["url"]);
0
- # Superimpose fields from $person_record onto $employee_record
0
- # (incl. person's role).
0
- foreach ($person_record as $key => $value) {
0
- $employee_record[$key] = $value;
0
- }
0
     # Resolve the role token into a human-readable role name.
0
     $employee_record['role_name'] = $role_names[$employee_record['role']];
0
     array_push($employees_cache, $employee_record);
...
17
18
19
20
21
22
23
24
25
26
27
28
 
29
30
31
...
17
18
19
 
 
20
21
22
23
24
25
 
26
27
28
29
0
@@ -17,15 +17,13 @@ $top_topic_tags = array_chunk($top_topic_tags, $chunk);
0
 $entries = $sprink->topics(array("limit" => $helpstart_topic_count, "sort" => 'recently_active'));
0
 $sprink->resolve_authors($entries['topics']);
0
 
0
-$topics = $sprink->topics(array("limit" => "1"));
0
-
0
 $smarty->assign('top_topic_tags', $top_topic_tags);
0
 $smarty->assign('entries', $entries['topics']);
0
 
0
 # Standard stash items
0
 $smarty->assign('products', $sprink->product_list());
0
 $smarty->assign('current_url', 'helpstart.php');
0
-$smarty->assign('totals', $topics['totals']);
0
+$smarty->assign('totals', $entries['totals']);
0
 $smarty->assign('filter_style', 'question');
0
 $sprink->add_std_hash_elems($smarty);
0
 $smarty->display('helpstart.t');

Comments

    No one has commented yet.