Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-10171

Mnet : remove trailing slash from wwwroot for test client

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8, 1.8.1
    • Fix Version/s: 1.8.4, 1.9, 2.0
    • Component/s: MNet
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      In testclient.php, trailing slash from wwwroot must be removed.
      Workaround: people should edit the wwwroot field in their config.php to remove the trailing slash.

      Here is a fix:

      Index: testclient.php
      ===================================================================
      RCS file: /cvsroot/moodle/moodle/mnet/testclient.php,v
      retrieving revision 1.1
      diff -u -r1.1 testclient.php
      — testclient.php 4 Jan 2007 02:33:52 -0000 1.1
      +++ testclient.php 19 Jun 2007 07:38:41 -0000
      @@ -31,6 +31,9 @@

      // For the demo, our 'remote' host is actually our local host.
      $wwwroot = $CFG->wwwroot;
      +if (substr($wwwroot, -1, 1) == '/')

      { + $wwwroot = substr($wwwroot, 0, -1); +}

      // Enter the complete path to the file that contains the function you want to
      // call on the remote server. In our example the function is in

        Attachments

          Activity

            People

            Assignee:
            donal@catalyst.net.nz Donal McMullan
            Reporter:
            saint-georges Arnaud saint-Georges
            Tester:
            Nobody
            Participants:
            Component watchers:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              11/Jan/08