]> git.mxchange.org Git - friendica.git/commitdiff
view directory cleanup
authorFriendika <info@friendika.com>
Tue, 16 Nov 2010 05:02:59 +0000 (21:02 -0800)
committerFriendika <info@friendika.com>
Tue, 16 Nov 2010 05:02:59 +0000 (21:02 -0800)
12 files changed:
include/acl_selectors.php [new file with mode: 0644]
mod/group.php
mod/message.php
mod/network.php
mod/photos.php
mod/profile.php
mod/settings.php
view/about.tpl [deleted file]
view/acl_selectors.php [deleted file]
view/atom_cmnt.tpl [deleted file]
view/atom_item.tpl [deleted file]
view/atom_tomb.tpl [deleted file]

diff --git a/include/acl_selectors.php b/include/acl_selectors.php
new file mode 100644 (file)
index 0000000..9bbd6bc
--- /dev/null
@@ -0,0 +1,138 @@
+<?php
+
+
+function group_select($selname,$selclass,$preselected = false,$size = 4) {
+
+       $o = '';
+
+       $o .= "<select name=\"{$selname}[]\" id=\"$selclass\" class=\"$selclass\" multiple=\"multiple\" size=\"$size\" >\r\n";
+
+       $r = q("SELECT * FROM `group` WHERE `deleted` = 0 AND `uid` = %d ORDER BY `name` ASC",
+               $_SESSION['uid']
+       );
+
+       if(count($r)) {
+               foreach($r as $rr) {
+                       if((is_array($preselected)) && in_array($rr['id'], $preselected))
+                               $selected = " selected=\"selected\" ";
+                       else
+                               $selected = '';
+
+                       $o .= "<option value=\"{$rr['id']}\" $selected >{$rr['name']}</option>\r\n";
+               }
+       
+       }
+       $o .= "</select>\r\n";
+
+
+       return $o;
+}
+
+
+
+function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false) {
+
+       $o = '';
+
+       // When used for private messages, we limit correspondence to mutual friends and the selector
+       // to one recipient. By default our selector allows multiple selects amongst all contacts.
+
+       $sql_extra = '';
+
+       if($privmail || $celeb) {
+               $sql_extra = sprintf(" AND `rel` = %d ", intval(REL_BUD));
+       }
+
+       if($privmail)
+               $o .= "<select name=\"$selname\" id=\"$selclass\" class=\"$selclass\" size=\"$size\" >\r\n";
+       else 
+               $o .= "<select name=\"{$selname}[]\" id=\"$selclass\" class=\"$selclass\" multiple=\"multiple\" size=\"$size\" >\r\n";
+
+       $r = q("SELECT `id`, `name`, `url`, `network` FROM `contact` 
+               WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 
+               $sql_extra
+               ORDER BY `name` ASC ",
+               intval(local_user())
+       );
+
+       if(count($r)) {
+               foreach($r as $rr) {
+                       if((is_array($preselected)) && in_array($rr['id'], $preselected))
+                               $selected = " selected=\"selected\" ";
+                       else
+                               $selected = '';
+                       if(($privmail) && ($rr['network'] === 'stat'))
+                               $disabled = ' disabled="true" ' ;
+                       else
+                               $disabled = '';
+                       $o .= "<option value=\"{$rr['id']}\" $selected  $disabled title=\"{$rr['url']}\" >{$rr['name']}</option>\r\n";
+               }
+       
+       }
+       $o .= "</select>\r\n";
+
+
+       return $o;
+}
+
+function fixacl(&$item) {
+       $item = intval(str_replace(array('<','>'),array('',''),$item));
+}
+
+function populate_acl($user = null,$celeb = false) {
+
+       $allow_cid = $allow_gid = $deny_cid = $deny_gid = false;
+
+       if(is_array($user)) {
+               $allow_cid = ((strlen($user['allow_cid'])) 
+                       ? explode('><', $user['allow_cid']) : array() );
+               $allow_gid = ((strlen($user['allow_gid']))
+                       ? explode('><', $user['allow_gid']) : array() );
+               $deny_cid  = ((strlen($user['deny_cid']))
+                       ? explode('><', $user['deny_cid']) : array() );
+               $deny_gid  = ((strlen($user['deny_gid']))
+                       ? explode('><', $user['deny_gid']) : array() );
+               array_walk($allow_cid,'fixacl');
+               array_walk($allow_gid,'fixacl');
+               array_walk($deny_cid,'fixacl');
+               array_walk($deny_gid,'fixacl');
+       }
+
+       $o = '';
+       $o .= '<div id="acl-wrapper">';
+       $o .= '<div id="acl-permit-outer-wrapper">';
+       $o .= '<div id="acl-permit-text">' . t('Visible To:') . '</div>';
+       $o .= '<div id="acl-permit-text-end"></div>';
+       $o .= '<div id="acl-permit-wrapper">';
+       $o .= '<div id="group_allow_wrapper">';
+       $o .= '<label id="acl-allow-group-label" for="group_allow" >' . t('Groups') . '</label>';
+       $o .= group_select('group_allow','group_allow',$allow_gid);
+       $o .= '</div>';
+       $o .= '<div id="contact_allow_wrapper">';
+       $o .= '<label id="acl-allow-contact-label" for="contact_allow" >' . t('Contacts') . '</label>';
+       $o .= contact_select('contact_allow','contact_allow',$allow_cid,4,false,$celeb);
+       $o .= '</div>';
+       $o .= '</div>' . "\r\n";
+       $o .= '<div id="acl-allow-end"></div>' . "\r\n";
+       $o .= '</div>';
+       $o .= '<div id="acl-deny-outer-wrapper">';
+       $o .= '<div id="acl-deny-text">' . t('Except For:') . '</div>';
+       $o .= '<div id="acl-deny-text-end"></div>';
+       $o .= '<div id="acl-deny-wrapper">';
+       $o .= '<div id="group_deny_wrapper" >';
+       $o .= '<label id="acl-deny-group-label" for="group_deny" >' . t('Groups') . '</label>';
+       $o .= group_select('group_deny','group_deny', $deny_gid);
+       $o .= '</div>';
+       $o .= '<div id="contact_deny_wrapper" >';
+       $o .= '<label id="acl-deny-contact-label" for="contact_deny" >' . t('Contacts') . '</label>';
+       $o .= contact_select('contact_deny','contact_deny', $deny_cid,4,false, $celeb);
+       $o .= '</div>';
+       $o .= '</div>' . "\r\n";
+       $o .= '<div id="acl-deny-end"></div>' . "\r\n";
+       $o .= '</div>';
+       $o .= '</div>' . "\r\n";
+       $o .= '<div id="acl-wrapper-end"></div>' . "\r\n";
+       return $o;
+
+}
+
index e5c6b92aea61c7643897812851c10fdc6dcd3a60..01875d01f6cc20db8e8ecf0ba3c15eecadc3147a 100644 (file)
@@ -113,7 +113,7 @@ function group_content(&$a) {
 
 
        if(($a->argc == 2) && (intval($a->argv[1]))) {
-               require_once('view/acl_selectors.php');
+               require_once('include/acl_selectors.php');
                $r = q("SELECT * FROM `group` WHERE `id` = %d AND `uid` = %d LIMIT 1",
                        intval($a->argv[1]),
                        intval(local_user())
index 9d7a86d551919464a9c09269065da1c237bb9068..3f5b71cc2f34bb50eedab36e26648a35b5ff1948 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-require_once('view/acl_selectors.php');
+require_once('include/acl_selectors.php');
 
 function message_init(&$a) {
 
index a6e03440b42fb8d15d5f4def1f21f59da883646c..59fd12c4bd3e7e440049f9678f195cbdec88b949 100644 (file)
@@ -41,7 +41,7 @@ function network_content(&$a, $update = 0) {
                        '$geotag' => $geotag
                ));
 
-               require_once('view/acl_selectors.php');
+               require_once('include/acl_selectors.php');
 
                $tpl = load_view_file("view/jot.tpl");
                
index addc04d76c7f10df41fa26ae56d6fb2901294aaf..f570d5b13ed376efec631788aba9ef599630caa7 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
-require_once('Photo.php');
+require_once('include/Photo.php');
 require_once('include/items.php');
-require_once('view/acl_selectors.php');
+require_once('include/acl_selectors.php');
 require_once('include/bbcode.php');
 
 function photos_init(&$a) {
index 8dd7b8ebf126feb92333650b9829fab3df87ec1a..240454017d56937d36af182f9f7d215f5c00012d 100644 (file)
@@ -159,7 +159,7 @@ function profile_content(&$a, $update = 0) {
                                '$geotag'  => $geotag
                        ));
 
-                       require_once('view/acl_selectors.php');
+                       require_once('include/acl_selectors.php');
 
                        $tpl = load_view_file("view/jot.tpl");
                        if(is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))
index 0687a498f2cdcea785d2e2c7b481d14854f64e9e..a40354c86f27e36388aafbaaf90ddd0a453fe7df 100644 (file)
@@ -163,7 +163,7 @@ function settings_content(&$a) {
                return;
        }
 
-       require_once('view/acl_selectors.php');
+       require_once('include/acl_selectors.php');
 
        $p = q("SELECT * FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1",
                intval($_SESSION['uid'])
diff --git a/view/about.tpl b/view/about.tpl
deleted file mode 100644 (file)
index fa3d49c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-
-<div id="about-jot-wrapper" >
-<p id="about-jot-desc" >
-Tell us about yourself. 
-</p>
-
-<textarea rows="15" cols="72" id="profile-jot-text" name="body" >$about</textarea>
-
-</div>
-<div id="about-jot-submit-wrapper" >
-<input type="submit" id="about-jot-submit" name="submit" value="Submit" />
-</div>
-<div id="profile-jot-end"></div>
-</div>
diff --git a/view/acl_selectors.php b/view/acl_selectors.php
deleted file mode 100644 (file)
index 9bbd6bc..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-<?php
-
-
-function group_select($selname,$selclass,$preselected = false,$size = 4) {
-
-       $o = '';
-
-       $o .= "<select name=\"{$selname}[]\" id=\"$selclass\" class=\"$selclass\" multiple=\"multiple\" size=\"$size\" >\r\n";
-
-       $r = q("SELECT * FROM `group` WHERE `deleted` = 0 AND `uid` = %d ORDER BY `name` ASC",
-               $_SESSION['uid']
-       );
-
-       if(count($r)) {
-               foreach($r as $rr) {
-                       if((is_array($preselected)) && in_array($rr['id'], $preselected))
-                               $selected = " selected=\"selected\" ";
-                       else
-                               $selected = '';
-
-                       $o .= "<option value=\"{$rr['id']}\" $selected >{$rr['name']}</option>\r\n";
-               }
-       
-       }
-       $o .= "</select>\r\n";
-
-
-       return $o;
-}
-
-
-
-function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false) {
-
-       $o = '';
-
-       // When used for private messages, we limit correspondence to mutual friends and the selector
-       // to one recipient. By default our selector allows multiple selects amongst all contacts.
-
-       $sql_extra = '';
-
-       if($privmail || $celeb) {
-               $sql_extra = sprintf(" AND `rel` = %d ", intval(REL_BUD));
-       }
-
-       if($privmail)
-               $o .= "<select name=\"$selname\" id=\"$selclass\" class=\"$selclass\" size=\"$size\" >\r\n";
-       else 
-               $o .= "<select name=\"{$selname}[]\" id=\"$selclass\" class=\"$selclass\" multiple=\"multiple\" size=\"$size\" >\r\n";
-
-       $r = q("SELECT `id`, `name`, `url`, `network` FROM `contact` 
-               WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 
-               $sql_extra
-               ORDER BY `name` ASC ",
-               intval(local_user())
-       );
-
-       if(count($r)) {
-               foreach($r as $rr) {
-                       if((is_array($preselected)) && in_array($rr['id'], $preselected))
-                               $selected = " selected=\"selected\" ";
-                       else
-                               $selected = '';
-                       if(($privmail) && ($rr['network'] === 'stat'))
-                               $disabled = ' disabled="true" ' ;
-                       else
-                               $disabled = '';
-                       $o .= "<option value=\"{$rr['id']}\" $selected  $disabled title=\"{$rr['url']}\" >{$rr['name']}</option>\r\n";
-               }
-       
-       }
-       $o .= "</select>\r\n";
-
-
-       return $o;
-}
-
-function fixacl(&$item) {
-       $item = intval(str_replace(array('<','>'),array('',''),$item));
-}
-
-function populate_acl($user = null,$celeb = false) {
-
-       $allow_cid = $allow_gid = $deny_cid = $deny_gid = false;
-
-       if(is_array($user)) {
-               $allow_cid = ((strlen($user['allow_cid'])) 
-                       ? explode('><', $user['allow_cid']) : array() );
-               $allow_gid = ((strlen($user['allow_gid']))
-                       ? explode('><', $user['allow_gid']) : array() );
-               $deny_cid  = ((strlen($user['deny_cid']))
-                       ? explode('><', $user['deny_cid']) : array() );
-               $deny_gid  = ((strlen($user['deny_gid']))
-                       ? explode('><', $user['deny_gid']) : array() );
-               array_walk($allow_cid,'fixacl');
-               array_walk($allow_gid,'fixacl');
-               array_walk($deny_cid,'fixacl');
-               array_walk($deny_gid,'fixacl');
-       }
-
-       $o = '';
-       $o .= '<div id="acl-wrapper">';
-       $o .= '<div id="acl-permit-outer-wrapper">';
-       $o .= '<div id="acl-permit-text">' . t('Visible To:') . '</div>';
-       $o .= '<div id="acl-permit-text-end"></div>';
-       $o .= '<div id="acl-permit-wrapper">';
-       $o .= '<div id="group_allow_wrapper">';
-       $o .= '<label id="acl-allow-group-label" for="group_allow" >' . t('Groups') . '</label>';
-       $o .= group_select('group_allow','group_allow',$allow_gid);
-       $o .= '</div>';
-       $o .= '<div id="contact_allow_wrapper">';
-       $o .= '<label id="acl-allow-contact-label" for="contact_allow" >' . t('Contacts') . '</label>';
-       $o .= contact_select('contact_allow','contact_allow',$allow_cid,4,false,$celeb);
-       $o .= '</div>';
-       $o .= '</div>' . "\r\n";
-       $o .= '<div id="acl-allow-end"></div>' . "\r\n";
-       $o .= '</div>';
-       $o .= '<div id="acl-deny-outer-wrapper">';
-       $o .= '<div id="acl-deny-text">' . t('Except For:') . '</div>';
-       $o .= '<div id="acl-deny-text-end"></div>';
-       $o .= '<div id="acl-deny-wrapper">';
-       $o .= '<div id="group_deny_wrapper" >';
-       $o .= '<label id="acl-deny-group-label" for="group_deny" >' . t('Groups') . '</label>';
-       $o .= group_select('group_deny','group_deny', $deny_gid);
-       $o .= '</div>';
-       $o .= '<div id="contact_deny_wrapper" >';
-       $o .= '<label id="acl-deny-contact-label" for="contact_deny" >' . t('Contacts') . '</label>';
-       $o .= contact_select('contact_deny','contact_deny', $deny_cid,4,false, $celeb);
-       $o .= '</div>';
-       $o .= '</div>' . "\r\n";
-       $o .= '<div id="acl-deny-end"></div>' . "\r\n";
-       $o .= '</div>';
-       $o .= '</div>' . "\r\n";
-       $o .= '<div id="acl-wrapper-end"></div>' . "\r\n";
-       return $o;
-
-}
-
diff --git a/view/atom_cmnt.tpl b/view/atom_cmnt.tpl
deleted file mode 100644 (file)
index b70a6dc..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-       <entry>
-               <author>
-                       <name>$name</name>
-                       <uri>$profile_page</uri>
-                       <link rel="photo"  type="image/jpeg" media:width="80" media:height="80" href="$thumb" />
-                       <link rel="avatar" type="image/jpeg" media:width="80" media:height="80" href="$thumb" />
-               </author>
-
-               <thr:in-reply-to ref="$parent_id" />
-               <id>$item_id</id>
-               <title>$title</title>
-               <published>$published</published>
-               <updated>$updated</updated>
-               <content type="$type" >$content</content>
-               <link rel="alternate" href="$alt" />
-               <dfrn:comment-allow>$comment_allow</dfrn:comment-allow>
-               <as:verb>$verb</as:verb>
-               $actobj
-               $mentioned
-       </entry>
-
diff --git a/view/atom_item.tpl b/view/atom_item.tpl
deleted file mode 100644 (file)
index 0d36b57..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-       <entry>
-               <author>
-                       <name>$name</name>
-                       <uri>$profile_page</uri>
-                       <link rel="photo"  type="image/jpeg" media:width="80" media:height="80" href="$thumb" />
-                       <link rel="avatar" type="image/jpeg" media:width="80" media:height="80" href="$thumb" />
-               </author>
-               <dfrn:owner>
-                       <name>$owner_name</name>
-                       <uri>$owner_profile_page</uri>
-                       <link rel="photo"  type="image/jpeg" media:width="80" media:height="80" href="$owner_thumb" />
-                       <link rel="avatar" type="image/jpeg" media:width="80" media:height="80" href="$owner_thumb" />
-               </dfrn:owner>
-
-               <id>$item_id</id>
-               <title>$title</title>
-               <published>$published</published>
-               <updated>$updated</updated>
-               <content type="$type" >$content</content>
-               <link rel="alternate" href="$alt" />
-               <dfrn:location>$location</dfrn:location>
-               <georss:point>$coord</georss:point>
-               <dfrn:comment-allow>$comment_allow</dfrn:comment-allow>
-               <as:verb>$verb</as:verb>
-               $actobj
-               $mentioned
-
-       </entry>
diff --git a/view/atom_tomb.tpl b/view/atom_tomb.tpl
deleted file mode 100644 (file)
index 99e1b94..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-
-       <at:deleted-entry ref="$id" when="$updated" />
-