Results 1 to 3 of 3

Thread: Change working directory

  1. #1
    austints is offline Sugar Community Member
    Join Date
    May 2006
    Posts
    30

    Default Change working directory

    Ok, my module is almost complete. I would like to thank everybody on the boards for their contributions. I have one last problem that I have run into. In my ListView, I am including the ACLRole module so that I can use Role permissions. When I first click on my module tab, everything loads smoothly because the working directory is the root directory of my Sugar install and all the include paths are correct. However, to update my ListView after an edit, I am making an Ajax call and calling a page directly from my module directory. This changes the working directory of the php scripts and now my ACLRole include no longer works. When I call the ACLRole module using its absolute path, the working directory is wrong for that module and all the includes in the ACLRole module cannot be found. Is there a way to change the working directory, or call my Ajax update page from the root directory, so that I can solve this problem? Thanks
    Edit/Delete Message

  2. #2
    austints is offline Sugar Community Member
    Join Date
    May 2006
    Posts
    30

    Default Re: Change working directory

    Can anybody help me with this?

  3. #3
    SoftDev is offline Sugar Community Member
    Join Date
    Nov 2007
    Location
    India
    Posts
    32

    Default Re: Change working directory

    Hi austints,

    Is there a way to change the working directory, or call my Ajax update page from the root directory, so that I can
    solve this problem?
    I don't have idea to change the working directory, but we can call your Ajax update page from the root directory, provided this ajax page belongs to same domain, in which the ajax calling page is present, for this, just call ajax page with absolute URL

    eg. instead of
    Code:
    ajax.open("GET","/include/ajax/HandleAjax.php?K1=V1&K2=V2",true);
    use this code
    Code:
    ajax.open("GET","http://www.<UR_SUGAR_SITE>/include/ajax/HandleAjax.php?K1=V1&K2=V2",true);
    Hope this will solve your issue
    Ravi Bhushan
    JOSS Developer
    HNC Infotech
    Delhi, India
    Talk 2 Me : +91-9013392444

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •