mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-18 03:30:55 +01:00
Refresh redirects back to calling page.
This commit is contained in:
@@ -5,6 +5,7 @@ namespace GitList\Controller;
|
|||||||
use Silex\Application;
|
use Silex\Application;
|
||||||
use Silex\ControllerProviderInterface;
|
use Silex\ControllerProviderInterface;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
|
||||||
class MainController implements ControllerProviderInterface
|
class MainController implements ControllerProviderInterface
|
||||||
{
|
{
|
||||||
@@ -21,17 +22,11 @@ class MainController implements ControllerProviderInterface
|
|||||||
})->bind('homepage');
|
})->bind('homepage');
|
||||||
|
|
||||||
|
|
||||||
$route->get('/refresh', function() use ($app ) {
|
$route->get('/refresh', function(Request $request) use ($app ) {
|
||||||
$app['git']->deleteCached();
|
$app['git']->deleteCached();
|
||||||
|
|
||||||
# These don't work:
|
# Go back to calling page
|
||||||
#echo sfContext::getInstance()->getRequest()->getReferer();
|
return $app->redirect($request->headers->get('Referer'));
|
||||||
#$app->redirect($request->attributes->get('referer'));
|
|
||||||
#$app->redirect( $app->getRequest()->getReferer() );
|
|
||||||
|
|
||||||
# TODO: Fix following to return to referring page
|
|
||||||
# Or get rid of hardcoded path
|
|
||||||
return $app->redirect( "/gitlist/");
|
|
||||||
})->bind('refresh');
|
})->bind('refresh');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user