1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-15 03:56:20 +02:00

Bugtracker #4104 - check for link by path when installing plugin

This commit is contained in:
e107steved
2007-09-28 20:00:37 +00:00
parent 6faf81ad2e
commit 6bc203e893

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_handlers/plugin_class.php,v $ | $Source: /cvs_backup/e107_0.8/e107_handlers/plugin_class.php,v $
| $Revision: 1.12 $ | $Revision: 1.13 $
| $Date: 2007-09-16 17:13:51 $ | $Date: 2007-09-28 20:00:31 $
| $Author: e107steved $ | $Author: e107steved $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@ -275,10 +275,13 @@ class e107plugin
if ($action == 'add') if ($action == 'add')
{ {
$link_t = $sql->db_Count('links'); $link_t = $sql->db_Count('links');
if (!$sql->db_Count('links', '(*)', "link_name = '{$link_name}'")) { if (!$sql->db_Count('links', '(*)', "link_url = '{$path}' OR link_name = '{$link_name}'"))
return $sql->db_Insert('links', "0, '{$link_name}', '{$path}', '', '', '1', '".($link_t + 1)."', '0', '0', '{$link_class}' "); {
} else { return $sql->db_Insert('links', "0, '{$link_name}', '{$path}', '', '', '1', '".($link_t + 1)."', '0', '0', '{$link_class}' ");
return FALSE; }
else
{
return FALSE;
} }
} }
if ($action == 'remove') if ($action == 'remove')