XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
install_modcheck_trustext.inc.dist.php
1<?php
11
12// checking XOOPS_ROOT_PATH and XOOPS_URL
13include_once '../mainfile.php';
14
15echo '<h2>custom/install_modcheck_trusttext.inc.dist</h2>';
16
17$writeok = [ 'cache/', 'templates_c/', 'uploads/', 'uploads/xupdate/', 'modules/protector/configs/' ];
18$error = false;
19
20foreach ( $writeok as $wok ) {
21 if ( ! is_dir( XOOPS_TRUST_PATH . '/' . $wok ) ) {
22 if ( file_exists( XOOPS_TRUST_PATH . '/' . $wok ) ) {
23 @chmod( XOOPS_TRUST_PATH . '/' . $wok, 0666 );
24 if ( ! is_writable( XOOPS_TRUST_PATH . '/' . $wok ) ) {
25 $wizard->addArray( 'checks', _NGIMG . sprintf( _INSTALL_L83, $wok ) );
26 $error = true;
27 } else {
28 $wizard->addArray( 'checks', _OKIMG . sprintf( _INSTALL_L84, $wok ) );
29 }
30 }
31 } else {
32 @chmod( XOOPS_TRUST_PATH . '/' . $wok, 0777 );
33 if ( ! is_writable( XOOPS_TRUST_PATH . '/' . $wok ) ) {
34 $wizard->addArray( 'checks', _NGIMG . sprintf( _INSTALL_L85, XOOPS_TRUST_PATH . '/' . $wok ) );
35 $error = true;
36 } else {
37 $wizard->addArray( 'checks', _OKIMG . sprintf( _INSTALL_L86, XOOPS_TRUST_PATH . '/' . $wok ) );
38 }
39 }
40}
41
42if ( ! $error ) {
43 $wizard->assign( 'message', '<div class="confirmOk">'. _INSTALL_L87 .'</div>' );
44 $wizard->assign( 'message', '<div class="confirmOk">install modcheck trustext inc dist</div>' );
45} else {
46 $wizard->assign( 'message', '<div class="confirmError">'. _INSTALL_L46 .'</div>' );
47 $wizard->setReload( true );
48}
49$wizard->render( 'install_modcheck.tpl.php' );