Code Duplication    Length = 5-7 lines in 2 locations

classes/PodsUI.php 2 locations

@@ 1335-1341 (lines=7) @@
1332
        $this->ui_page = array( $this->action );
1333
        if ( 'add' == $this->action && !in_array( $this->action, $this->actions_disabled ) ) {
1334
            $this->ui_page[] = 'form';
1335
            if ( 'create' == $this->do && $this->save && !in_array( $this->do, $this->actions_disabled ) && !empty( $_POST ) ) {
1336
                $this->ui_page[] = $this->do;
1337
                $this->save( true );
1338
                $this->manage();
1339
            }
1340
            else
1341
                $this->add();
1342
        }
1343
        elseif ( ( 'edit' == $this->action && !in_array( $this->action, $this->actions_disabled ) ) || ( 'duplicate' == $this->action && !in_array( $this->action, $this->actions_disabled ) ) ) {
1344
            $this->ui_page[] = 'form';
@@ 1365-1369 (lines=5) @@
1362
            $this->save();
1363
            $this->manage();
1364
        }
1365
        elseif ( 'create' == $this->do && $this->save && !in_array( $this->do, $this->actions_disabled ) && !empty( $_POST ) ) {
1366
            $this->ui_page[] = $this->do;
1367
            $this->save( true );
1368
            $this->manage();
1369
        }
1370
        elseif ( 'view' == $this->action && !in_array( $this->action, $this->actions_disabled ) )
1371
            $this->view();
1372
		else {