]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/php/schema.php
Merge pull request #4473 from annando/issue-4228
[friendica.git] / view / theme / frio / php / schema.php
index be3a3bcd9721a1e21f2e8d3806c1de2e4e063f1c..e890a4a6914269ed93933a9ead3d39dc2b5057ee 100644 (file)
@@ -3,14 +3,14 @@
 
 /**
  * @brief: Get info header of the shema
- * 
+ *
  * This function parses the header of the shemename.php file for inormations like
- * Author, Description and Overwrites. Most of the code comes from the get_plugin_info()
+ * Author, Description and Overwrites. Most of the code comes from the Addon::getInfo()
  * function. We use this to get the variables which get overwritten through the shema.
  * All color variables which get overwritten through the theme have to be
  * listed (comma seperated) in the shema header under Overwrites:
  * This seemst not to be the best solution. We need to investigate further.
- * 
+ *
  * @param string $schema Name of the shema
  * @return array With theme information
  *    'author' => Author Name
  *    'version' => Schema version
  *    'overwrites' => Variables which overwriting custom settings
  */
+
+use Friendica\Core\PConfig;
+
 function get_schema_info($schema){
 
        $theme = current_theme();
        $themepath = "view/theme/" . $theme . "/";
-       $schema = get_pconfig(local_user(),'frio', 'schema');
+       $schema = PConfig::get(local_user(),'frio', 'schema');
 
-       $info=Array(
+       $info=[
                'name' => $schema,
                'description' => "",
-               'author' => array(),
+               'author' => [],
                'version' => "",
                'overwrites' => ""
-       );
+       ];
 
        if (!is_file($themepath . "schema/" . $schema . ".php")) return $info;
 
@@ -48,9 +51,9 @@ function get_schema_info($schema){
                                if ($k=="author"){
                                        $r=preg_match("|([^<]+)<([^>]+)>|", $v, $m);
                                        if ($r) {
-                                               $info['author'][] = array('name'=>$m[1], 'link'=>$m[2]);
+                                               $info['author'][] = ['name'=>$m[1], 'link'=>$m[2]];
                                        } else {
-                                               $info['author'][] = array('name'=>$v);
+                                               $info['author'][] = ['name'=>$v];
                                        }
                                } elseif ($k == "overwrites") {
                                        $theme_settings = explode(',',str_replace(' ','', $v));