/** * Converts the file of this style to a RTL ("right-to-left") version. */ public function writeStyleFileRTL() { // get contents of LTR version $contents = file_get_contents(WCF_DIR . 'style/style-' . $this->styleID . '.css'); // convert ltr to rtl $contents = StyleUtil::convertCSSToRTL($contents); // write file $file = new File(WCF_DIR . 'style/style-' . $this->styleID . '-rtl.css'); $file->write($contents); $file->close(); @chmod(WCF_DIR . 'style/style-' . $this->styleID . '-rtl.css', 0777); }
/** * Converts the file of this style to a RTL ("right-to-left") version. */ public static function updateStyleFileRTL() { // get contents of LTR version $contents = file_get_contents(WCF_DIR . 'acp/style/style-ltr.css'); // convert ltr to rtl $contents = StyleUtil::convertCSSToRTL($contents); // write file $file = new File(WCF_DIR . 'acp/style/style-rtl.css'); $file->write($contents); // close file $file->close(); @chmod(WCF_DIR . 'acp/style/style-rtl.css', 0777); }