1
|
|
|
<?php |
2
|
|
|
// |
3
|
|
|
// ------------------------------------------------------------------------ // |
4
|
|
|
// This program is free software; you can redistribute it and/or modify // |
5
|
|
|
// it under the terms of the GNU General Public License as published by // |
6
|
|
|
// the Free Software Foundation; either version 2 of the License, or // |
7
|
|
|
// (at your option) any later version. // |
8
|
|
|
// // |
9
|
|
|
// You may not change or alter any portion of this comment or credits // |
10
|
|
|
// of supporting developers from this source code or any supporting // |
11
|
|
|
// source code which is considered copyrighted (c) material of the // |
12
|
|
|
// original comment or credit authors. // |
13
|
|
|
// // |
14
|
|
|
// This program is distributed in the hope that it will be useful, // |
15
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of // |
16
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // |
17
|
|
|
// GNU General Public License for more details. // |
18
|
|
|
// // |
19
|
|
|
// You should have received a copy of the GNU General Public License // |
20
|
|
|
// along with this program; if not, write to the Free Software // |
21
|
|
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // |
22
|
|
|
// ------------------------------------------------------------------------ // |
23
|
|
|
// Author: phppp (D.J., [email protected]) // |
24
|
|
|
// URL: https://xoops.org // |
25
|
|
|
// Project: Article Project // |
26
|
|
|
// ------------------------------------------------------------------------ // |
27
|
|
|
/** |
28
|
|
|
* @package module::blogline |
29
|
|
|
* @copyright copyright © 2005 XoopsForge.com |
30
|
|
|
*/ |
31
|
|
|
|
32
|
|
|
// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
|
|
|
|
33
|
|
|
require_once __DIR__ . '/../include/vars.php'; |
34
|
|
|
//mod_loadFunctions('', $GLOBALS['moddirname']); |
|
|
|
|
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* Bookmark |
38
|
|
|
* |
39
|
|
|
* @author D.J. (phppp) |
40
|
|
|
* @copyright copyright © 2005 XoopsForge.com |
41
|
|
|
* @package module::article |
42
|
|
|
* |
43
|
|
|
* {@link XoopsObject} |
44
|
|
|
**/ |
45
|
|
View Code Duplication |
if (!class_exists('Bookmark')): |
|
|
|
|
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* Class Bookmark |
49
|
|
|
*/ |
50
|
|
|
class bookmark extends XoopsObject |
51
|
|
|
{ |
52
|
|
|
/** |
53
|
|
|
* Constructor |
54
|
|
|
*/ |
55
|
|
|
public function __construct() |
56
|
|
|
{ |
57
|
|
|
// $this->ArtObject(); |
|
|
|
|
58
|
|
|
$this->table = planet_DB_prefix('bookmark'); |
59
|
|
|
$this->initVar('bm_id', XOBJ_DTYPE_INT, null, false); |
60
|
|
|
/* user ID */ |
61
|
|
|
$this->initVar('bm_uid', XOBJ_DTYPE_INT, 0, true); |
62
|
|
|
/* blog ID */ |
63
|
|
|
$this->initVar('blog_id', XOBJ_DTYPE_INT, 0, true); |
64
|
|
|
} |
65
|
|
|
} |
66
|
|
|
endif; |
67
|
|
|
/** |
68
|
|
|
* Topic object handler class. |
69
|
|
|
* @package module::article |
70
|
|
|
* |
71
|
|
|
* @author D.J. (phppp) |
72
|
|
|
* @copyright copyright © 2005 XOOPS Project |
73
|
|
|
* |
74
|
|
|
* {@link XoopsPersistableObjectHandler} |
75
|
|
|
* |
76
|
|
|
* @param CLASS_PREFIX variable prefix for the class name |
77
|
|
|
*/ |
78
|
|
|
|
79
|
|
|
PlanetUtility::planetParseClass(' |
80
|
|
|
class [CLASS_PREFIX]BookmarkHandler extends XoopsPersistableObjectHandler |
81
|
|
|
{ |
82
|
|
|
/** |
83
|
|
|
* Constructor |
84
|
|
|
* |
85
|
|
|
* @param object $db reference to the {@link XoopsDatabase} object |
86
|
|
|
**/ |
87
|
|
|
public function __construct(XoopsDatabase $db) { |
88
|
|
|
parent::__construct($db, planet_DB_prefix("bookmark", true), "Bookmark", "bm_id"); |
89
|
|
|
} |
90
|
|
|
} |
91
|
|
|
'); |
92
|
|
|
|
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.