]> git.mjollnir.org Git - s9y.git/commitdiff
Function cleanup by Omid Mottaghi
authorgarvinhicking <garvinhicking>
Thu, 17 Nov 2005 19:54:05 +0000 (19:54 +0000)
committergarvinhicking <garvinhicking>
Thu, 17 Nov 2005 19:54:05 +0000 (19:54 +0000)
include/functions_calendars.inc.php
include/functions_config.inc.php
include/functions_images.inc.php
include/functions_rss.inc.php
include/functions_smarty.inc.php
include/functions_trackbacks.inc.php

index a512019a469c94f9c2bc7bf28965bbd2b53f014d..edf3adef5c4268ae63f0e71142b323e18b533c91 100644 (file)
@@ -214,7 +214,7 @@ function jalali_strftime_utf($format, $timestamp) {
                     $output_str.=strftime('%z', $timestamp);
                     break;
                 case '%':
-                    $outpus_str.='%';
+                    $output_str.='%';
                     break;
             }
         }else{
index 7d763aa8918fcc813e9d09f38b25695ffeec3103..f4dffb3218463ac14651caa8c581777cbef967f6 100644 (file)
@@ -799,7 +799,7 @@ function serendipity_deleteGroup($groupid) {
     
     if (!serendipity_checkPermission('adminUsersMaintainOthers')) {
         // Only groups should be accessible where a user has access rights.
-        $my_groups = serendipity_getGroups($serendipity['authorid'], true);
+        $my_groups =& serendipity_getGroups($serendipity['authorid'], true);
         if (!in_array($groupid, $my_groups)) {
             return false;
         }
@@ -850,8 +850,8 @@ function serendipity_intersectGroup($checkuser = null, $myself = null) {
         $myself = $serendipity['authorid'];
     }
     
-    $my_groups  = serendipity_getGroups($myself, true);
-    $his_groups = serendipity_getGroups($checkuser, true);
+    $my_groups  =& serendipity_getGroups($myself, true);
+    $his_groups =& serendipity_getGroups($checkuser, true);
 
     foreach($his_groups AS $his_group) {
         if (in_array($his_group, $my_groups)) {
@@ -871,13 +871,13 @@ function serendipity_updateGroupConfig($groupid, &$perms, &$values) {
 
     if (!serendipity_checkPermission('adminUsersMaintainOthers')) {
         // Only groups should be accessible where a user has access rights.
-        $my_groups = serendipity_getGroups($serendipity['authorid'], true);
+        $my_groups =& serendipity_getGroups($serendipity['authorid'], true);
         if (!in_array($groupid, $my_groups)) {
             return false;
         }
     } 
 
-    $storage = serendipity_fetchGroup($groupid);    
+    $storage =& serendipity_fetchGroup($groupid);    
 
     serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}groupconfig WHERE id = " . (int)$groupid); 
     foreach ($perms AS $perm => $userlevels) {
index ab4da54f17c215e844f7be065d977359224abf9a..36e36c982840f39a485a045753a156660266d003 100644 (file)
@@ -98,7 +98,6 @@ function serendipity_deleteImage($id) {
     $dFile  = $file['path'] . $file['name'] . '.' . $file['extension'];
     $dThumb = $file['path'] . $file['name'] . (!empty($file['thumbnail_name']) ? '.' . $file['thumbnail_name'] : '') . '.' . $file['extension'];
 
-    $admin = '';
     if (!serendipity_checkPermission('adminImagesDelete')) {
         return;
     }
@@ -696,7 +695,7 @@ function serendipity_syncThumbs() {
 
     $fcount = count($files);
     for ($x = 0; $x < $fcount; $x++) {
-        $update = $q = array();
+        $update = array();
         $f      = serendipity_parseFileName($files[$x]);
         if (empty($f[1]) || $f[1] == $files[$x]) {
             // No extension means bad file most probably. Skip it.
index 45a4e3f42b6d4670226a778a09ab32161c4f64d9..a8c74bfb149d95878a5c8cc5a54696dcc4dd7919 100644 (file)
@@ -54,7 +54,7 @@ function serendipity_printEntries_rss(&$entries, $version, $comments = false, $f
                 $entry['categories'] = array(0 => array(
                     'category_name'      => $entry['category_name'],
                     'feed_category_name' => serendipity_utf8_encode(htmlspecialchars($entry['category_name'])),
-                    'categoryURL'        => serendipity_categoryURL($cat, 'baseURL')
+                    'categoryURL'        => serendipity_categoryURL($entry, 'baseURL')
                 ));
             } else {
                 foreach($entry['categories'] AS $cid => $_cat) {
index 4ba9b4429bc59a53ad90f7094af36d7f99bd1f35..c2610de905529265557c0d14b76536d1f6f95f2d 100644 (file)
@@ -169,7 +169,7 @@ function serendipity_smarty_printTrackbacks($params, &$smarty) {
     return serendipity_printTrackbacks(serendipity_fetchTrackbacks($params['entry']));
 }
 
-function &serendipity_replaceSmartyVars(&$tpl_source, $smarty) {
+function &serendipity_replaceSmartyVars(&$tpl_source, &$smarty) {
     $tpl_source = str_replace('$CONST.', '$smarty.const.', $tpl_source);
     return $tpl_source;
 }
@@ -304,7 +304,7 @@ function serendipity_smarty_purge() {
 function serendipity_smarty_shutdown($serendipity_directory = '') {
 global $serendipity;
 
-    $cwd = getcwd();
+    #$cwd = getcwd();
     chdir($serendipity_directory);
     $raw_data = ob_get_contents();
     ob_end_clean();
index e17f20eb458225af55e7d76cd3321dbe8f7c7971..af5e51c1c88c3b1ab04fb4a271614dfaf2a6725c 100644 (file)
@@ -22,6 +22,7 @@ function serendipity_trackback_is_success($resp) {
 }
 
 function serendipity_pingback_autodiscover($loc, $body) {
+global $serendipity;
     if (!empty($_SERVER['X-PINGBACK'])) {
         $pingback = $_SERVER['X-PINGBACK'];
     } elseif (preg_match('@<link rel="pingback" href="([^"]+)" ?/?>@i', $body, $matches)) {