public function updateTreeOpts($treeID = -3)
    {
        $treeRow = $GLOBALS["SL"]->treeRow;
        if ($treeID <= 0) {
            $treeID = $GLOBALS["SL"]->treeID;
        } else {
            $treeRow = SLTree::find($treeID);
        }
        if ($treeRow->TreeType == 'Page') {
            /* // auto-setting 
            $skipConds = [];
            $testCond = SLConditions::where('CondTag', '#TestLink')
                ->where('CondDatabase', $treeRow->TreeDatabase)
                ->first();
            if (!$testCond || !isset($testCond->CondID)) {
                $testCond = SLConditions::where('CondTag', '#TestLink')
                    ->first();
            }
            if ($testCond && isset($testCond->CondID)) $skipConds[] = $testCond->CondID;
            $chk = DB::select( DB::raw( "SELECT c.`CondNodeCondID`, n.`NodeID` FROM `SL_ConditionsNodes` c 
                LEFT OUTER JOIN `SL_Node` n ON c.`CondNodeNodeID` LIKE n.`NodeID` 
                WHERE n.`NodeTree` LIKE '" . $treeID . "'" . ((sizeof($skipConds) > 0) 
                    ? " AND c.`CondNodeCondID` NOT IN ('" . implode("', '", $skipConds) . "')" : "") ) );
            if ($chk && sizeof($chk)) {
                if ($treeRow->TreeOpts%29 > 0) $treeRow->TreeOpts *= 29;
            } else {
                if ($treeRow->TreeOpts%29 == 0) $treeRow->TreeOpts = $treeRow->TreeOpts/29;
            }
            $treeRow->save();
            */
        }
        return true;
    }
public function updateTreeOpts($treeID = -3)
    {
        $treeRow = $GLOBALS["SL"]->treeRow;
        if ($treeID <= 0) {
            $treeID = $GLOBALS["SL"]->treeID;
        } else {
            $treeRow = SLTree::find($treeID);
        }
        if ($treeRow->TreeType == 'Page') {
            /* // auto-setting 
            $skipConds = [];
            $testCond = SLConditions::where('CondTag', '#TestLink')
                ->where('CondDatabase', $treeRow->TreeDatabase)
                ->first();
            if (!$testCond || !isset($testCond->CondID)) {
                $testCond = SLConditions::where('CondTag', '#TestLink')
                    ->first();
            }
            if ($testCond && isset($testCond->CondID)) $skipConds[] = $testCond->CondID;
            $chk = DB::select( DB::raw( "SELECT c.`CondNodeCondID`, n.`NodeID` FROM `SL_ConditionsNodes` c 
                LEFT OUTER JOIN `SL_Node` n ON c.`CondNodeNodeID` LIKE n.`NodeID` 
                WHERE n.`NodeTree` LIKE '" . $treeID . "'" . ((sizeof($skipConds) > 0) 
                    ? " AND c.`CondNodeCondID` NOT IN ('" . implode("', '", $skipConds) . "')" : "") ) );
            if ($chk && sizeof($chk)) {
                if ($treeRow->TreeOpts%29 > 0) $treeRow->TreeOpts *= 29;
            } else {
                if ($treeRow->TreeOpts%29 == 0) $treeRow->TreeOpts = $treeRow->TreeOpts/29;
            }
            $treeRow->save();
            */
        }
        return true;
    }
public function updateTreeOpts ( $ treeID = - 3 ) { $ treeRow = $ GLOBALS [ "SL" ] -> treeRow ; if ( $ treeID <= 0 ) { $ treeID = $ GLOBALS [ "SL" ] -> treeID ; } else { $ treeRow = SLTree :: find ( $ treeID ) ; } if ( $ treeRow -> TreeType == 'Page' ) { /* // auto-setting 
            $skipConds = [];
            $testCond = SLConditions::where('CondTag', '#TestLink')
                ->where('CondDatabase', $treeRow->TreeDatabase)
                ->first();
            if (!$testCond || !isset($testCond->CondID)) {
                $testCond = SLConditions::where('CondTag', '#TestLink')
                    ->first();
            }
            if ($testCond && isset($testCond->CondID)) $skipConds[] = $testCond->CondID;
            $chk = DB::select( DB::raw( "SELECT c.`CondNodeCondID`, n.`NodeID` FROM `SL_ConditionsNodes` c 
                LEFT OUTER JOIN `SL_Node` n ON c.`CondNodeNodeID` LIKE n.`NodeID` 
                WHERE n.`NodeTree` LIKE '" . $treeID . "'" . ((sizeof($skipConds) > 0) 
                    ? " AND c.`CondNodeCondID` NOT IN ('" . implode("', '", $skipConds) . "')" : "") ) );
            if ($chk && sizeof($chk)) {
                if ($treeRow->TreeOpts%29 > 0) $treeRow->TreeOpts *= 29;
            } else {
                if ($treeRow->TreeOpts%29 == 0) $treeRow->TreeOpts = $treeRow->TreeOpts/29;
            }
            $treeRow->save();
            */ } return true ; }
If none of this tree's nodes have conditions, this tree's cache is the most basic
If none of this tree s nodes have conditions this tree s cache is the most basic