Code Duplication    Length = 3-3 lines in 4 locations

class/utility.php 4 locations

@@ 114-116 (lines=3) @@
111
    public static function deleteDirectory($src)
112
    {
113
        // Only continue if user is a 'global' Admin
114
        if (!($GLOBALS['xoopsUser'] instanceof XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
115
            return false;
116
        }
117
118
        $success = true;
119
        // remove old files
@@ 162-164 (lines=3) @@
159
    public static function rrmdir($src)
160
    {
161
        // Only continue if user is a 'global' Admin
162
        if (!($GLOBALS['xoopsUser'] instanceof XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
163
            return false;
164
        }
165
166
        // If source is not a directory stop processing
167
        if (!is_dir($src)) {
@@ 202-204 (lines=3) @@
199
    public static function rmove($src, $dest)
200
    {
201
        // Only continue if user is a 'global' Admin
202
        if (!($GLOBALS['xoopsUser'] instanceof XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
203
            return false;
204
        }
205
206
        // If source is not a directory stop processing
207
        if (!is_dir($src)) {
@@ 245-247 (lines=3) @@
242
    public static function rcopy($src, $dest)
243
    {
244
        // Only continue if user is a 'global' Admin
245
        if (!($GLOBALS['xoopsUser'] instanceof XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
246
            return false;
247
        }
248
249
        // If source is not a directory stop processing
250
        if (!is_dir($src)) {