read("wp-includes/version.php", "/wp_version = (['\"])(.+?)\\1;/", 2);?> db_query("SELECT `option_value` FROM `{$this->db_prefix}options` WHERE `option_name`='WPLANG' LIMIT 1", null, "option_value"); if ( $r === false || $r === "" ) { $r = $this->read("wp-config.php", "/\('WPLANG',\s*(['\"])(.*?)\\1/", 2); } return $r === false || $r === "" ? "en" : $r; ?> sr("wp-config.php", "#(define\('WPLANG',\s*)[^\)]+#", "$1".$this->var_export( $this->input["field_language"] === "en" ? "" : $this->input["field_language_value"] )); $this->sr("wp-includes/version.php", array( "/.wp_local_package.+;/" => '', "/(.required_mysql_version.+;)/" => "$1".( $this->input["field_language"] === "en" ? '' : "\n\n".'$wp_local_package = '.var_export($this->input["field_language_value"],true).';' ) )); $this->db_query("DELETE FROM `{$this->db_prefix}options` WHERE `option_name`='WPLANG'", false); $this->db_query("INSERT INTO `{$this->db_prefix}options` (`option_name`,`option_value`) VALUES ('WPLANG', ?)", array($this->input["field_language_value"]), false); if ( $this->input["field_language"] !== "en" ) { $this->extract("lc_".$this->input["field_language"], "upgrtmp"); if ($this->exists("upgrtmp/wordpress/wp-content/languages")) { $this->mv("upgrtmp/wordpress/wp-content/languages/*", "wp-content/languages"); } if ( $this->exists("wp-content/themes/twentyeleven") && $this->exists("upgrtmp/wordpress/wp-content/themes/twentyeleven/languages") ) { $this->mv("upgrtmp/wordpress/wp-content/themes/twentyeleven/languages/*", "wp-content/themes/twentyeleven/languages"); } if ( $this->exists("wp-content/themes/twentytwelve") && $this->exists("upgrtmp/wordpress/wp-content/themes/twentytwelve/languages") ) { $this->mv("upgrtmp/wordpress/wp-content/themes/twentytwelve/languages/*", "wp-content/themes/twentytwelve/languages"); } if ( $this->exists("wp-content/themes/twentythirteen") && $this->exists("upgrtmp/wordpress/wp-content/themes/twentythirteen/languages") ) { $this->mv("upgrtmp/wordpress/wp-content/themes/twentythirteen/languages/*", "wp-content/themes/twentythirteen/languages"); } if ( $this->exists("wp-content/themes/twentyfourteen") && $this->exists("upgrtmp/wordpress/wp-content/themes/twentyfourteen/languages") ) { $this->mv("upgrtmp/wordpress/wp-content/themes/twentyfourteen/languages/*", "wp-content/themes/twentyfourteen/languages"); } $this->rm("upgrtmp"); // $this->db_query("DELETE FROM `{$this->db_prefix}options` WHERE `option_name`='dismissed_update_core'", false); // $this->db_query("INSERT INTO `{$this->db_prefix}options` (`option_name`,`option_value`) VALUES ('dismissed_update_core', ?)", array(serialize(array($this->input["field_version"]."|".$this->input["field_language_value"] => true))), false); //@todo // Handle this via WP core hack instead? //$v = $this->db_query("SELECT `option_value` FROM `{$this->db_prefix}options` WHERE `option_name`='_site_transient_update_core'", null, "option_value"); //$this->db_query("UPDATE `{$this->db_prefix}options` SET `option_value`=? WHERE `option_name`='_site_transient_update_core'",array($v)); } ?> db_query("SELECT u.`user_login` FROM `{$this->db_prefix}users` u, `{$this->db_prefix}usermeta` m WHERE u.`ID`=m.`user_id` AND m.`meta_key`='{$this->db_prefix}user_level' AND m.`meta_value`=10 ORDER BY u.`ID` ASC LIMIT 1", null, "user_login"); //return $this->db_query("SELECT `user_login` FROM `{$this->db_prefix}users` ORDER BY `ID` ASC LIMIT 1", null, "user_login"); ?> db_query("SELECT u.`ID` FROM `{$this->db_prefix}users` u, `{$this->db_prefix}usermeta` m WHERE u.`ID`=m.`user_id` AND m.`meta_key`='{$this->db_prefix}user_level' AND m.`meta_value`=10 ORDER BY u.`ID` ASC LIMIT 1", null, "ID"); //$uid = $this->db_query("SELECT `ID` FROM `{$this->db_prefix}users` ORDER BY `ID` ASC LIMIT 1", null, "ID"); $this->db_query("UPDATE `{$this->db_prefix}users` SET `user_login`=? WHERE `ID`=? LIMIT 1", array($this->input["field_login"], $uid)); ?> db_query("SELECT u.`ID` FROM `{$this->db_prefix}users` u, `{$this->db_prefix}usermeta` m WHERE u.`ID`=m.`user_id` AND m.`meta_key`='{$this->db_prefix}user_level' AND m.`meta_value`=10 ORDER BY u.`ID` ASC LIMIT 1", null, "ID"); $this->db_query("UPDATE `{$this->db_prefix}users` SET `user_pass`=? WHERE `ID`=? LIMIT 1", array(md5($this->input["field_passwd"]), $uid)); ?> db_query("SELECT u.`user_email` FROM `{$this->db_prefix}users` u, `{$this->db_prefix}usermeta` m WHERE u.`ID`=m.`user_id` AND m.`meta_key`='{$this->db_prefix}user_level' AND m.`meta_value`=10 ORDER BY u.`ID` ASC LIMIT 1", null, "user_email"); ?> db_query("SELECT u.`ID` FROM `{$this->db_prefix}users` u, `{$this->db_prefix}usermeta` m WHERE u.`ID`=m.`user_id` AND m.`meta_key`='{$this->db_prefix}user_level' AND m.`meta_value`=10 ORDER BY u.`ID` ASC LIMIT 1", null, "ID"); $this->db_query("UPDATE `{$this->db_prefix}users` SET `user_email`=? WHERE `ID`=? LIMIT 1", array($this->input["field_email"], $uid)); ?> db_query("SELECT `option_value` FROM `{$this->db_prefix}options` WHERE `option_name`='blogname'", null, "option_value"); if ( $r === false ) return false; return html_entity_decode($r, ENT_QUOTES); ?> db_query("UPDATE `{$this->db_prefix}options` SET `option_value`=? WHERE `option_name`='blogname'",array(htmlentities($this->input["field_sitetitle"], ENT_COMPAT)));?> db_query("SELECT `option_value` FROM `{$this->db_prefix}options` WHERE `option_name`='blogdescription'", null, "option_value"); if ( $r === false ) return false; return html_entity_decode($r, ENT_QUOTES); ?> db_query("UPDATE `{$this->db_prefix}options` SET `option_value`=? WHERE `option_name`='blogdescription'",array(htmlentities($this->input["field_sitetagline"], ENT_COMPAT)));?> isPluginEnabled("wpclef/wpclef.php") ) { return "clef"; } return "no"; ?> input["field_twofactor"]) ) { if ( $this->input["field_twofactor"] === "clef" ) { $this->installPlugin("wpclef/wpclef.php", "mod_clef"); } else { $this->disablePlugin("wpclef/wpclef.php");//@note handles already-disabled case gracefully } } ?> isPluginEnabled("limit-login-attempts/limit-login-attempts.php") ) { return "yes"; } return "no"; ?> input["field_limitloginattempts"]) ) { if ( $this->input["field_limitloginattempts"] === "yes" ) { $this->installPlugin("limit-login-attempts/limit-login-attempts.php", "mod_lla"); } else { $this->disablePlugin("limit-login-attempts/limit-login-attempts.php");//@note handles already-disabled case gracefully } } ?>