403Webshell
Server IP : 104.21.14.103  /  Your IP : 3.145.20.21
Web Server : LiteSpeed
System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : giankuin ( 1871)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/proc/thread-self/root/home/giankuin/thietke365.net/wp-content/plugins/loco-translate/src/ajax/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/proc/thread-self/root/home/giankuin/thietke365.net/wp-content/plugins/loco-translate/src/ajax/DownloadConfController.php
<?php
/**
 * Downloads a bundle configuration as XML or Json
 */
class Loco_ajax_DownloadConfController extends Loco_ajax_common_BundleController {
    
    
    /**
     * {@inheritdoc}
     */
    public function render(){
        
        $this->validate();
        $bundle = $this->getBundle();

        $file = new Loco_fs_File( $this->get('path') );
        // TODO should we download axtual loco.xml file if bundle is configured from it?
        //$file->normalize( $bundle->getDirectoryPath() );
        //if( $file->exists() ){}
        
        $writer = new Loco_config_BundleWriter($bundle);
        
        switch( $file->extension() ){
        case 'xml':
            return $writer->toXml();
        case 'json':
            return json_encode( $writer->jsonSerialize() );
        }
        
        // @codeCoverageIgnoreStart
        throw new Loco_error_Exception('Specify either XML or JSON file path');
    }
        
    
}

Youez - 2016 - github.com/yon3zu
LinuXploit