Updates
Adjusted log severity Improved error reporting Improved token handling Improved Config Form handling
This commit is contained in:
@ -14,6 +14,7 @@ namespace TheTempusProject\Bedrock\Classes;
|
||||
use TheTempusProject\Canary\Bin\Canary as Debug;
|
||||
use TheTempusProject\Bedrock\Functions\Check;
|
||||
use TheTempusProject\Bedrock\Functions\Input;
|
||||
use TheTempusProject\Bedrock\Functions\Upload;
|
||||
|
||||
class Config {
|
||||
public static $config = false;
|
||||
@ -145,7 +146,19 @@ class Config {
|
||||
}
|
||||
$fieldname = str_ireplace( '/', '-', $name );
|
||||
if ( Input::exists( $fieldname ) ) {
|
||||
$this->update( $category, $field, Input::post( $fieldname ) );
|
||||
if ( 'file' == $node['type'] ) {
|
||||
$upload = Upload::image( $fieldname, IMAGE_DIRECTORY );
|
||||
if ( $upload ) {
|
||||
$route = str_replace( APP_ROOT_DIRECTORY, '', IMAGE_DIRECTORY );
|
||||
$this->update( $category, $field, $route . Upload::last() );
|
||||
} else {
|
||||
Debug::error( 'There was an error with your upload.');
|
||||
}
|
||||
} else {
|
||||
$this->update( $category, $field, Input::post( $fieldname ) );
|
||||
}
|
||||
} elseif ( 'radio' == $node['type'] ) {
|
||||
$this->update( $category, $field, false );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ class Database {
|
||||
foreach ( $params as $param ) {
|
||||
$x++;
|
||||
if ( is_array( $param ) ) {
|
||||
dv( $param );
|
||||
// dv( $param );
|
||||
}
|
||||
$this->query->bindValue( $x, $param );
|
||||
}
|
||||
|
Reference in New Issue
Block a user