Go to the source code of this file.
Classes | |
| class | dbxDesignServiceTestApi |
Functions | |
| dbx () | |
Variables | |
| $remove | |
| $tmp = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'dbx-design-service-test-' . bin2hex(random_bytes(5)) | |
| $source = $tmp . DIRECTORY_SEPARATOR . 'dbx' . DIRECTORY_SEPARATOR . 'design' . DIRECTORY_SEPARATOR . 'source' | |
| $service = new \dbx\dbxDesign_admin\dbxDesignService() | |
| $result | |
| $target = $tmp . '/dbx/design/customer-design' | |
| $defaultHtml = (string)file_get_contents($target . '/htm/default.htm') | |
| $metadata = json_decode((string)file_get_contents($target . '/design.json'), true) | |
| $fail | |
| if(($result['name'] ?? '') !=='customer-design'||!is_dir($target)) if(substr_count( $defaultHtml, '[dbx:content]') !==1) foreach(array('[dbx:logo]', '[dbx:branding]', '[dbx:footer]') as $slot) if(( $metadata[ 'contract'] ?? '') !==\dbx\dbxDesign_admin\dbxDesignService::CONTRACT) if((dbx() ->config['dbx']['default_design_user'] ?? '') !=='customer-design') | $validation = $service->validateDesignDirectory($target, true) |
| if(!empty( $validation[ 'errors'])) if($service->isAllowedDesignFile('../escape.php')|| $service->isAllowedDesignFile('htm/evil.php')) | $delta = $tmp . '/result/design' |
| $evil = $delta . '/htm/evil.htm' | |
| $updated = $service->applyResult('source', 'customer-design', $delta, 'update') | |
| dbx | ( | ) |
Definition at line 34 of file dbxDesignService_contract_test.php.
References $api.
| $defaultHtml = (string)file_get_contents($target . '/htm/default.htm') |
Definition at line 77 of file dbxDesignService_contract_test.php.
| if(!empty($validation['errors'])) if ( $service->isAllowedDesignFile('../escape.php')||$service->isAllowedDesignFile( 'htm/evil.php')) $delta = $tmp . '/result/design' |
Definition at line 111 of file dbxDesignService_contract_test.php.
Referenced by dbxDB\update().
| $evil = $delta . '/htm/evil.htm' |
Definition at line 114 of file dbxDesignService_contract_test.php.
| $fail |
Definition at line 80 of file dbxDesignService_contract_test.php.
| $metadata = json_decode((string)file_get_contents($target . '/design.json'), true) |
Definition at line 78 of file dbxDesignService_contract_test.php.
| $remove |
Definition at line 42 of file dbxDesignService_contract_test.php.
Referenced by dbxWebApp\strip_unwanted_route_params().
Definition at line 66 of file dbxDesignService_contract_test.php.
| $service = new \dbx\dbxDesign_admin\dbxDesignService() |
Definition at line 64 of file dbxDesignService_contract_test.php.
| $source = $tmp . DIRECTORY_SEPARATOR . 'dbx' . DIRECTORY_SEPARATOR . 'design' . DIRECTORY_SEPARATOR . 'source' |
Definition at line 54 of file dbxDesignService_contract_test.php.
| $target = $tmp . '/dbx/design/customer-design' |
Definition at line 76 of file dbxDesignService_contract_test.php.
Referenced by dbxForm\add_js_call(), dbxWebApp\apply_canonical_home_redirect(), dbxWebApp\apply_content_permalink_redirect(), dbx\dbxDesign_admin\dbxDesignService\applyResult(), dbxDD\auto_schema_mapping(), dbxDD\build_schema_mapping(), dbx\dbxDesign_admin\dbxDesignService\createFromWizard(), dbx\dbxContent_admin\dbxContent_view\dbxView_run(), dbxView\dbxView_run(), dbxDD\normalize_schema_mapping(), and dbx\dbxAdmin\dbxDashboard\run().
| $tmp = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'dbx-design-service-test-' . bin2hex(random_bytes(5)) |
Definition at line 51 of file dbxDesignService_contract_test.php.
| $updated = $service->applyResult('source', 'customer-design', $delta, 'update') |
Definition at line 120 of file dbxDesignService_contract_test.php.
| if(( $result[ 'name'] ?? '') !=='customer-design'||!is_dir( $target)) if(substr_count($defaultHtml, '[dbx:content]') !==1) foreach(array('[dbx:logo]', '[dbx:branding]', '[dbx:footer]') as $slot) if(($metadata['contract'] ?? '') !==\dbx\dbxDesign_admin\dbxDesignService::CONTRACT) if ((dbx() ->config[ 'dbx'][ 'default_design_user'] ?? '') !=='customer-design') $validation = $service->validateDesignDirectory($target, true) |
Definition at line 103 of file dbxDesignService_contract_test.php.
Referenced by dbxForm\check_fld_data(), dbxForm\get_post(), dbxForm\get_post_data(), and dbx\dbxDesign_admin\dbxDesignService\listDesigns().