_binary From fdc1c7540e20f5ae5750f76376cc85672a38ab0a Mon Sep 17 00:00:00 2001
From: Yashi Kamboj <yashi.kamboj@gmail.com>
Date: Tue, 12 Apr 2016 15:50:03 -0700
Subject: [PATCH] YashiKamboj_final

---
 src/configs/Config.php                         |  4 ++--
 src/controllers/components/SocialComponent.php | 16 ++++++++--------
 src/views/elements/ManagegroupsElement.php     | 14 ++++++++++----
 3 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/src/configs/Config.php b/src/configs/Config.php
index a41b8b4..964e9f4 100755
--- a/src/configs/Config.php
+++ b/src/configs/Config.php
@@ -248,9 +248,9 @@ if (MAINTENANCE_MODE && $_SERVER["SERVER_ADDR"] != $_SERVER["REMOTE_ADDR"]) {
 nsdefine('DEFAULT_WORK_DIRECTORY', PARENT_DIR . "/work_directory");
 
 if (!nsdefined('WORK_DIRECTORY')) {
-/*+++ The next block of code is machine edited, change at
+/*+++ The next block of code is machine edited, change at 
 your own risk, please use configure web page instead +++*/
-nsdefine('WORK_DIRECTORY', DEFAULT_WORK_DIRECTORY);
+nsdefine('WORK_DIRECTORY', 'C:/xampp/htdocs/yioop/work_directory');
 /*++++++*/
 // end machine edited code
 }
diff --git a/src/controllers/components/SocialComponent.php b/src/controllers/components/SocialComponent.php
index 2258609..599ad69 100644
--- a/src/controllers/components/SocialComponent.php
+++ b/src/controllers/components/SocialComponent.php
@@ -191,12 +191,12 @@ class SocialComponent extends Component implements CrawlConstants
                         return $parent->redirectWithMessage(
                             tl('accountaccess_component_user_activated'),
                             ["arg", "visible_users", 'start_row',
-                            'end_row', 'num_show', 'user_filter']);
+                            'end_row', 'num_show', 'user_filter','group_limit']);
                     } else {
                         return $parent->redirectWithMessage(
                             tl('accountaccess_component_no_user_activated'),
                             ["arg", "visible_users", 'start_row',
-                            'end_row', 'num_show', 'user_filter']);
+                            'end_row', 'num_show', 'user_filter','group_limit']);
                     }
                     break;
                 case "addgroup":
@@ -242,12 +242,12 @@ class SocialComponent extends Component implements CrawlConstants
                         return $parent->redirectWithMessage(
                             tl('social_component_user_banned'),
                             ["arg", "visible_users",'start_row',
-                            'end_row', 'num_show', 'user_filter']);
+                            'end_row', 'num_show', 'user_filter','group_limit']);
                     } else {
                         return $parent->redirectWithMessage(
                             tl('social_component_no_user_banned'),
                             ["arg", "visible_users", 'start_row',
-                            'end_row', 'num_show', 'user_filter']);
+                            'end_row', 'num_show', 'user_filter','group_limit']);
                     }
                     break;
                 case "changeowner":
@@ -351,12 +351,12 @@ class SocialComponent extends Component implements CrawlConstants
                         return $parent->redirectWithMessage(
                             tl('social_component_user_deleted'),
                             ["arg", "visible_users", 'start_row',
-                            'end_row', 'num_show', 'user_filter']);
+                            'end_row', 'num_show', 'user_filter','group_limit']);
                     } else {
                         return $parent->redirectWithMessage(
                             tl('social_component_no_delete_user_group'),
                             ["arg", "visible_users", 'start_row',
-                            'end_row', 'num_show', 'user_filter']);
+                            'end_row', 'num_show', 'user_filter','group_limit']);
                     }
                     $this->getGroupUsersData($data, $group_id);
                     break;
@@ -476,12 +476,12 @@ class SocialComponent extends Component implements CrawlConstants
                         return $parent->redirectWithMessage(
                             tl('social_component_user_reinstated'),
                             ["arg", "visible_users", 'start_row',
-                            'end_row', 'num_show', 'user_filter']);
+                            'end_row', 'num_show', 'user_filter','group_limit']);
                     } else {
                         return $parent->redirectWithMessage(
                             tl('social_component_no_user_reinstated'),
                             ["arg", "visible_users", 'start_row',
-                            'end_row', 'num_show', 'user_filter']);
+                            'end_row', 'num_show', 'user_filter','group_limit']);
                     }
                     break;
                 case "search":
diff --git a/src/views/elements/ManagegroupsElement.php b/src/views/elements/ManagegroupsElement.php
index e3b90d9..eabb154 100755
--- a/src/views/elements/ManagegroupsElement.php
+++ b/src/views/elements/ManagegroupsElement.php
@@ -442,22 +442,28 @@ class ManagegroupsElement extends Element
                             e("<td>".$data['MEMBERSHIP_CODES'][
                                 $user_array['STATUS']]);
                             e("</td>");
+                            if ($data['USER_FILTER'] != "" ||
+                            (isset($data['NUM_USERS_GROUP']) &&
+                            $data['NUM_USERS_GROUP'] > C\NUM_RESULTS_PER_PAGE)) {
+                            $limit = isset($data['GROUP_LIMIT']) ?
+                                $data['GROUP_LIMIT']:  0;
+                            }
                             switch ($user_array['STATUS']) {
                                 case C\INACTIVE_STATUS:
                                     e("<td><a href='$action_url".
-                                        "&amp;arg=activateuser'>".
+                                        "&amp;arg=activateuser&amp;group_limit=".($limit)."'>".
                                         tl('managegroups_element_activate').
                                         '</a></td>');
                                     break;
                                 case C\ACTIVE_STATUS:
                                     e("<td><a href='$action_url".
-                                        "&amp;arg=banuser'>".
+                                        "&amp;arg=banuser&amp;group_limit=".($limit)."'>".
                                         tl('managegroups_element_ban').
                                         '</a></td>');
                                     break;
                                 case C\SUSPENDED_STATUS:
                                     e("<td><a href='$action_url".
-                                        "&amp;arg=reinstateuser'>".
+                                        "&amp;arg=reinstateuser&amp;group_limit=".($limit)."'>".
                                         tl('managegroups_element_unban')
                                         .'</a></td>');
                                     break;
@@ -465,7 +471,7 @@ class ManagegroupsElement extends Element
                                     e("<td></td>");
                                     break;
                             }
-                            e("<td><a href='$action_url&amp;arg=deleteuser'>".
+                            e("<td><a href='$action_url&amp;arg=deleteuser&amp;group_limit=".($limit)."'>".
                                 tl('managegroups_element_delete')."</a></td>");
                         }
                         e("</tr>");
-- 
1.9.5.msysgit.0

