[Mahara-contributors] [Bug 628113] Re: Using javascript for Back link

2011-06-13 Thread François Marier
** Changed in: mahara
   Status: Fix Committed = Fix Released

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/628113

Title:
  Using javascript for Back link

Status in Mahara ePortfolio:
  Fix Released

Bug description:
  Now we are using $_SERVER['HTTP_REFERER'] to get a previous view page.
  But for example the following 2nd case, we can not go back to the Top Page.

  1. Top Page  Links and Resources  Site view 001  Back  Top Page
  2. Top Page  Links and Resources  Site view 001  Public view by user001  
Back  Site view 001  Back  public view by user001  Back  Site view 001

  So how about changing view/view.php as below?

  File: view/view.php
  Line: 179

  [ Before ]
  if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
  $page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
  if ($_SERVER['HTTP_REFERER'] != $page) {
  $smarty-assign('backurl', $_SERVER['HTTP_REFERER']);
  }
  }

  [ After ]
  if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
  $page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
  if ($_SERVER['HTTP_REFERER'] != $page) {
  $smarty-assign('backurl', 'javascript:history.back()');
  }
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/628113/+subscriptions

___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp


[Mahara-contributors] [Bug 628113] Re: Using javascript for Back link

2011-05-11 Thread Richard Mansfield
** Changed in: mahara
   Status: In Progress = Fix Committed

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/628113

Title:
  Using javascript for Back link

Status in Mahara ePortfolio:
  Fix Committed

Bug description:
  Now we are using $_SERVER['HTTP_REFERER'] to get a previous view page.
  But for example the following 2nd case, we can not go back to the Top Page.

  1. Top Page  Links and Resources  Site view 001  Back  Top Page
  2. Top Page  Links and Resources  Site view 001  Public view by user001  
Back  Site view 001  Back  public view by user001  Back  Site view 001

  So how about changing view/view.php as below?

  File: view/view.php
  Line: 179

  [ Before ]
  if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
  $page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
  if ($_SERVER['HTTP_REFERER'] != $page) {
  $smarty-assign('backurl', $_SERVER['HTTP_REFERER']);
  }
  }

  [ After ]
  if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
  $page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
  if ($_SERVER['HTTP_REFERER'] != $page) {
  $smarty-assign('backurl', 'javascript:history.back()');
  }
  }

___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp


[Mahara-contributors] [Bug 628113] Re: Using javascript for Back link

2011-05-05 Thread Hugh Davenport
** Changed in: mahara
 Assignee: (unassigned) = Hugh Davenport (hugh-catalyst)

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/628113

Title:
  Using javascript for Back link

Status in Mahara ePortfolio:
  Confirmed

Bug description:
  Now we are using $_SERVER['HTTP_REFERER'] to get a previous view page.
  But for example the following 2nd case, we can not go back to the Top Page.

  1. Top Page  Links and Resources  Site view 001  Back  Top Page
  2. Top Page  Links and Resources  Site view 001  Public view by user001  
Back  Site view 001  Back  public view by user001  Back  Site view 001

  So how about changing view/view.php as below?

  File: view/view.php
  Line: 179

  [ Before ]
  if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
  $page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
  if ($_SERVER['HTTP_REFERER'] != $page) {
  $smarty-assign('backurl', $_SERVER['HTTP_REFERER']);
  }
  }

  [ After ]
  if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
  $page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
  if ($_SERVER['HTTP_REFERER'] != $page) {
  $smarty-assign('backurl', 'javascript:history.back()');
  }
  }

___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp


[Mahara-contributors] [Bug 628113] Re: Using javascript for Back link

2011-05-05 Thread Hugh Davenport
Bug for editable page not showing both buttons is filed at
https://bugs.launchpad.net/mahara/+bug/778249

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/628113

Title:
  Using javascript for Back link

Status in Mahara ePortfolio:
  Confirmed

Bug description:
  Now we are using $_SERVER['HTTP_REFERER'] to get a previous view page.
  But for example the following 2nd case, we can not go back to the Top Page.

  1. Top Page  Links and Resources  Site view 001  Back  Top Page
  2. Top Page  Links and Resources  Site view 001  Public view by user001  
Back  Site view 001  Back  public view by user001  Back  Site view 001

  So how about changing view/view.php as below?

  File: view/view.php
  Line: 179

  [ Before ]
  if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
  $page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
  if ($_SERVER['HTTP_REFERER'] != $page) {
  $smarty-assign('backurl', $_SERVER['HTTP_REFERER']);
  }
  }

  [ After ]
  if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
  $page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
  if ($_SERVER['HTTP_REFERER'] != $page) {
  $smarty-assign('backurl', 'javascript:history.back()');
  }
  }

___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp


[Mahara-contributors] [Bug 628113] Re: Using javascript for Back link

2011-05-05 Thread Hugh Davenport
Still left for discussion is
- should feature be kept and back loop fixed?
- should non-logged in users be able to use the back button feature.

I would suggest both, I will file a new bug for the non-logged in users

Note for the non-logged in users, the back button is already shown for
public profiles in user/view.php

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/628113

Title:
  Using javascript for Back link

Status in Mahara ePortfolio:
  Confirmed

Bug description:
  Now we are using $_SERVER['HTTP_REFERER'] to get a previous view page.
  But for example the following 2nd case, we can not go back to the Top Page.

  1. Top Page  Links and Resources  Site view 001  Back  Top Page
  2. Top Page  Links and Resources  Site view 001  Public view by user001  
Back  Site view 001  Back  public view by user001  Back  Site view 001

  So how about changing view/view.php as below?

  File: view/view.php
  Line: 179

  [ Before ]
  if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
  $page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
  if ($_SERVER['HTTP_REFERER'] != $page) {
  $smarty-assign('backurl', $_SERVER['HTTP_REFERER']);
  }
  }

  [ After ]
  if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
  $page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
  if ($_SERVER['HTTP_REFERER'] != $page) {
  $smarty-assign('backurl', 'javascript:history.back()');
  }
  }

___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp


[Mahara-contributors] [Bug 628113] Re: Using javascript for Back link

2011-02-23 Thread François Marier
** Changed in: mahara
   Importance: Low = Medium

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/628113

Title:
  Using javascript for Back link

Status in Mahara ePortfolio:
  Confirmed

Bug description:
  Now we are using $_SERVER['HTTP_REFERER'] to get a previous view page.
  But for example the following 2nd case, we can not go back to the Top Page.

  1. Top Page  Links and Resources  Site view 001  Back  Top Page
  2. Top Page  Links and Resources  Site view 001  Public view by user001  
Back  Site view 001  Back  public view by user001  Back  Site view 001

  So how about changing view/view.php as below?

  File: view/view.php
  Line: 179

  [ Before ]
  if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
  $page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
  if ($_SERVER['HTTP_REFERER'] != $page) {
  $smarty-assign('backurl', $_SERVER['HTTP_REFERER']);
  }
  }

  [ After ]
  if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
  $page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
  if ($_SERVER['HTTP_REFERER'] != $page) {
  $smarty-assign('backurl', 'javascript:history.back()');
  }
  }

___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp


[Mahara-contributors] [Bug 628113] Re: Using javascript for Back link

2010-12-20 Thread François Marier
Relying on the REFERER is a bad idea because lots of privacy-related
software/proxies strip it out or fake it.

** Changed in: mahara
   Importance: Wishlist = Low

** Changed in: mahara
Milestone: None = 1.4.0

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/628113

Title:
  Using javascript for Back link

Status in Mahara ePortfolio:
  Confirmed

Bug description:
  Now we are using $_SERVER['HTTP_REFERER'] to get a previous view page.
But for example the following 2nd case, we can not go back to the Top Page.

1. Top Page  Links and Resources  Site view 001  Back  Top Page
2. Top Page  Links and Resources  Site view 001  Public view by user001  
Back  Site view 001  Back  public view by user001  Back  Site view 001

So how about changing view/view.php as below?

File: view/view.php
Line: 179

[ Before ]
if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
$page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
if ($_SERVER['HTTP_REFERER'] != $page) {
$smarty-assign('backurl', $_SERVER['HTTP_REFERER']);
}
}

[ After ]
if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
$page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
if ($_SERVER['HTTP_REFERER'] != $page) {
$smarty-assign('backurl', 'javascript:history.back()');
}
}



___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp


[Mahara-contributors] [Bug 628113] Re: Using javascript for Back link

2010-12-20 Thread François Marier
Let's grep through the code to find out where it's used and whether or
not it can be replaced/removed.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/628113

Title:
  Using javascript for Back link

Status in Mahara ePortfolio:
  Confirmed

Bug description:
  Now we are using $_SERVER['HTTP_REFERER'] to get a previous view page.
But for example the following 2nd case, we can not go back to the Top Page.

1. Top Page  Links and Resources  Site view 001  Back  Top Page
2. Top Page  Links and Resources  Site view 001  Public view by user001  
Back  Site view 001  Back  public view by user001  Back  Site view 001

So how about changing view/view.php as below?

File: view/view.php
Line: 179

[ Before ]
if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
$page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
if ($_SERVER['HTTP_REFERER'] != $page) {
$smarty-assign('backurl', $_SERVER['HTTP_REFERER']);
}
}

[ After ]
if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
$page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
if ($_SERVER['HTTP_REFERER'] != $page) {
$smarty-assign('backurl', 'javascript:history.back()');
}
}



___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp


[Mahara-contributors] [Bug 628113] Re: Using javascript for Back link

2010-09-09 Thread Richard Mansfield
** Changed in: mahara
Milestone: 1.3.0 = None

-- 
Using javascript for Back link
https://bugs.launchpad.net/bugs/628113
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.

Status in Mahara ePortfolio: Confirmed

Bug description:
Now we are using $_SERVER['HTTP_REFERER'] to get a previous view page.
But for example the following 2nd case, we can not go back to the Top Page.

1. Top Page  Links and Resources  Site view 001  Back  Top Page
2. Top Page  Links and Resources  Site view 001  Public view by user001  
Back  Site view 001  Back  public view by user001  Back  Site view 001

So how about changing view/view.php as below?

File: view/view.php
Line: 179

[ Before ]
if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
$page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
if ($_SERVER['HTTP_REFERER'] != $page) {
$smarty-assign('backurl', $_SERVER['HTTP_REFERER']);
}
}

[ After ]
if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
$page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
if ($_SERVER['HTTP_REFERER'] != $page) {
$smarty-assign('backurl', 'javascript:history.back()');
}
}



___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp


[Mahara-contributors] [Bug 628113] Re: Using javascript for Back link

2010-09-01 Thread Mitsuhiro Yoshida
Yes, you are right.
But using 'javascript:history.back()' is the easiest way to avoid Back link 
loop.

-- 
Using javascript for Back link
https://bugs.launchpad.net/bugs/628113
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.

Status in Mahara ePortfolio: New

Bug description:
Now we are using $_SERVER['HTTP_REFERER'] to get a previous view page.
But for example the following 2nd case, we can not go back to the Top Page.

1. Top Page  Links and Resources  Site view 001  Back  Top Page
2. Top Page  Links and Resources  Site view 001  Public view by user001  
Back  Site view 001  Back  public view by user001  Back  Site view 001

So how about changing view/view.php as below?

File: view/view.php
Line: 179

[ Before ]
if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
$page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
if ($_SERVER['HTTP_REFERER'] != $page) {
$smarty-assign('backurl', $_SERVER['HTTP_REFERER']);
}
}

[ After ]
if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
$page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
if ($_SERVER['HTTP_REFERER'] != $page) {
$smarty-assign('backurl', 'javascript:history.back()');
}
}



___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp


[Mahara-contributors] [Bug 628113] Re: Using javascript for Back link

2010-09-01 Thread Ruslan Kabalin
Basically the bug is that when you follow the link in the view that
leads to another view, you get in the loop as back button always
points to the previous view. Solution can be preserving
$_SERVER['HTTP_REFERER'] in session when view is open the first time and
setting backurl to the one stored in session, if
$_SERVER['HTTP_REFERER'] indicates that the view was open from another
view.

-- 
Using javascript for Back link
https://bugs.launchpad.net/bugs/628113
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.

Status in Mahara ePortfolio: Confirmed

Bug description:
Now we are using $_SERVER['HTTP_REFERER'] to get a previous view page.
But for example the following 2nd case, we can not go back to the Top Page.

1. Top Page  Links and Resources  Site view 001  Back  Top Page
2. Top Page  Links and Resources  Site view 001  Public view by user001  
Back  Site view 001  Back  public view by user001  Back  Site view 001

So how about changing view/view.php as below?

File: view/view.php
Line: 179

[ Before ]
if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
$page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
if ($_SERVER['HTTP_REFERER'] != $page) {
$smarty-assign('backurl', $_SERVER['HTTP_REFERER']);
}
}

[ After ]
if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
$page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
if ($_SERVER['HTTP_REFERER'] != $page) {
$smarty-assign('backurl', 'javascript:history.back()');
}
}



___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp


[Mahara-contributors] [Bug 628113] Re: Using javascript for Back link

2010-09-01 Thread Andrew Robert Nicols
Ruslan and I have just had a go at replicating this one - it's not the easiest 
bug to replicate. This is the top-right back button.
Although javascript is probably the easiest way of fixing this, it won't work 
for all users. That said we could perhaps using some javascript to change the 
link once the page is displayed. It wouldn't fix the issue for those with JS 
disabled, but it would for a majority of cases.

** Changed in: mahara
   Status: New = Confirmed

-- 
Using javascript for Back link
https://bugs.launchpad.net/bugs/628113
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.

Status in Mahara ePortfolio: Confirmed

Bug description:
Now we are using $_SERVER['HTTP_REFERER'] to get a previous view page.
But for example the following 2nd case, we can not go back to the Top Page.

1. Top Page  Links and Resources  Site view 001  Back  Top Page
2. Top Page  Links and Resources  Site view 001  Public view by user001  
Back  Site view 001  Back  public view by user001  Back  Site view 001

So how about changing view/view.php as below?

File: view/view.php
Line: 179

[ Before ]
if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
$page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
if ($_SERVER['HTTP_REFERER'] != $page) {
$smarty-assign('backurl', $_SERVER['HTTP_REFERER']);
}
}

[ After ]
if ($USER-is_logged_in()  !empty($_SERVER['HTTP_REFERER'])) {
$page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? 
'new=1' : '');
if ($_SERVER['HTTP_REFERER'] != $page) {
$smarty-assign('backurl', 'javascript:history.back()');
}
}



___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp