diff --git a/include/dir_fns.php b/include/DirSearch.php similarity index 97% rename from include/dir_fns.php rename to include/DirSearch.php index 5f018ed8c..a6a0b59fc 100644 --- a/include/dir_fns.php +++ b/include/DirSearch.php @@ -1,14 +1,14 @@ smilies texts array, 'icons' => smilies html array) */ - public static function list_smilies() { + public static function get_list() { $texts = array( '<3', @@ -128,10 +128,10 @@ class smilies { || (local_user() && intval(get_pconfig(local_user(),'system','no_smilies')))) return $s; - $s = preg_replace_callback('/
(.*?)<\/pre>/ism','self::smile_encode',$s);
- $s = preg_replace_callback('/(.*?)<\/code>/ism','self::smile_encode',$s);
+ $s = preg_replace_callback('/(.*?)<\/pre>/ism','self::encode',$s);
+ $s = preg_replace_callback('/(.*?)<\/code>/ism','self::encode',$s);
- $params = self::list_smilies();
+ $params = self::get_list();
$params['string'] = $s;
if($sample) {
@@ -145,17 +145,17 @@ class smilies {
$s = str_replace($params['texts'],$params['icons'],$params['string']);
}
- $s = preg_replace_callback('/(.*?)<\/pre>/ism','self::smile_decode',$s);
- $s = preg_replace_callback('/(.*?)<\/code>/ism','self::smile_decode',$s);
+ $s = preg_replace_callback('/(.*?)<\/pre>/ism','self::decode',$s);
+ $s = preg_replace_callback('/(.*?)<\/code>/ism','self::decode',$s);
return $s;
}
- private function smile_encode($m) {
+ private function encode($m) {
return(str_replace($m[1],base64url_encode($m[1]),$m[0]));
}
- private function smile_decode($m) {
+ private function decode($m) {
return(str_replace($m[1],base64url_decode($m[1]),$m[0]));
}
diff --git a/include/acl_selectors.php b/include/acl_selectors.php
index 99848aa19..4a35fd0f0 100644
--- a/include/acl_selectors.php
+++ b/include/acl_selectors.php
@@ -6,7 +6,7 @@
require_once("include/contact_selectors.php");
require_once("include/contact_widgets.php");
-require_once("include/dir_fns.php");
+require_once("include/DirSearch.php");
require_once("include/features.php");
require_once("mod/proxy.php");
@@ -687,7 +687,7 @@ function navbar_complete(&$a) {
$search = substr($search,1);
if($localsearch) {
- $x = dir::global_search_by_name($search, $mode);
+ $x = DirSearch::global_search_by_name($search, $mode);
return $x;
}
diff --git a/include/text.php b/include/text.php
index 4e56ad105..956344d63 100644
--- a/include/text.php
+++ b/include/text.php
@@ -2,7 +2,7 @@
require_once("include/template_processor.php");
require_once("include/friendica_smarty.php");
-require_once("include/smilies.php");
+require_once("include/Smilies.php");
require_once("include/map.php");
require_once("mod/proxy.php");
@@ -1396,7 +1396,7 @@ function prepare_text($text) {
if(stristr($text,'[nosmile]'))
$s = bbcode($text);
else
- $s = smilies::replace(bbcode($text));
+ $s = Smilies::replace(bbcode($text));
return trim($s);
}}
diff --git a/mod/smilies.php b/mod/smilies.php
index 5a157e368..b3d86cb3f 100644
--- a/mod/smilies.php
+++ b/mod/smilies.php
@@ -4,11 +4,11 @@
* @file mod/smilies.php
*/
-require_once("include/smilies.php");
+require_once("include/Smilies.php");
function smilies_content(&$a) {
if ($a->argv[1]==="json"){
- $tmp = smilies::list_smilies();
+ $tmp = Smilies::get_list();
$results = array();
for($i = 0; $i < count($tmp['texts']); $i++) {
$results[] = array('text' => $tmp['texts'][$i], 'icon' => $tmp['icons'][$i]);