1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 05:37:32 +02:00

links_page verify method missing

This commit is contained in:
lisa
2009-01-30 22:03:13 +00:00
parent 2413b36923
commit 297d4c7212
2 changed files with 22 additions and 6 deletions

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_plugins/links_page/link_class.php,v $ | $Source: /cvs_backup/e107_0.8/e107_plugins/links_page/link_class.php,v $
| $Revision: 1.11 $ | $Revision: 1.12 $
| $Date: 2008-12-29 20:51:07 $ | $Date: 2009-01-30 22:03:13 $
| $Author: lisa_ $ | $Author: lisa_ $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -550,6 +550,19 @@ class linkclass
} }
} }
function verify_link_manage($id)
{
global $sql;
if ($sql->db_Select("links_page", "link_author", "link_id='".intval($id)."' "))
{
$row = $sql->db_Fetch();
}
if(varset($row['link_author']) != USERID)
{
js_location(SITEURL);
}
}
// Create a new link. If $mode == 'submit', link has to go through the approval process; else its admin entry // Create a new link. If $mode == 'submit', link has to go through the approval process; else its admin entry
function dbLinkCreate($mode='') function dbLinkCreate($mode='')

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_plugins/links_page/links.php,v $ | $Source: /cvs_backup/e107_0.8/e107_plugins/links_page/links.php,v $
| $Revision: 1.12 $ | $Revision: 1.13 $
| $Date: 2008-12-13 16:06:11 $ | $Date: 2009-01-30 22:03:13 $
| $Author: e107steved $ | $Author: lisa_ $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
require_once('../../class2.php'); require_once('../../class2.php');
@@ -126,8 +126,11 @@ if (isset($_POST['add_link']))
if($qs[0] == "manage") if($qs[0] == "manage")
{ {
if(check_class($linkspage_pref['link_manager_class'])) if(check_class($linkspage_pref['link_manager_class']))
{
if(isset($qs[2]) && is_numeric($qs[2]))
{ {
$lc->verify_link_manage($qs[2]); $lc->verify_link_manage($qs[2]);
}
if(isset($linkspage_pref['link_directpost']) && $linkspage_pref['link_directpost']) if(isset($linkspage_pref['link_directpost']) && $linkspage_pref['link_directpost'])
{ {