Ejemplo n.º 1
0
             exit;
         } else {
             echo json_encode(array('result' => $result, 'msg' => 'Node Dependency deleted'));
             exit;
         }
     } else {
         echo json_encode(array('result' => false, 'msg' => 'AJAX Validation failed'));
         exit;
     }
 }
 ////////////////////////////////////////////////////
 // getSuggestedPrimaryPagePath - gets a suggested primary url for a page - based on the parent
 ////////////////////////////////////////////////////
 if ($_POST['action'] == 'getSuggestedPrimaryPagePath') {
     if (isset($_POST['nodeID']) && is_int((int) $_POST['nodeID']) && isset($_POST['nodeName'])) {
         $path = $content->getSuggestedPrimaryPagePath((int) $_POST['nodeID'], str_replace(' ', '-', trim($_POST['nodeName'])));
         if ($path == '') {
             echo json_encode(array('result' => false, 'msg' => 'Error getting suggested primary page path'));
             exit;
         } else {
             echo json_encode(array('result' => true, 'msg' => 'Primary Page Path sent', 'path' => $path));
             exit;
         }
     } else {
         echo json_encode(array('result' => false, 'msg' => 'AJAX Validation failed'));
         exit;
     }
 }
 ////////////////////////////////////////////////////
 // updatePrimaryPagePath - adds or updates the primary url to a page
 ////////////////////////////////////////////////////