Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 148... Línea 148...
148
 
148
 
149
    return true;
149
    return true;
Línea 150... Línea 150...
150
}
150
}
151
 
-
 
152
/**
-
 
153
 * Print help button
-
 
154
 * @param string $url
-
 
155
 * @param string $titel
-
 
156
 * @return void
-
 
157
 */
-
 
158
function install_helpbutton($url, $title='') {
-
 
159
    if ($title == '') {
-
 
160
        $title = get_string('help');
-
 
161
    }
-
 
162
    echo "<a href=\"javascript:void(0)\" ";
-
 
163
    echo "onclick=\"return window.open('$url','Help','menubar=0,location=0,scrollbars,resizable,width=500,height=400')\"";
-
 
164
    echo ">";
-
 
165
    echo "<img src=\"pix/help.gif\" class=\"iconhelp\" alt=\"$title\" title=\"$title\"/>";
-
 
166
    echo "</a>\n";
-
 
167
}
-
 
168
 
151
 
169
/**
152
/**
170
 * This is in function because we want the /install.php to parse in PHP4
153
 * This is in function because we want the /install.php to parse in PHP4
171
 *
154
 *
172
 * @param object $database
155
 * @param object $database
Línea 274... Línea 257...
274
 
257
 
275
    return $configphp;
258
    return $configphp;
Línea 276... Línea 259...
276
}
259
}
277
 
-
 
278
/**
-
 
279
 * Prints complete help page used during installation.
-
 
280
 * Does not return.
-
 
281
 *
-
 
282
 * @global object
-
 
283
 * @param string $help
-
 
284
 */
-
 
285
function install_print_help_page($help) {
-
 
286
    global $CFG, $OUTPUT; //TODO: MUST NOT USE $OUTPUT HERE!!!
-
 
287
 
-
 
288
    @header('Content-Type: text/html; charset=UTF-8');
-
 
289
    @header('X-UA-Compatible: IE=edge');
-
 
290
    @header('Cache-Control: no-store, no-cache, must-revalidate');
-
 
291
    @header('Cache-Control: post-check=0, pre-check=0', false);
-
 
292
    @header('Pragma: no-cache');
-
 
293
    @header('Expires: Mon, 20 Aug 1969 09:23:00 GMT');
-
 
294
    @header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
-
 
295
 
-
 
296
    echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
-
 
297
    echo '<html dir="'.(right_to_left() ? 'rtl' : 'ltr').'">
-
 
298
          <head>
-
 
299
          <link rel="shortcut icon" href="theme/clean/pix/favicon.ico" />
-
 
300
          <link rel="stylesheet" type="text/css" href="'.$CFG->wwwroot.'/install/css.php" />
-
 
301
          <title>'.get_string('installation','install').'</title>
-
 
302
          <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
 
303
          </head><body>';
-
 
304
    switch ($help) {
-
 
305
        case 'phpversionhelp':
-
 
306
            print_string($help, 'install', phpversion());
-
 
307
            break;
-
 
308
        case 'memorylimithelp':
-
 
309
            print_string($help, 'install', @ini_get('memory_limit'));
-
 
310
            break;
-
 
311
        default:
-
 
312
            print_string($help, 'install');
-
 
313
    }
-
 
314
    echo $OUTPUT->close_window_button(); //TODO: MUST NOT USE $OUTPUT HERE!!!
-
 
315
    echo '</body></html>';
-
 
316
    die;
-
 
317
}
-
 
318
 
260
 
319
/**
261
/**
320
 * Prints installation page header, we can not use weblib yet in installer.
262
 * Prints installation page header, we can not use weblib yet in installer.
321
 *
263
 *
322
 * @global object
264
 * @global object
Línea 386... Línea 328...
386
 */
328
 */
387
function install_print_footer($config, $reload=false) {
329
function install_print_footer($config, $reload=false) {
388
    global $CFG;
330
    global $CFG;
Línea 389... Línea 331...
389
 
331
 
390
    if ($config->stage > INSTALL_WELCOME) {
332
    if ($config->stage > INSTALL_WELCOME) {
391
        $first = '<input type="submit" id="previousbutton" class="btn btn-secondary flex-grow-0 ml-auto" name="previous" value="&laquo; '.s(get_string('previous')).'" />';
333
        $first = '<input type="submit" id="previousbutton" class="btn btn-secondary flex-grow-0 ms-auto" name="previous" value="&laquo; '.s(get_string('previous')).'" />';
392
    } else {
334
    } else {
393
        $first = '<input type="submit" id="previousbutton" class="btn btn-secondary flex-grow-0  ml-auto" name="next" value="'.s(get_string('reload')).'" />';
335
        $first = '<input type="submit" id="previousbutton" class="btn btn-secondary flex-grow-0  ms-auto" name="next" value="'.s(get_string('reload')).'" />';
394
        $first .= '<script type="text/javascript">
336
        $first .= '<script type="text/javascript">
395
//<![CDATA[
337
//<![CDATA[
396
    var first = document.getElementById("previousbutton");
338
    var first = document.getElementById("previousbutton");
397
    first.style.visibility = "hidden";
339
    first.style.visibility = "hidden";
398
//]]>
340
//]]>
399
</script>
341
</script>
400
';
342
';
Línea 401... Línea 343...
401
    }
343
    }
402
 
344
 
403
    if ($reload) {
345
    if ($reload) {
404
        $next = '<input type="submit" id="nextbutton" class="btn btn-primary ml-1 flex-grow-0 mr-auto" name="next" value="'.s(get_string('reload')).'" />';
346
        $next = '<input type="submit" id="nextbutton" class="btn btn-primary ms-1 flex-grow-0 me-auto" name="next" value="'.s(get_string('reload')).'" />';
405
    } else {
347
    } else {
Línea 406... Línea 348...
406
        $next = '<input type="submit" id="nextbutton" class="btn btn-primary ml-1 flex-grow-0 mr-auto" name="next" value="'.s(get_string('next')).' &raquo;" />';
348
        $next = '<input type="submit" id="nextbutton" class="btn btn-primary ms-1 flex-grow-0 me-auto" name="next" value="'.s(get_string('next')).' &raquo;" />';
Línea 407... Línea 349...
407
    }
349
    }
Línea 429... Línea 371...
429
    global $CFG, $DB;
371
    global $CFG, $DB;
430
    require_once($CFG->libdir.'/environmentlib.php');
372
    require_once($CFG->libdir.'/environmentlib.php');
431
    require_once($CFG->libdir.'/upgradelib.php');
373
    require_once($CFG->libdir.'/upgradelib.php');
Línea 432... Línea 374...
432
 
374
 
433
    // show as much debug as possible
375
    // show as much debug as possible
434
    @error_reporting(E_ALL | E_STRICT);
376
    @error_reporting(E_ALL);
435
    @ini_set('display_errors', '1');
377
    @ini_set('display_errors', '1');
436
    $CFG->debug = (E_ALL | E_STRICT);
378
    $CFG->debug = (E_ALL);
437
    $CFG->debugdisplay = true;
379
    $CFG->debugdisplay = true;
Línea 438... Línea 380...
438
    $CFG->debugdeveloper = true;
380
    $CFG->debugdeveloper = true;
439
 
381