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;
|
$limit = $count;
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
$skip_first_transaction = false;
|
$skip_first_transaction = false;
|
||||||
if($page == 1) {
|
if($page > 1) {
|
||||||
$limit--;
|
|
||||||
} else {
|
|
||||||
$offset = (( $page - 1 ) * $count) - 1;
|
$offset = (( $page - 1 ) * $count) - 1;
|
||||||
}
|
|
||||||
if($offset) {
|
|
||||||
$limit++;
|
$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>";
|
//echo "limit: $limit, offset: $offset, skip first transaction: $skip_first_transaction<br>";
|
||||||
@ -363,6 +359,11 @@ class AppRequestsController extends AppController
|
|||||||
//->page($page)
|
//->page($page)
|
||||||
->offset($offset)
|
->offset($offset)
|
||||||
;
|
;
|
||||||
|
$state_user_transactions_count = $stateUserTransactionsQuery->count();
|
||||||
|
if($state_user_transactions_count > $offset + $limit) {
|
||||||
|
$skip_first_transaction = true;
|
||||||
|
}
|
||||||
|
|
||||||
$decay = true;
|
$decay = true;
|
||||||
if($page > 1) {
|
if($page > 1) {
|
||||||
$decay = false;
|
$decay = false;
|
||||||
@ -388,7 +389,7 @@ class AppRequestsController extends AppController
|
|||||||
'state' => 'success',
|
'state' => 'success',
|
||||||
'transactions' => $transactions,
|
'transactions' => $transactions,
|
||||||
'transactionExecutingCount' => $session->read('Transactions.executing'),
|
'transactionExecutingCount' => $session->read('Transactions.executing'),
|
||||||
'count' => $stateUserTransactionsQuery->count(),
|
'count' => $state_user_transactions_count,
|
||||||
'gdtSum' => $gdtSum,
|
'gdtSum' => $gdtSum,
|
||||||
'timeUsed' => microtime(true) - $startTime
|
'timeUsed' => microtime(true) - $startTime
|
||||||
];
|
];
|
||||||
@ -409,8 +410,6 @@ class AppRequestsController extends AppController
|
|||||||
public function listGDTTransactions($page = 1, $count = 25, $orderDirection = 'ASC', $session_id = 0)
|
public function listGDTTransactions($page = 1, $count = 25, $orderDirection = 'ASC', $session_id = 0)
|
||||||
{
|
{
|
||||||
$timeBegin = microtime(true);
|
$timeBegin = microtime(true);
|
||||||
$gdtSum = 0;
|
|
||||||
$gdtCount = -1;
|
|
||||||
$this->viewBuilder()->setLayout('ajax');
|
$this->viewBuilder()->setLayout('ajax');
|
||||||
|
|
||||||
$login_result = $this->requestLogin($session_id, false);
|
$login_result = $this->requestLogin($session_id, false);
|
||||||
@ -432,8 +431,6 @@ class AppRequestsController extends AppController
|
|||||||
'orderDirection' => $orderDirection
|
'orderDirection' => $orderDirection
|
||||||
], 'GdtEntries' . DS . 'listPerEmailApi');
|
], 'GdtEntries' . DS . 'listPerEmailApi');
|
||||||
|
|
||||||
$transactions = [];
|
|
||||||
$result = ['state' => 'success'];
|
|
||||||
if('success' == $gdtEntries['state']) {
|
if('success' == $gdtEntries['state']) {
|
||||||
$timeEnd = microtime(true);
|
$timeEnd = microtime(true);
|
||||||
$gdtEntries['data']['timeUsed'] = $timeEnd - $timeBegin;
|
$gdtEntries['data']['timeUsed'] = $timeEnd - $timeBegin;
|
||||||
|
|||||||
@ -84,3 +84,11 @@ std::string PageRequestMessagedHandler::getBaseUrl()
|
|||||||
}
|
}
|
||||||
return "https://" + 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);
|
unsigned long long getLastGetAsU64(const std::string& uri);
|
||||||
std::string getBaseUrl();
|
std::string getBaseUrl();
|
||||||
|
std::string getHost();
|
||||||
|
|
||||||
Profiler mTimeProfiler;
|
Profiler mTimeProfiler;
|
||||||
std::string mHost;
|
std::string mHost;
|
||||||
|
|||||||
@ -299,7 +299,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="reset-pwd-link">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user