mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch 'master' into review-bugfixed
This commit is contained in:
commit
f174f93879
@ -340,17 +340,13 @@ class AppRequestsController extends AppController
|
||||
$limit = $count;
|
||||
$offset = 0;
|
||||
$skip_first_transaction = false;
|
||||
if($page == 1) {
|
||||
$limit--;
|
||||
} else {
|
||||
if($page > 1) {
|
||||
$offset = (( $page - 1 ) * $count) - 1;
|
||||
}
|
||||
if($offset) {
|
||||
$limit++;
|
||||
$skip_first_transaction = true;
|
||||
if($orderDirection == 'ASC') {
|
||||
$offset--;
|
||||
}
|
||||
}
|
||||
|
||||
if($offset && $orderDirection == 'ASC') {
|
||||
$offset--;
|
||||
}
|
||||
|
||||
//echo "limit: $limit, offset: $offset, skip first transaction: $skip_first_transaction<br>";
|
||||
@ -363,6 +359,11 @@ class AppRequestsController extends AppController
|
||||
//->page($page)
|
||||
->offset($offset)
|
||||
;
|
||||
$state_user_transactions_count = $stateUserTransactionsQuery->count();
|
||||
if($state_user_transactions_count > $offset + $limit) {
|
||||
$skip_first_transaction = true;
|
||||
}
|
||||
|
||||
$decay = true;
|
||||
if($page > 1) {
|
||||
$decay = false;
|
||||
@ -388,7 +389,7 @@ class AppRequestsController extends AppController
|
||||
'state' => 'success',
|
||||
'transactions' => $transactions,
|
||||
'transactionExecutingCount' => $session->read('Transactions.executing'),
|
||||
'count' => $stateUserTransactionsQuery->count(),
|
||||
'count' => $state_user_transactions_count,
|
||||
'gdtSum' => $gdtSum,
|
||||
'timeUsed' => microtime(true) - $startTime
|
||||
];
|
||||
@ -409,8 +410,6 @@ class AppRequestsController extends AppController
|
||||
public function listGDTTransactions($page = 1, $count = 25, $orderDirection = 'ASC', $session_id = 0)
|
||||
{
|
||||
$timeBegin = microtime(true);
|
||||
$gdtSum = 0;
|
||||
$gdtCount = -1;
|
||||
$this->viewBuilder()->setLayout('ajax');
|
||||
|
||||
$login_result = $this->requestLogin($session_id, false);
|
||||
@ -432,8 +431,6 @@ class AppRequestsController extends AppController
|
||||
'orderDirection' => $orderDirection
|
||||
], 'GdtEntries' . DS . 'listPerEmailApi');
|
||||
|
||||
$transactions = [];
|
||||
$result = ['state' => 'success'];
|
||||
if('success' == $gdtEntries['state']) {
|
||||
$timeEnd = microtime(true);
|
||||
$gdtEntries['data']['timeUsed'] = $timeEnd - $timeBegin;
|
||||
|
||||
@ -83,4 +83,12 @@ std::string PageRequestMessagedHandler::getBaseUrl()
|
||||
return "http://" + mHost + mLoginServerPath;
|
||||
}
|
||||
return "https://" + mHost + mLoginServerPath;
|
||||
}
|
||||
|
||||
std::string PageRequestMessagedHandler::getHost()
|
||||
{
|
||||
if (ServerConfig::g_ServerSetupType == ServerConfig::SERVER_TYPE_TEST) {
|
||||
return "http://" + mHost;
|
||||
}
|
||||
return "https://" + mHost;
|
||||
}
|
||||
@ -29,6 +29,7 @@ protected:
|
||||
|
||||
unsigned long long getLastGetAsU64(const std::string& uri);
|
||||
std::string getBaseUrl();
|
||||
std::string getHost();
|
||||
|
||||
Profiler mTimeProfiler;
|
||||
std::string mHost;
|
||||
|
||||
@ -299,7 +299,7 @@
|
||||
</a>
|
||||
</div>
|
||||
<div class="reset-pwd-link">
|
||||
<a href="<%= getBaseUrl() %>/resetPassword"><%= langCatalog->gettext("Passwort vergessen") %></a>
|
||||
<a href="<%= getHost() %>/vue/password"><%= langCatalog->gettext("Passwort vergessen") %></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user