-
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/fixbuilder' into feature/appstat
- Loading branch information
Showing
67 changed files
with
1,366 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
//MODX BUILD ENVIRONMENT GUI v1 | ||
|
||
const MODX_CORE_PATH = MODX_BASE_PATH . 'core/'; | ||
|
||
if (!isset($_REQUEST['getpackage']) && empty($_REQUEST['getpackage'])) { | ||
|
||
$current_dir = dirname(__FILE__); | ||
|
||
$scanned_directory = array_diff(scandir($current_dir), array('..', '.')); | ||
echo "<h1>MODX build environment GUI</h1>"; | ||
echo "<b>Available packages for build:</b> (with versions from build.config.php if exists)<br/><br/>"; | ||
//echo "<b>Данные о версии берутся из файла конфигурации пакета</b> (build.config.php)<br/><br/>"; | ||
foreach ($scanned_directory as $packagename) { | ||
if (is_dir($current_dir.'/'.$packagename)) { | ||
$config = file_get_contents($current_dir.'/'.$packagename.'/'."build.config.php"); | ||
/*parse version*/ | ||
$version_preg = "#PKG_VERSION['\",=\s]*([0-9\.]+)#"; | ||
$release_preg = "#PKG_RELEASE['\",=\s]*([a-z0-9\.]+)['\"]#"; | ||
$version = ''; | ||
$matches = []; | ||
if (preg_match($version_preg, $config, $matches)) { | ||
$version .= $matches[1]; | ||
} | ||
if (preg_match($release_preg, $config, $matches)) { | ||
$version .= '-'.$matches[1]; | ||
} | ||
echo "<b>{$packagename}</b> <a target='_blank' href='/_build/{$packagename}/build.transport.php'>[build package]</a> (".$version.")<br/><br/>"; | ||
} | ||
} | ||
|
||
echo "<div style='color:#aaa; margin-top: 200px'>Made for MODX RSC by @dimasites and friends</div>"; | ||
|
||
}else{ | ||
// Define paths | ||
if (isset($_SERVER['MODX_BASE_PATH'])) { | ||
define('MODX_BASE_PATH', $_SERVER['MODX_BASE_PATH']); | ||
} elseif (file_exists(dirname(__FILE__, 2) . '/core')) { | ||
define('MODX_BASE_PATH', dirname(__FILE__, 2) . '/'); | ||
} else { | ||
define('MODX_BASE_PATH', dirname(__FILE__, 3) . '/'); | ||
} | ||
|
||
$file = MODX_CORE_PATH.'packages/'.$_REQUEST['getpackage'].'.transport.zip'; | ||
|
||
if (file_exists($file)) { | ||
header('Content-Description: File Transfer'); | ||
header('Content-Type: application/octet-stream'); | ||
header('Content-Disposition: attachment; filename="' . basename($file) . '"'); | ||
header('Expires: 0'); | ||
header('Cache-Control: must-revalidate'); | ||
header('Pragma: public'); | ||
header('Content-Length: ' . filesize($file)); | ||
readfile($file); | ||
exit; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
#minishop2-help-text { | ||
box-sizing: border-box; | ||
width: 100%; | ||
margin: 24px 0; | ||
padding: 18px; | ||
|
||
background: #fff; | ||
border: 1px solid #e4e4e4; | ||
border-radius: 3px; | ||
box-shadow: 0 1px 0 #e4e4e4; | ||
} | ||
|
||
|
||
#minishop2-help-text .icon { | ||
margin-right: 5px; | ||
} | ||
|
||
#minishop2-help-text img { | ||
float: right; | ||
max-height: 100px; | ||
padding-left: 30px; | ||
} | ||
|
||
#minishop2-help-text p { | ||
margin-bottom: 20px; | ||
} | ||
|
||
#minishop2-help-text p:last-child { | ||
margin-bottom: 0; | ||
} | ||
|
||
#minishop2-help-text textarea { | ||
width: calc(100% - 10px); | ||
height: 250px; | ||
} | ||
|
||
#minishop2-help-links { | ||
overflow: hidden; | ||
width: 100%; | ||
margin-bottom: 1em; | ||
} | ||
|
||
#minishop2-help-links ul { | ||
width: 100%; | ||
margin: 0; | ||
} | ||
|
||
#minishop2-help-links ul li { | ||
position: relative; | ||
|
||
float: left; | ||
display: table; | ||
|
||
box-sizing: border-box; | ||
width: 16.5%; | ||
min-height: 130px; | ||
margin: 0; | ||
padding: 0 1%; | ||
} | ||
|
||
@media (width <= 1023px) { | ||
#minishop2-help-links ul li { | ||
width: 33%; | ||
padding: 5px; | ||
} | ||
} | ||
|
||
#minishop2-help-links ul li a { | ||
position: relative; | ||
|
||
display: table-cell; | ||
|
||
padding: 10px; | ||
|
||
font-weight: bold; | ||
color: #53595f; | ||
text-align: center; | ||
text-decoration: none; | ||
vertical-align: middle; | ||
|
||
background-color: #fff; | ||
border: 1px solid #e4e4e4; | ||
border-radius: 3px; | ||
box-shadow: 0 1px 0 #e4e4e4; | ||
} | ||
|
||
#minishop2-help-links ul li a span { | ||
display: block; | ||
line-height: 1.2; | ||
} | ||
|
||
#minishop2-help-links ul li a .title { | ||
font-size: 12px; | ||
} | ||
|
||
#minishop2-help-links ul li a .text { | ||
font-weight: normal; | ||
} | ||
|
||
#minishop2-help-links ul li a .icon { | ||
display: block; | ||
width: auto; | ||
margin: 0 auto; | ||
padding: 0 0 10px; | ||
} | ||
|
||
#minishop2-help-links ul li a:hover .icon { | ||
color: #3697cd; | ||
} |
Oops, something went wrong.