[svn r12267] 4th step in removing all {$_SERVER['PHP_SELF']}

skala
Julian Prud'homme 18 years ago
parent 940ce9b538
commit 38d2dbc117
  1. 4
      main/admin/settings.php
  2. 6
      main/auth/profile.php
  3. 4
      main/exercice/adminhp.php

@ -1,5 +1,5 @@
<?php
// $Id: settings.php 12263 2007-05-03 13:34:40Z elixir_julian $
// $Id: settings.php 12267 2007-05-03 14:07:32Z elixir_julian $
/*
==============================================================================
Dokeos - elearning and course management software
@ -57,7 +57,7 @@ api_protect_admin_script();
if ($_POST['submit_stylesheets'])
{
$message = store_stylesheets();
header("Location: {$_SERVER['PHP_SELF']}?category=stylesheets");
header("Location: ".api_get_self()."?category=stylesheets");
exit;
}

@ -1,5 +1,5 @@
<?php
// $Id: profile.php 11833 2007-04-02 15:05:02Z elixir_julian $
// $Id: profile.php 12267 2007-05-03 14:07:32Z elixir_julian $
/*
==============================================================================
Dokeos - elearning and course management software
@ -113,7 +113,7 @@ $fck_attribute['ToolbarSet'] = "Profil";
/*
* Initialize the form.
*/
$form = new FormValidator('profile', 'post', "{$_SERVER['PHP_SELF']}?{$_SERVER['QUERY_STRING']}", null, array('style' => 'width: 60%; float: '.($text_dir=='rtl'?'right;':'left;')));
$form = new FormValidator('profile', 'post', api_get_self()."?{$_SERVER['QUERY_STRING']}", null, array('style' => 'width: 60%; float: '.($text_dir=='rtl'?'right;':'left;')));
/* Make sure this is the first submit on the form, even though it is hidden!
* Otherwise, if a user has productions and presses ENTER to submit, he will
@ -572,7 +572,7 @@ elseif ($form->validate())
$uidReset = true;
include (api_get_path(INCLUDE_PATH).'local.inc.php');
$_SESSION['profile_update'] = 'success';
header("Location: http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}?{$_SERVER['QUERY_STRING']}");
header("Location: http://{$_SERVER['HTTP_HOST']}".api_get_self()."?{$_SERVER['QUERY_STRING']}");
exit;
}

@ -22,7 +22,7 @@
* HotPotatoes administration.
* @package dokeos.exercise
* @author Istvan Mandak
* @version $Id: adminhp.php 12219 2007-05-01 18:46:59Z yannoo $
* @version $Id: adminhp.php 12267 2007-05-03 14:07:32Z elixir_julian $
*/
@ -113,7 +113,7 @@ if(isset($newName))
}
}
echo "<form action=\"{$_SERVER['PHP_SELF']}\" method='post' name='form1'>";
echo "<form action=\"".api_get_self()."\" method='post' name='form1'>";
echo "<input type=\"hidden\" name=\"hotpotatoesName\" value=\"$hotpotatoesName\">";
echo "<input type=\"text\" name=\"newName\" value=\"";

Loading…
Cancel
Save